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
c40f55a2
Commit
c40f55a2
authored
Sep 15, 2018
by
Jonny007-MKD
Browse files
Avoid these ambiguities
parent
6494f523
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
googletest/include/gtest/internal/gtest-internal.h
googletest/include/gtest/internal/gtest-internal.h
+8
-8
No files found.
googletest/include/gtest/internal/gtest-internal.h
View file @
c40f55a2
...
@@ -1193,7 +1193,7 @@ class AdditionalMessage
...
@@ -1193,7 +1193,7 @@ class AdditionalMessage
{
{
public:
public:
AdditionalMessage
(
const
char
*
message
)
:
value
(
message
)
{}
AdditionalMessage
(
const
char
*
message
)
:
value
(
message
)
{}
AdditionalMessage
&
operator
=
(
const
std
::
string
&
message
)
{
value
=
message
;
return
*
this
;
}
void
set
(
const
std
::
string
&
message
)
{
value
=
message
;
}
operator
bool
()
const
{
return
true
;
}
operator
bool
()
const
{
return
true
;
}
const
std
::
string
&
get
()
const
{
return
value
;
}
const
std
::
string
&
get
()
const
{
return
value
;
}
...
@@ -1242,22 +1242,22 @@ private:
...
@@ -1242,22 +1242,22 @@ private:
} \
} \
catch (const std::exception& e) { \
catch (const std::exception& e) { \
if (!gtest_caught_expected) { \
if (!gtest_caught_expected) { \
message
=
\
message
.set(
\
"it throws a different type " \
"it throws a different type " \
"with message: " + std::string(e.what()); \
"with message: " + std::string(e.what())
)
; \
goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \
goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \
} \
} \
} \
} \
catch (...) { \
catch (...) { \
if (!gtest_caught_expected) { \
if (!gtest_caught_expected) { \
message
=
\
message
.set(
\
"it throws a different type."; \
"it throws a different type."
)
; \
goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \
goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \
} \
} \
} \
} \
if (!gtest_caught_expected) { \
if (!gtest_caught_expected) { \
message
=
\
message
.set(
\
"it throws nothing."; \
"it throws nothing."
)
; \
goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \
goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \
} \
} \
} else \
} else \
...
@@ -1272,7 +1272,7 @@ private:
...
@@ -1272,7 +1272,7 @@ private:
GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
} \
} \
catch (const std::exception& e) { \
catch (const std::exception& e) { \
message
=
std::string(": ") + e.what(); \
message
.set(
std::string(": ") + e.what()
)
; \
goto GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__); \
goto GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__); \
} \
} \
catch (...) { \
catch (...) { \
...
...
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