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
a0ced33a
Commit
a0ced33a
authored
Mar 24, 2023
by
Abseil Team
Committed by
Copybara-Service
Mar 24, 2023
Browse files
Internal Code Change
PiperOrigin-RevId: 519071084 Change-Id: I6459d60606e93bf658e505544538367508722857
parent
6f01e3dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
googletest/include/gtest/gtest-assertion-result.h
googletest/include/gtest/gtest-assertion-result.h
+2
-2
googletest/include/gtest/gtest.h
googletest/include/gtest/gtest.h
+3
-3
No files found.
googletest/include/gtest/gtest-assertion-result.h
View file @
a0ced33a
...
@@ -181,7 +181,7 @@ class GTEST_API_ AssertionResult {
...
@@ -181,7 +181,7 @@ class GTEST_API_ AssertionResult {
// assertion's expectation). When nothing has been streamed into the
// assertion's expectation). When nothing has been streamed into the
// object, returns an empty string.
// object, returns an empty string.
const
char
*
message
()
const
{
const
char
*
message
()
const
{
return
message_
.
get
()
!=
nullptr
?
message_
->
c_str
()
:
""
;
return
message_
!=
nullptr
?
message_
->
c_str
()
:
""
;
}
}
// Deprecated; please use message() instead.
// Deprecated; please use message() instead.
const
char
*
failure_message
()
const
{
return
message
();
}
const
char
*
failure_message
()
const
{
return
message
();
}
...
@@ -204,7 +204,7 @@ class GTEST_API_ AssertionResult {
...
@@ -204,7 +204,7 @@ class GTEST_API_ AssertionResult {
private:
private:
// Appends the contents of message to message_.
// Appends the contents of message to message_.
void
AppendMessage
(
const
Message
&
a_message
)
{
void
AppendMessage
(
const
Message
&
a_message
)
{
if
(
message_
.
get
()
==
nullptr
)
message_
.
reset
(
new
::
std
::
string
);
if
(
message_
==
nullptr
)
message_
.
reset
(
new
::
std
::
string
);
message_
->
append
(
a_message
.
GetString
().
c_str
());
message_
->
append
(
a_message
.
GetString
().
c_str
());
}
}
...
...
googletest/include/gtest/gtest.h
View file @
a0ced33a
...
@@ -551,14 +551,14 @@ class GTEST_API_ TestInfo {
...
@@ -551,14 +551,14 @@ class GTEST_API_ TestInfo {
// Returns the name of the parameter type, or NULL if this is not a typed
// Returns the name of the parameter type, or NULL if this is not a typed
// or a type-parameterized test.
// or a type-parameterized test.
const
char
*
type_param
()
const
{
const
char
*
type_param
()
const
{
if
(
type_param_
.
get
()
!=
nullptr
)
return
type_param_
->
c_str
();
if
(
type_param_
!=
nullptr
)
return
type_param_
->
c_str
();
return
nullptr
;
return
nullptr
;
}
}
// Returns the text representation of the value parameter, or NULL if this
// Returns the text representation of the value parameter, or NULL if this
// is not a value-parameterized test.
// is not a value-parameterized test.
const
char
*
value_param
()
const
{
const
char
*
value_param
()
const
{
if
(
value_param_
.
get
()
!=
nullptr
)
return
value_param_
->
c_str
();
if
(
value_param_
!=
nullptr
)
return
value_param_
->
c_str
();
return
nullptr
;
return
nullptr
;
}
}
...
@@ -697,7 +697,7 @@ class GTEST_API_ TestSuite {
...
@@ -697,7 +697,7 @@ class GTEST_API_ TestSuite {
// Returns the name of the parameter type, or NULL if this is not a
// Returns the name of the parameter type, or NULL if this is not a
// type-parameterized test suite.
// type-parameterized test suite.
const
char
*
type_param
()
const
{
const
char
*
type_param
()
const
{
if
(
type_param_
.
get
()
!=
nullptr
)
return
type_param_
->
c_str
();
if
(
type_param_
!=
nullptr
)
return
type_param_
->
c_str
();
return
nullptr
;
return
nullptr
;
}
}
...
...
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