summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2023-03-24 00:22:33 -0700
committerCopybara-Service <copybara-worker@google.com>2023-03-24 00:23:16 -0700
commita0ced33ac6df214966bb90ba036e0a5666dca14e (patch)
tree9af00f866611ccace8f4844830dfd1cf00b9cd04
parent6f01e3dc125e82f2d3d87839a8be52f610c732ea (diff)
downloadgoogletest-git-a0ced33ac6df214966bb90ba036e0a5666dca14e.tar.gz
Internal Code Change
PiperOrigin-RevId: 519071084 Change-Id: I6459d60606e93bf658e505544538367508722857
-rw-r--r--googletest/include/gtest/gtest-assertion-result.h4
-rw-r--r--googletest/include/gtest/gtest.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/googletest/include/gtest/gtest-assertion-result.h b/googletest/include/gtest/gtest-assertion-result.h
index addbb59c..62fbea6e 100644
--- a/googletest/include/gtest/gtest-assertion-result.h
+++ b/googletest/include/gtest/gtest-assertion-result.h
@@ -181,7 +181,7 @@ class GTEST_API_ AssertionResult {
// assertion's expectation). When nothing has been streamed into the
// object, returns an empty string.
const char* message() const {
- return message_.get() != nullptr ? message_->c_str() : "";
+ return message_ != nullptr ? message_->c_str() : "";
}
// Deprecated; please use message() instead.
const char* failure_message() const { return message(); }
@@ -204,7 +204,7 @@ class GTEST_API_ AssertionResult {
private:
// Appends the contents of message to 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());
}
diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h
index 04a84f32..e5438268 100644
--- a/googletest/include/gtest/gtest.h
+++ b/googletest/include/gtest/gtest.h
@@ -551,14 +551,14 @@ class GTEST_API_ TestInfo {
// Returns the name of the parameter type, or NULL if this is not a typed
// or a type-parameterized test.
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;
}
// Returns the text representation of the value parameter, or NULL if this
// is not a value-parameterized test.
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;
}
@@ -697,7 +697,7 @@ class GTEST_API_ TestSuite {
// Returns the name of the parameter type, or NULL if this is not a
// type-parameterized test suite.
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;
}