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 | 5147b45584b1a782f016a59fdd251ce3810dc1c4 (patch) | |
tree | 8e530f45314534ac1c6bf17a16dc7e1569e6ad22 /test/gtest_unittest.cc | |
parent | 17147ffac2fc18a805397c269eba458ad429fbd9 (diff) | |
download | gtest-5147b45584b1a782f016a59fdd251ce3810dc1c4.tar.gz gtest-5147b45584b1a782f016a59fdd251ce3810dc1c4.tar.bz2 gtest-5147b45584b1a782f016a59fdd251ce3810dc1c4.tar.xz |
Solaris and AIX patch by Hady Zalek
git-svn-id: http://googletest.googlecode.com/svn/trunk@395 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'test/gtest_unittest.cc')
-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 d5a6f30..bd10ae0 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 |