From 06d04c0945bf47bae90532552e6e8294802fc9aa Mon Sep 17 00:00:00 2001 From: vladlosev Date: Wed, 17 Mar 2010 18:22:59 +0000 Subject: Solaris and AIX patch by Hady Zalek --- test/gtest_unittest.cc | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'test/gtest_unittest.cc') diff --git a/test/gtest_unittest.cc b/test/gtest_unittest.cc index d5a6f302..bd10ae0d 100644 --- a/test/gtest_unittest.cc +++ b/test/gtest_unittest.cc @@ -296,8 +296,7 @@ TEST(FormatTimeInMillisAsSecondsTest, FormatsNegativeNumber) { EXPECT_EQ("-3", FormatTimeInMillisAsSeconds(-3000)); } -#if !GTEST_OS_SYMBIAN -// NULL testing does not work with Symbian compilers. +#if GTEST_CAN_COMPARE_NULL #ifdef __BORLANDC__ // Silences warnings: "Condition is always true", "Unreachable code" @@ -335,7 +334,7 @@ TEST(NullLiteralTest, IsFalseForNonNullLiterals) { #pragma option pop #endif -#endif // !GTEST_OS_SYMBIAN +#endif // GTEST_CAN_COMPARE_NULL // // Tests CodePointToUtf8(). @@ -3559,10 +3558,7 @@ TEST(AssertionTest, ASSERT_EQ) { } // Tests ASSERT_EQ(NULL, pointer). -#if !GTEST_OS_SYMBIAN -// The NULL-detection template magic fails to compile with -// the Nokia compiler and crashes the ARM compiler, hence -// not testing on Symbian. +#if GTEST_CAN_COMPARE_NULL TEST(AssertionTest, ASSERT_EQ_NULL) { // A success. const char* p = NULL; @@ -3577,7 +3573,7 @@ TEST(AssertionTest, ASSERT_EQ_NULL) { EXPECT_FATAL_FAILURE(ASSERT_EQ(NULL, &n), "Value of: &n\n"); } -#endif // !GTEST_OS_SYMBIAN +#endif // GTEST_CAN_COMPARE_NULL // Tests ASSERT_EQ(0, non_pointer). Since the literal 0 can be // treated as a null pointer by the compiler, we need to make sure @@ -4141,7 +4137,7 @@ TEST(ExpectTest, EXPECT_EQ_Double) { "5.1"); } -#if !GTEST_OS_SYMBIAN +#if GTEST_CAN_COMPARE_NULL // Tests EXPECT_EQ(NULL, pointer). TEST(ExpectTest, EXPECT_EQ_NULL) { // A success. @@ -4157,7 +4153,7 @@ TEST(ExpectTest, EXPECT_EQ_NULL) { EXPECT_NONFATAL_FAILURE(EXPECT_EQ(NULL, &n), "Value of: &n\n"); } -#endif // !GTEST_OS_SYMBIAN +#endif // GTEST_CAN_COMPARE_NULL // Tests EXPECT_EQ(0, non_pointer). Since the literal 0 can be // treated as a null pointer by the compiler, we need to make sure -- cgit v1.2.3