mirror of
https://github.com/google/googletest.git
synced 2024-12-27 10:11:03 +08:00
Adds suffix 'd' to gtest's libs on Windows. Also fixes gtest_unittest on non-English Windows. By balazs.dan@gmail.com.
This commit is contained in:
parent
36865d8d35
commit
ee39a89deb
@ -32,7 +32,7 @@
|
|||||||
Name="VCCustomBuildTool"/>
|
Name="VCCustomBuildTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLibrarianTool"
|
Name="VCLibrarianTool"
|
||||||
OutputFile="$(OutDir)/gtest.lib"/>
|
OutputFile="$(OutDir)/gtestd.lib"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCMIDLTool"/>
|
Name="VCMIDLTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
Name="VCCustomBuildTool"/>
|
Name="VCCustomBuildTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLibrarianTool"
|
Name="VCLibrarianTool"
|
||||||
OutputFile="$(OutDir)/$(ProjectName).lib"/>
|
OutputFile="$(OutDir)/$(ProjectName)d.lib"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCMIDLTool"/>
|
Name="VCMIDLTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -2720,85 +2720,40 @@ TEST(HRESULTAssertionTest, EXPECT_HRESULT_SUCCEEDED) {
|
|||||||
EXPECT_HRESULT_SUCCEEDED(S_OK);
|
EXPECT_HRESULT_SUCCEEDED(S_OK);
|
||||||
EXPECT_HRESULT_SUCCEEDED(S_FALSE);
|
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()),
|
EXPECT_NONFATAL_FAILURE(EXPECT_HRESULT_SUCCEEDED(UnexpectedHRESULTFailure()),
|
||||||
expected);
|
"Expected: (UnexpectedHRESULTFailure()) succeeds.\n"
|
||||||
|
" Actual: 0x8000FFFF");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(HRESULTAssertionTest, ASSERT_HRESULT_SUCCEEDED) {
|
TEST(HRESULTAssertionTest, ASSERT_HRESULT_SUCCEEDED) {
|
||||||
ASSERT_HRESULT_SUCCEEDED(S_OK);
|
ASSERT_HRESULT_SUCCEEDED(S_OK);
|
||||||
ASSERT_HRESULT_SUCCEEDED(S_FALSE);
|
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()),
|
EXPECT_FATAL_FAILURE(ASSERT_HRESULT_SUCCEEDED(UnexpectedHRESULTFailure()),
|
||||||
expected);
|
"Expected: (UnexpectedHRESULTFailure()) succeeds.\n"
|
||||||
|
" Actual: 0x8000FFFF");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(HRESULTAssertionTest, EXPECT_HRESULT_FAILED) {
|
TEST(HRESULTAssertionTest, EXPECT_HRESULT_FAILED) {
|
||||||
EXPECT_HRESULT_FAILED(E_UNEXPECTED);
|
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()),
|
EXPECT_NONFATAL_FAILURE(EXPECT_HRESULT_FAILED(OkHRESULTSuccess()),
|
||||||
expected_success);
|
"Expected: (OkHRESULTSuccess()) fails.\n"
|
||||||
|
" Actual: 0x00000000");
|
||||||
EXPECT_NONFATAL_FAILURE(EXPECT_HRESULT_FAILED(FalseHRESULTSuccess()),
|
EXPECT_NONFATAL_FAILURE(EXPECT_HRESULT_FAILED(FalseHRESULTSuccess()),
|
||||||
expected_incorrect_function);
|
"Expected: (FalseHRESULTSuccess()) fails.\n"
|
||||||
|
" Actual: 0x00000001");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(HRESULTAssertionTest, ASSERT_HRESULT_FAILED) {
|
TEST(HRESULTAssertionTest, ASSERT_HRESULT_FAILED) {
|
||||||
ASSERT_HRESULT_FAILED(E_UNEXPECTED);
|
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()),
|
EXPECT_FATAL_FAILURE(ASSERT_HRESULT_FAILED(OkHRESULTSuccess()),
|
||||||
expected_success);
|
"Expected: (OkHRESULTSuccess()) fails.\n"
|
||||||
|
" Actual: 0x00000000");
|
||||||
EXPECT_FATAL_FAILURE(ASSERT_HRESULT_FAILED(FalseHRESULTSuccess()),
|
EXPECT_FATAL_FAILURE(ASSERT_HRESULT_FAILED(FalseHRESULTSuccess()),
|
||||||
expected_incorrect_function);
|
"Expected: (FalseHRESULTSuccess()) fails.\n"
|
||||||
|
" Actual: 0x00000001");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tests that streaming to the HRESULT macros works.
|
// Tests that streaming to the HRESULT macros works.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user