summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386>2009-03-06 01:21:45 +0000
committerzhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386>2009-03-06 01:21:45 +0000
commit7cce6e6aff5b74c7d3165aafea43a1c981841cc0 (patch)
tree89b392568ba1aaa50e1c77973246abe4eeae838d
parent2ae47f5f76222d53432a10b3566728779910704b (diff)
downloadgooglemock-7cce6e6aff5b74c7d3165aafea43a1c981841cc0.tar.gz
Fixes gmock-port_test on Windows.
git-svn-id: http://googlemock.googlecode.com/svn/trunk@112 8415998a-534a-0410-bf83-d39667b30386
-rw-r--r--test/gmock-port_test.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/gmock-port_test.cc b/test/gmock-port_test.cc
index 5c4b3a5..2e85bcc 100644
--- a/test/gmock-port_test.cc
+++ b/test/gmock-port_test.cc
@@ -69,19 +69,19 @@ TEST(GmockCheckSyntaxTest, WorksWithSwitch) {
TEST(GmockCheckDeathTest, DiesWithCorrectOutputOnFailure) {
const bool a_false_condition = false;
- EXPECT_DEATH(GMOCK_CHECK_(a_false_condition) << "Extra info",
- // MSVC and gcc use different formats to print source
- // file locations. Google Mock's failure messages use
- // the same format as used by the compiler, in order
- // for the IDE to recognize them. Therefore we look
- // for different patterns here depending on the
- // compiler.
+ // MSVC and gcc use different formats to print source file locations.
+ // Google Mock's failure messages use the same format as used by the
+ // compiler, in order for the IDE to recognize them. Therefore we look
+ // for different patterns here depending on the compiler.
+ const char regex[] =
#ifdef _MSC_VER
- "gmock-port_test\\.cc\\([0-9]+\\):"
+ "gmock-port_test\\.cc\\(\\d+\\):"
#else
- "gmock-port_test\\.cc:[0-9]+"
+ "gmock-port_test\\.cc:[0-9]+"
#endif // _MSC_VER
- ".*a_false_condition.*Extra info");
+ ".*a_false_condition.*Extra info";
+
+ EXPECT_DEATH(GMOCK_CHECK_(a_false_condition) << "Extra info", regex);
}
TEST(GmockCheckDeathTest, LivesSilentlyOnSuccess) {