diff options
author | Ryan Yee <ryee88@gmail.com> | 2018-10-11 01:22:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-11 01:22:25 -0700 |
commit | 4d50ab75a730a9aa237a076ddd1a5d4f9f3aadff (patch) | |
tree | 66405faeaa2a21dc705862d9b77672e0888dff54 /googlemock/test/gmock-internal-utils_test.cc | |
parent | a83429f5d31ad7c48bb0493475f8a77450f03311 (diff) | |
parent | 658c6390a5b363f46c6ad448ad1bce9d6e97e53a (diff) | |
download | googletest-4d50ab75a730a9aa237a076ddd1a5d4f9f3aadff.tar.gz googletest-4d50ab75a730a9aa237a076ddd1a5d4f9f3aadff.tar.bz2 googletest-4d50ab75a730a9aa237a076ddd1a5d4f9f3aadff.zip |
Merge branch 'master' into typo
Diffstat (limited to 'googlemock/test/gmock-internal-utils_test.cc')
-rw-r--r-- | googlemock/test/gmock-internal-utils_test.cc | 43 |
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 7116e4fc..41498f0e 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]); |