diff options
author | shiqian <shiqian@861a406c-534a-0410-8894-cb66d6ee9925> | 2008-09-13 00:49:59 (GMT) |
---|---|---|
committer | shiqian <shiqian@861a406c-534a-0410-8894-cb66d6ee9925> | 2008-09-13 00:49:59 (GMT) |
commit | ee39a89debba2b2e00dec3fa2df03e1d3dcb4027 (patch) | |
tree | ca395c2238dee5048ddb5cb2b00d25a0d85c9706 /test/gtest_unittest.cc | |
parent | 36865d8d354465e3461eedf2949a4b7799985d5d (diff) | |
download | googletest-ee39a89debba2b2e00dec3fa2df03e1d3dcb4027.zip googletest-ee39a89debba2b2e00dec3fa2df03e1d3dcb4027.tar.gz googletest-ee39a89debba2b2e00dec3fa2df03e1d3dcb4027.tar.bz2 |
Adds suffix 'd' to gtest's libs on Windows. Also fixes gtest_unittest on non-English Windows. By balazs.dan@gmail.com.
Diffstat (limited to 'test/gtest_unittest.cc')
-rw-r--r-- | test/gtest_unittest.cc | 69 |
1 files changed, 12 insertions, 57 deletions
diff --git a/test/gtest_unittest.cc b/test/gtest_unittest.cc index b20b98c..abc337f 100644 --- a/test/gtest_unittest.cc +++ b/test/gtest_unittest.cc @@ -2720,85 +2720,40 @@ TEST(HRESULTAssertionTest, EXPECT_HRESULT_SUCCEEDED) { EXPECT_HRESULT_SUCCEEDED(S_OK); EXPECT_HRESULT_SUCCEEDED(S_FALSE); -#ifdef _WIN32_WCE - const char* expected = - "Expected: (UnexpectedHRESULTFailure()) succeeds.\n" - " Actual: 0x8000FFFF"; -#else // Windows proper - const char* expected = - "Expected: (UnexpectedHRESULTFailure()) succeeds.\n" - " Actual: 0x8000FFFF Catastrophic failure"; -#endif // _WIN32_WCE EXPECT_NONFATAL_FAILURE(EXPECT_HRESULT_SUCCEEDED(UnexpectedHRESULTFailure()), - expected); + "Expected: (UnexpectedHRESULTFailure()) succeeds.\n" + " Actual: 0x8000FFFF"); } TEST(HRESULTAssertionTest, ASSERT_HRESULT_SUCCEEDED) { ASSERT_HRESULT_SUCCEEDED(S_OK); ASSERT_HRESULT_SUCCEEDED(S_FALSE); -#ifdef _WIN32_WCE - const char* expected = - "Expected: (UnexpectedHRESULTFailure()) succeeds.\n" - " Actual: 0x8000FFFF"; -#else // Windows proper - const char* expected = - "Expected: (UnexpectedHRESULTFailure()) succeeds.\n" - " Actual: 0x8000FFFF Catastrophic failure"; -#endif // _WIN32_WCE - EXPECT_FATAL_FAILURE(ASSERT_HRESULT_SUCCEEDED(UnexpectedHRESULTFailure()), - expected); + "Expected: (UnexpectedHRESULTFailure()) succeeds.\n" + " Actual: 0x8000FFFF"); } TEST(HRESULTAssertionTest, EXPECT_HRESULT_FAILED) { EXPECT_HRESULT_FAILED(E_UNEXPECTED); -#ifdef _WIN32_WCE - const char* expected_success = - "Expected: (OkHRESULTSuccess()) fails.\n" - " Actual: 0x00000000"; - const char* expected_incorrect_function = - "Expected: (FalseHRESULTSuccess()) fails.\n" - " Actual: 0x00000001"; -#else // Windows proper - const char* expected_success = - "Expected: (OkHRESULTSuccess()) fails.\n" - " Actual: 0x00000000 The operation completed successfully"; - const char* expected_incorrect_function = - "Expected: (FalseHRESULTSuccess()) fails.\n" - " Actual: 0x00000001 Incorrect function."; -#endif // _WIN32_WCE - EXPECT_NONFATAL_FAILURE(EXPECT_HRESULT_FAILED(OkHRESULTSuccess()), - expected_success); + "Expected: (OkHRESULTSuccess()) fails.\n" + " Actual: 0x00000000"); EXPECT_NONFATAL_FAILURE(EXPECT_HRESULT_FAILED(FalseHRESULTSuccess()), - expected_incorrect_function); + "Expected: (FalseHRESULTSuccess()) fails.\n" + " Actual: 0x00000001"); } TEST(HRESULTAssertionTest, ASSERT_HRESULT_FAILED) { ASSERT_HRESULT_FAILED(E_UNEXPECTED); -#ifdef _WIN32_WCE - const char* expected_success = - "Expected: (OkHRESULTSuccess()) fails.\n" - " Actual: 0x00000000"; - const char* expected_incorrect_function = - "Expected: (FalseHRESULTSuccess()) fails.\n" - " Actual: 0x00000001"; -#else // Windows proper - const char* expected_success = - "Expected: (OkHRESULTSuccess()) fails.\n" - " Actual: 0x00000000 The operation completed successfully"; - const char* expected_incorrect_function = - "Expected: (FalseHRESULTSuccess()) fails.\n" - " Actual: 0x00000001 Incorrect function."; -#endif // _WIN32_WCE - EXPECT_FATAL_FAILURE(ASSERT_HRESULT_FAILED(OkHRESULTSuccess()), - expected_success); + "Expected: (OkHRESULTSuccess()) fails.\n" + " Actual: 0x00000000"); EXPECT_FATAL_FAILURE(ASSERT_HRESULT_FAILED(FalseHRESULTSuccess()), - expected_incorrect_function); + "Expected: (FalseHRESULTSuccess()) fails.\n" + " Actual: 0x00000001"); } // Tests that streaming to the HRESULT macros works. |