Skip to content

Commit a0ced33

Browse files
Abseil Teamcopybara-github
authored andcommitted
Internal Code Change
PiperOrigin-RevId: 519071084 Change-Id: I6459d60606e93bf658e505544538367508722857
1 parent 6f01e3d commit a0ced33

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

googletest/include/gtest/gtest-assertion-result.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ class GTEST_API_ AssertionResult {
181181
// assertion's expectation). When nothing has been streamed into the
182182
// object, returns an empty string.
183183
const char* message() const {
184-
return message_.get() != nullptr ? message_->c_str() : "";
184+
return message_ != nullptr ? message_->c_str() : "";
185185
}
186186
// Deprecated; please use message() instead.
187187
const char* failure_message() const { return message(); }
@@ -204,7 +204,7 @@ class GTEST_API_ AssertionResult {
204204
private:
205205
// Appends the contents of message to message_.
206206
void AppendMessage(const Message& a_message) {
207-
if (message_.get() == nullptr) message_.reset(new ::std::string);
207+
if (message_ == nullptr) message_.reset(new ::std::string);
208208
message_->append(a_message.GetString().c_str());
209209
}
210210

googletest/include/gtest/gtest.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -551,14 +551,14 @@ class GTEST_API_ TestInfo {
551551
// Returns the name of the parameter type, or NULL if this is not a typed
552552
// or a type-parameterized test.
553553
const char* type_param() const {
554-
if (type_param_.get() != nullptr) return type_param_->c_str();
554+
if (type_param_ != nullptr) return type_param_->c_str();
555555
return nullptr;
556556
}
557557

558558
// Returns the text representation of the value parameter, or NULL if this
559559
// is not a value-parameterized test.
560560
const char* value_param() const {
561-
if (value_param_.get() != nullptr) return value_param_->c_str();
561+
if (value_param_ != nullptr) return value_param_->c_str();
562562
return nullptr;
563563
}
564564

@@ -697,7 +697,7 @@ class GTEST_API_ TestSuite {
697697
// Returns the name of the parameter type, or NULL if this is not a
698698
// type-parameterized test suite.
699699
const char* type_param() const {
700-
if (type_param_.get() != nullptr) return type_param_->c_str();
700+
if (type_param_ != nullptr) return type_param_->c_str();
701701
return nullptr;
702702
}
703703

0 commit comments

Comments
 (0)