Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
93ad3551
Commit
93ad3551
authored
Mar 06, 2009
by
zhanyong.wan
Browse files
Fixes gmock-port_test on Windows.
parent
6f14769e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
test/gmock-port_test.cc
test/gmock-port_test.cc
+10
-10
No files found.
test/gmock-port_test.cc
View file @
93ad3551
...
@@ -69,19 +69,19 @@ TEST(GmockCheckSyntaxTest, WorksWithSwitch) {
...
@@ -69,19 +69,19 @@ TEST(GmockCheckSyntaxTest, WorksWithSwitch) {
TEST
(
GmockCheckDeathTest
,
DiesWithCorrectOutputOnFailure
)
{
TEST
(
GmockCheckDeathTest
,
DiesWithCorrectOutputOnFailure
)
{
const
bool
a_false_condition
=
false
;
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.
// MSVC and gcc use different formats to print source
// Google Mock's failure messages use the same format as used by the
// file locations. Google Mock's failure messages use
// compiler, in order for the IDE to recognize them. Therefore we look
// the same format as used by the compiler, in order
// for different patterns here depending on the compiler.
// for the IDE to recognize them. Therefore we look
const
char
regex
[]
=
// for different patterns here depending on the
// compiler.
#ifdef _MSC_VER
#ifdef _MSC_VER
"gmock-port_test
\\
.cc
\\
(
[0-9]
+
\\
):"
"gmock-port_test
\\
.cc
\\
(
\\
d
+
\\
):"
#else
#else
"gmock-port_test
\\
.cc:[0-9]+"
"gmock-port_test
\\
.cc:[0-9]+"
#endif // _MSC_VER
#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
)
{
TEST
(
GmockCheckDeathTest
,
LivesSilentlyOnSuccess
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment