diff options
Diffstat (limited to 'libnativebridge/tests/ValidNameNativeBridge_test.cpp')
-rw-r--r-- | libnativebridge/tests/ValidNameNativeBridge_test.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libnativebridge/tests/ValidNameNativeBridge_test.cpp b/libnativebridge/tests/ValidNameNativeBridge_test.cpp index 3e01923..690be4a 100644 --- a/libnativebridge/tests/ValidNameNativeBridge_test.cpp +++ b/libnativebridge/tests/ValidNameNativeBridge_test.cpp @@ -21,13 +21,15 @@ namespace android { static const char* kTestName = "librandom-bridge_not.existing.so"; TEST_F(NativeBridgeTest, ValidName) { + // Check that the name is acceptable. + EXPECT_EQ(true, NativeBridgeNameAcceptable(kTestName)); + + // Now check what happens on LoadNativeBridge. EXPECT_EQ(false, NativeBridgeError()); - SetupNativeBridge(kTestName, nullptr); - EXPECT_EQ(false, NativeBridgeError()); - EXPECT_EQ(false, NativeBridgeAvailable()); - // This should lead to an error for trying to initialize a not-existing - // native bridge. + LoadNativeBridge(kTestName, nullptr); + // This will lead to an error as the library doesn't exist. EXPECT_EQ(true, NativeBridgeError()); + EXPECT_EQ(false, NativeBridgeAvailable()); } } // namespace android |