summaryrefslogtreecommitdiffstats
path: root/googlemock/test/gmock-internal-utils_test.cc
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2018-10-09 18:50:26 (GMT)
committerGennadiy Civil <misterg@google.com>2018-10-09 20:25:58 (GMT)
commit7d3b73c85a42811309eac26e5cbe054c40b64785 (patch)
tree589142a210a7bf1ccfd51180586a35c4a6f73b68 /googlemock/test/gmock-internal-utils_test.cc
parent5434989dbd8a15f14f33cbeb9d94801247031c95 (diff)
downloadgoogletest-7d3b73c85a42811309eac26e5cbe054c40b64785.zip
googletest-7d3b73c85a42811309eac26e5cbe054c40b64785.tar.gz
googletest-7d3b73c85a42811309eac26e5cbe054c40b64785.tar.bz2
Unconditionally use std::tuple.
Remove all mention of TR1 tuple and our own implementation of tuple. PiperOrigin-RevId: 216395043
Diffstat (limited to 'googlemock/test/gmock-internal-utils_test.cc')
-rw-r--r--googlemock/test/gmock-internal-utils_test.cc43
1 files changed, 22 insertions, 21 deletions
diff --git a/googlemock/test/gmock-internal-utils_test.cc b/googlemock/test/gmock-internal-utils_test.cc
index 7116e4f..41498f0 100644
--- a/googlemock/test/gmock-internal-utils_test.cc
+++ b/googlemock/test/gmock-internal-utils_test.cc
@@ -308,26 +308,23 @@ TEST(LosslessArithmeticConvertibleTest, FloatingPointToFloatingPoint) {
// Tests the TupleMatches() template function.
TEST(TupleMatchesTest, WorksForSize0) {
- tuple<> matchers;
- tuple<> values;
+ std::tuple<> matchers;
+ std::tuple<> values;
EXPECT_TRUE(TupleMatches(matchers, values));
}
TEST(TupleMatchesTest, WorksForSize1) {
- tuple<Matcher<int> > matchers(Eq(1));
- tuple<int> values1(1),
- values2(2);
+ std::tuple<Matcher<int> > matchers(Eq(1));
+ std::tuple<int> values1(1), values2(2);
EXPECT_TRUE(TupleMatches(matchers, values1));
EXPECT_FALSE(TupleMatches(matchers, values2));
}
TEST(TupleMatchesTest, WorksForSize2) {
- tuple<Matcher<int>, Matcher<char> > matchers(Eq(1), Eq('a'));
- tuple<int, char> values1(1, 'a'),
- values2(1, 'b'),
- values3(2, 'a'),
+ std::tuple<Matcher<int>, Matcher<char> > matchers(Eq(1), Eq('a'));
+ std::tuple<int, char> values1(1, 'a'), values2(1, 'b'), values3(2, 'a'),
values4(2, 'b');
EXPECT_TRUE(TupleMatches(matchers, values1));
@@ -337,10 +334,11 @@ TEST(TupleMatchesTest, WorksForSize2) {
}
TEST(TupleMatchesTest, WorksForSize5) {
- tuple<Matcher<int>, Matcher<char>, Matcher<bool>, Matcher<long>, // NOLINT
- Matcher<std::string> >
+ std::tuple<Matcher<int>, Matcher<char>, Matcher<bool>,
+ Matcher<long>, // NOLINT
+ Matcher<std::string> >
matchers(Eq(1), Eq('a'), Eq(true), Eq(2L), Eq("hi"));
- tuple<int, char, bool, long, std::string> // NOLINT
+ std::tuple<int, char, bool, long, std::string> // NOLINT
values1(1, 'a', true, 2L, "hi"), values2(1, 'a', true, 2L, "hello"),
values3(2, 'a', true, 2L, "hi");
@@ -686,22 +684,25 @@ TEST(StlContainerViewTest, WorksForStaticNativeArray) {
TEST(StlContainerViewTest, WorksForDynamicNativeArray) {
StaticAssertTypeEq<NativeArray<int>,
- StlContainerView<tuple<const int*, size_t> >::type>();
- StaticAssertTypeEq<NativeArray<double>,
- StlContainerView<tuple<linked_ptr<double>, int> >::type>();
+ StlContainerView<std::tuple<const int*, size_t> >::type>();
+ StaticAssertTypeEq<
+ NativeArray<double>,
+ StlContainerView<std::tuple<linked_ptr<double>, int> >::type>();
- StaticAssertTypeEq<const NativeArray<int>,
- StlContainerView<tuple<const int*, int> >::const_reference>();
+ StaticAssertTypeEq<
+ const NativeArray<int>,
+ StlContainerView<std::tuple<const int*, int> >::const_reference>();
int a1[3] = { 0, 1, 2 };
const int* const p1 = a1;
- NativeArray<int> a2 = StlContainerView<tuple<const int*, int> >::
- ConstReference(make_tuple(p1, 3));
+ NativeArray<int> a2 =
+ StlContainerView<std::tuple<const int*, int> >::ConstReference(
+ std::make_tuple(p1, 3));
EXPECT_EQ(3U, a2.size());
EXPECT_EQ(a1, a2.begin());
- const NativeArray<int> a3 = StlContainerView<tuple<int*, size_t> >::
- Copy(make_tuple(static_cast<int*>(a1), 3));
+ const NativeArray<int> a3 = StlContainerView<std::tuple<int*, size_t> >::Copy(
+ std::make_tuple(static_cast<int*>(a1), 3));
ASSERT_EQ(3U, a3.size());
EXPECT_EQ(0, a3.begin()[0]);
EXPECT_EQ(1, a3.begin()[1]);