Commit 24b5fd44 authored by trchen@chromium.org's avatar trchen@chromium.org

Fix Android build breakage with new extension tests

The tests use EXPECT_EQ with a constant variable equal to false,
that tricks GCC 4.7+ into beliving the variable should be compatible to null
pointers in some internal macro. This CL workarounds that by
using EXPECT_TRUE(a == b) instead.

BUG=https://code.google.com/p/googletest/issues/detail?id=458
TBR=mek
NOTRY=true

Review URL: https://codereview.chromium.org/290723002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271136 0039d316-1c4b-4281-b951-d872f2087c98
parent 2c637a39
...@@ -3042,7 +3042,16 @@ TEST_F(ExtensionServiceTest, AddPendingExtensionFromSync) { ...@@ -3042,7 +3042,16 @@ TEST_F(ExtensionServiceTest, AddPendingExtensionFromSync) {
EXPECT_EQ(kFakeUpdateURL, pending_extension_info->update_url()); EXPECT_EQ(kFakeUpdateURL, pending_extension_info->update_url());
EXPECT_EQ(&IsExtension, pending_extension_info->should_allow_install_); EXPECT_EQ(&IsExtension, pending_extension_info->should_allow_install_);
EXPECT_EQ(kFakeInstallSilently, pending_extension_info->install_silently()); EXPECT_EQ(kFakeInstallSilently, pending_extension_info->install_silently());
EXPECT_EQ(kFakeRemoteInstall, pending_extension_info->remote_install()); // Use
// EXPECT_TRUE(kFakeRemoteInstall == pending_extension_info->remote_install())
// instead of
// EXPECT_EQ(kFakeRemoteInstall, pending_extension_info->remote_install())
// as gcc 4.7 issues the following warning on EXPECT_EQ(false, x), which is
// turned into an error with -Werror=conversion-null:
// converting 'false' to pointer type for argument 1 of
// 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)'
// https://code.google.com/p/googletest/issues/detail?id=458
EXPECT_TRUE(kFakeRemoteInstall == pending_extension_info->remote_install());
} }
namespace { namespace {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment