diff options
author | vladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925> | 2010-03-17 18:22:59 +0000 |
---|---|---|
committer | vladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925> | 2010-03-17 18:22:59 +0000 |
commit | 06d04c0945bf47bae90532552e6e8294802fc9aa (patch) | |
tree | 8e530f45314534ac1c6bf17a16dc7e1569e6ad22 /test | |
parent | a6978ecb4cbab44fc0fe0be81796f95d02e9e4a2 (diff) | |
download | googletest-06d04c0945bf47bae90532552e6e8294802fc9aa.tar.gz googletest-06d04c0945bf47bae90532552e6e8294802fc9aa.tar.bz2 googletest-06d04c0945bf47bae90532552e6e8294802fc9aa.zip |
Solaris and AIX patch by Hady Zalek
Diffstat (limited to 'test')
-rw-r--r-- | test/gtest_unittest.cc | 16 |
1 files changed, 6 insertions, 10 deletions
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 |