summaryrefslogtreecommitdiffstats
path: root/googlemock/test/gmock-actions_test.cc
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2019-01-12 17:26:37 (GMT)
committerGennadiy Civil <misterg@google.com>2019-01-14 22:01:56 (GMT)
commit097407fd3cfb4d1e5f89ae242635b1f321b222bb (patch)
treecf83f668a3026f5cab2dede77d834ad177550c63 /googlemock/test/gmock-actions_test.cc
parent0599a7b8410dc5cfdb477900b280475ae775d7f9 (diff)
downloadgoogletest-097407fd3cfb4d1e5f89ae242635b1f321b222bb.zip
googletest-097407fd3cfb4d1e5f89ae242635b1f321b222bb.tar.gz
googletest-097407fd3cfb4d1e5f89ae242635b1f321b222bb.tar.bz2
Googletest export
Deduplicate testing::ReferenceWrapper with std::reference_wrapper. Minor cleanups in matchers_test. PiperOrigin-RevId: 229022872
Diffstat (limited to 'googlemock/test/gmock-actions_test.cc')
-rw-r--r--googlemock/test/gmock-actions_test.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/googlemock/test/gmock-actions_test.cc b/googlemock/test/gmock-actions_test.cc
index f918410..77280f4 100644
--- a/googlemock/test/gmock-actions_test.cc
+++ b/googlemock/test/gmock-actions_test.cc
@@ -1164,13 +1164,12 @@ TEST_F(SetErrnoAndReturnTest, CompatibleTypes) {
// Tests ByRef().
-// Tests that ReferenceWrapper<T> is copyable.
+// Tests that the result of ByRef() is copyable.
TEST(ByRefTest, IsCopyable) {
const std::string s1 = "Hi";
const std::string s2 = "Hello";
- ::testing::internal::ReferenceWrapper<const std::string> ref_wrapper =
- ByRef(s1);
+ auto ref_wrapper = ByRef(s1);
const std::string& r1 = ref_wrapper;
EXPECT_EQ(&s1, &r1);
@@ -1179,8 +1178,7 @@ TEST(ByRefTest, IsCopyable) {
const std::string& r2 = ref_wrapper;
EXPECT_EQ(&s2, &r2);
- ::testing::internal::ReferenceWrapper<const std::string> ref_wrapper1 =
- ByRef(s1);
+ auto ref_wrapper1 = ByRef(s1);
// Copies ref_wrapper1 to ref_wrapper.
ref_wrapper = ref_wrapper1;
const std::string& r3 = ref_wrapper;