Skip to content

Commit b4a10f0

Browse files
avpfacebook-github-bot
authored andcommitted
Use == instead of EXPECT_EQ in testlib
Summary: The `EXPECT_EQ` was leading to potentially ambiguous use of `<<` when gtest tries to print information. Changelog: [Internal] Reviewed By: tsaichien Differential Revision: D78823354 fbshipit-source-id: d26de07f02eb8bb53a4dec34b5fb302681bfbef8
1 parent 8c1d191 commit b4a10f0

File tree

1 file changed

+3
-1
lines changed
  • packages/react-native/ReactCommon/jsi/jsi/test

1 file changed

+3
-1
lines changed

packages/react-native/ReactCommon/jsi/jsi/test/testlib.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1877,7 +1877,9 @@ TEST_P(JSITest, CastInterface) {
18771877
auto randomUuid = UUID{0xf2cd96cf, 0x455e, 0x42d9, 0x850a, 0x13e2cde59b8b};
18781878
auto ptr = rd.castInterface(randomUuid);
18791879

1880-
EXPECT_EQ(ptr, nullptr);
1880+
// Use == instead of EXPECT_EQ to avoid ambiguous operator usage due to the
1881+
// type of 'ptr'.
1882+
EXPECT_TRUE(ptr == nullptr);
18811883
}
18821884

18831885
INSTANTIATE_TEST_CASE_P(

0 commit comments

Comments
 (0)