Commit ee39a89d authored by shiqian's avatar shiqian
Browse files

Adds suffix 'd' to gtest's libs on Windows. Also fixes gtest_unittest on...

Adds suffix 'd' to gtest's libs on Windows.  Also fixes gtest_unittest on non-English Windows.  By balazs.dan@gmail.com.
parent 36865d8d
Showing with 14 additions and 59 deletions
+14 -59
......@@ -32,7 +32,7 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/gtest.lib"/>
OutputFile="$(OutDir)/gtestd.lib"/>
<Tool
Name="VCMIDLTool"/>
<Tool
......
......@@ -32,7 +32,7 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/$(ProjectName).lib"/>
OutputFile="$(OutDir)/$(ProjectName)d.lib"/>
<Tool
Name="VCMIDLTool"/>
<Tool
......
......@@ -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.
......
Supports Markdown
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