netdutils: make {EXPECT, ASSERT}_OK for Status and Status-like objects

Test: build, atest
Bug: 149963652
Change-Id: I397e693d488c4a955a40062b0aa93caee35eaa00
Merged-In: I397e693d488c4a955a40062b0aa93caee35eaa00
diff --git a/libnetdutils/include/netdutils/Status.h b/libnetdutils/include/netdutils/Status.h
index 56411af..bc347d5 100644
--- a/libnetdutils/include/netdutils/Status.h
+++ b/libnetdutils/include/netdutils/Status.h
@@ -79,8 +79,9 @@
     return status.ok();
 }
 
-// For use only in tests.
-#define EXPECT_OK(status) EXPECT_TRUE((status).ok())
+// For use only in tests. Used for both Status and Status-like objects. See also isOk().
+#define EXPECT_OK(status) EXPECT_TRUE(isOk(status))
+#define ASSERT_OK(status) ASSERT_TRUE(isOk(status))
 
 // Documents that status is expected to be ok. This function may log
 // (or assert when running in debug mode) if status has an unexpected value.