aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock/test/gmock-generated-internal-utils_test.cc
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2018-10-09 14:50:26 -0400
committerGennadiy Civil <misterg@google.com>2018-10-09 16:25:58 -0400
commit7d3b73c85a42811309eac26e5cbe054c40b64785 (patch)
tree589142a210a7bf1ccfd51180586a35c4a6f73b68 /googlemock/test/gmock-generated-internal-utils_test.cc
parent5434989dbd8a15f14f33cbeb9d94801247031c95 (diff)
downloadgoogletest-7d3b73c85a42811309eac26e5cbe054c40b64785.tar.gz
googletest-7d3b73c85a42811309eac26e5cbe054c40b64785.tar.bz2
googletest-7d3b73c85a42811309eac26e5cbe054c40b64785.zip
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-generated-internal-utils_test.cc')
-rw-r--r--googlemock/test/gmock-generated-internal-utils_test.cc40
1 files changed, 21 insertions, 19 deletions
diff --git a/googlemock/test/gmock-generated-internal-utils_test.cc b/googlemock/test/gmock-generated-internal-utils_test.cc
index ae0280fc..965cbaa6 100644
--- a/googlemock/test/gmock-generated-internal-utils_test.cc
+++ b/googlemock/test/gmock-generated-internal-utils_test.cc
@@ -38,7 +38,6 @@
namespace {
-using ::testing::tuple;
using ::testing::Matcher;
using ::testing::internal::CompileAssertTypesEqual;
using ::testing::internal::MatcherTuple;
@@ -48,24 +47,24 @@ using ::testing::internal::IgnoredValue;
// Tests the MatcherTuple template struct.
TEST(MatcherTupleTest, ForSize0) {
- CompileAssertTypesEqual<tuple<>, MatcherTuple<tuple<> >::type>();
+ CompileAssertTypesEqual<std::tuple<>, MatcherTuple<std::tuple<> >::type>();
}
TEST(MatcherTupleTest, ForSize1) {
- CompileAssertTypesEqual<tuple<Matcher<int> >,
- MatcherTuple<tuple<int> >::type>();
+ CompileAssertTypesEqual<std::tuple<Matcher<int> >,
+ MatcherTuple<std::tuple<int> >::type>();
}
TEST(MatcherTupleTest, ForSize2) {
- CompileAssertTypesEqual<tuple<Matcher<int>, Matcher<char> >,
- MatcherTuple<tuple<int, char> >::type>();
+ CompileAssertTypesEqual<std::tuple<Matcher<int>, Matcher<char> >,
+ MatcherTuple<std::tuple<int, char> >::type>();
}
TEST(MatcherTupleTest, ForSize5) {
CompileAssertTypesEqual<
- tuple<Matcher<int>, Matcher<char>, Matcher<bool>, Matcher<double>,
- Matcher<char*> >,
- MatcherTuple<tuple<int, char, bool, double, char*> >::type>();
+ std::tuple<Matcher<int>, Matcher<char>, Matcher<bool>, Matcher<double>,
+ Matcher<char*> >,
+ MatcherTuple<std::tuple<int, char, bool, double, char*> >::type>();
}
// Tests the Function template struct.
@@ -73,8 +72,8 @@ TEST(MatcherTupleTest, ForSize5) {
TEST(FunctionTest, Nullary) {
typedef Function<int()> F; // NOLINT
CompileAssertTypesEqual<int, F::Result>();
- CompileAssertTypesEqual<tuple<>, F::ArgumentTuple>();
- CompileAssertTypesEqual<tuple<>, F::ArgumentMatcherTuple>();
+ CompileAssertTypesEqual<std::tuple<>, F::ArgumentTuple>();
+ CompileAssertTypesEqual<std::tuple<>, F::ArgumentMatcherTuple>();
CompileAssertTypesEqual<void(), F::MakeResultVoid>();
CompileAssertTypesEqual<IgnoredValue(), F::MakeResultIgnoredValue>();
}
@@ -83,8 +82,9 @@ TEST(FunctionTest, Unary) {
typedef Function<int(bool)> F; // NOLINT
CompileAssertTypesEqual<int, F::Result>();
CompileAssertTypesEqual<bool, F::Argument1>();
- CompileAssertTypesEqual<tuple<bool>, F::ArgumentTuple>();
- CompileAssertTypesEqual<tuple<Matcher<bool> >, F::ArgumentMatcherTuple>();
+ CompileAssertTypesEqual<std::tuple<bool>, F::ArgumentTuple>();
+ CompileAssertTypesEqual<std::tuple<Matcher<bool> >,
+ F::ArgumentMatcherTuple>();
CompileAssertTypesEqual<void(bool), F::MakeResultVoid>(); // NOLINT
CompileAssertTypesEqual<IgnoredValue(bool), // NOLINT
F::MakeResultIgnoredValue>();
@@ -95,9 +95,10 @@ TEST(FunctionTest, Binary) {
CompileAssertTypesEqual<int, F::Result>();
CompileAssertTypesEqual<bool, F::Argument1>();
CompileAssertTypesEqual<const long&, F::Argument2>(); // NOLINT
- CompileAssertTypesEqual<tuple<bool, const long&>, F::ArgumentTuple>(); // NOLINT
+ CompileAssertTypesEqual<std::tuple<bool, const long&>, // NOLINT
+ F::ArgumentTuple>();
CompileAssertTypesEqual<
- tuple<Matcher<bool>, Matcher<const long&> >, // NOLINT
+ std::tuple<Matcher<bool>, Matcher<const long&> >, // NOLINT
F::ArgumentMatcherTuple>();
CompileAssertTypesEqual<void(bool, const long&), F::MakeResultVoid>(); // NOLINT
CompileAssertTypesEqual<IgnoredValue(bool, const long&), // NOLINT
@@ -112,11 +113,12 @@ TEST(FunctionTest, LongArgumentList) {
CompileAssertTypesEqual<char*, F::Argument3>();
CompileAssertTypesEqual<int&, F::Argument4>();
CompileAssertTypesEqual<const long&, F::Argument5>(); // NOLINT
- CompileAssertTypesEqual<tuple<bool, int, char*, int&, const long&>, // NOLINT
- F::ArgumentTuple>();
CompileAssertTypesEqual<
- tuple<Matcher<bool>, Matcher<int>, Matcher<char*>, Matcher<int&>,
- Matcher<const long&> >, // NOLINT
+ std::tuple<bool, int, char*, int&, const long&>, // NOLINT
+ F::ArgumentTuple>();
+ CompileAssertTypesEqual<
+ std::tuple<Matcher<bool>, Matcher<int>, Matcher<char*>, Matcher<int&>,
+ Matcher<const long&> >, // NOLINT
F::ArgumentMatcherTuple>();
CompileAssertTypesEqual<void(bool, int, char*, int&, const long&), // NOLINT
F::MakeResultVoid>();