Export tuple and friends in the ::testing namespace.
This commit is contained in:
parent
15d61e42bd
commit
bd0188320d
|
@ -728,7 +728,7 @@ class SetArgumentPointeeAction {
|
|||
template <typename Result, typename ArgumentTuple>
|
||||
void Perform(const ArgumentTuple& args) const {
|
||||
CompileAssertTypesEqual<void, Result>();
|
||||
*::std::tr1::get<N>(args) = value_;
|
||||
*::testing::get<N>(args) = value_;
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -751,7 +751,7 @@ class SetArgumentPointeeAction<N, Proto, true> {
|
|||
template <typename Result, typename ArgumentTuple>
|
||||
void Perform(const ArgumentTuple& args) const {
|
||||
CompileAssertTypesEqual<void, Result>();
|
||||
::std::tr1::get<N>(args)->CopyFrom(*proto_);
|
||||
::testing::get<N>(args)->CopyFrom(*proto_);
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
@ -51,234 +51,219 @@ template <typename Result, typename ArgumentTuple>
|
|||
class InvokeHelper;
|
||||
|
||||
template <typename R>
|
||||
class InvokeHelper<R, ::std::tr1::tuple<> > {
|
||||
class InvokeHelper<R, ::testing::tuple<> > {
|
||||
public:
|
||||
template <typename Function>
|
||||
static R Invoke(Function function, const ::std::tr1::tuple<>&) {
|
||||
static R Invoke(Function function, const ::testing::tuple<>&) {
|
||||
return function();
|
||||
}
|
||||
|
||||
template <class Class, typename MethodPtr>
|
||||
static R InvokeMethod(Class* obj_ptr,
|
||||
MethodPtr method_ptr,
|
||||
const ::std::tr1::tuple<>&) {
|
||||
const ::testing::tuple<>&) {
|
||||
return (obj_ptr->*method_ptr)();
|
||||
}
|
||||
};
|
||||
|
||||
template <typename R, typename A1>
|
||||
class InvokeHelper<R, ::std::tr1::tuple<A1> > {
|
||||
class InvokeHelper<R, ::testing::tuple<A1> > {
|
||||
public:
|
||||
template <typename Function>
|
||||
static R Invoke(Function function, const ::std::tr1::tuple<A1>& args) {
|
||||
using ::std::tr1::get;
|
||||
static R Invoke(Function function, const ::testing::tuple<A1>& args) {
|
||||
return function(get<0>(args));
|
||||
}
|
||||
|
||||
template <class Class, typename MethodPtr>
|
||||
static R InvokeMethod(Class* obj_ptr,
|
||||
MethodPtr method_ptr,
|
||||
const ::std::tr1::tuple<A1>& args) {
|
||||
using ::std::tr1::get;
|
||||
const ::testing::tuple<A1>& args) {
|
||||
return (obj_ptr->*method_ptr)(get<0>(args));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename R, typename A1, typename A2>
|
||||
class InvokeHelper<R, ::std::tr1::tuple<A1, A2> > {
|
||||
class InvokeHelper<R, ::testing::tuple<A1, A2> > {
|
||||
public:
|
||||
template <typename Function>
|
||||
static R Invoke(Function function, const ::std::tr1::tuple<A1, A2>& args) {
|
||||
using ::std::tr1::get;
|
||||
static R Invoke(Function function, const ::testing::tuple<A1, A2>& args) {
|
||||
return function(get<0>(args), get<1>(args));
|
||||
}
|
||||
|
||||
template <class Class, typename MethodPtr>
|
||||
static R InvokeMethod(Class* obj_ptr,
|
||||
MethodPtr method_ptr,
|
||||
const ::std::tr1::tuple<A1, A2>& args) {
|
||||
using ::std::tr1::get;
|
||||
const ::testing::tuple<A1, A2>& args) {
|
||||
return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename R, typename A1, typename A2, typename A3>
|
||||
class InvokeHelper<R, ::std::tr1::tuple<A1, A2, A3> > {
|
||||
class InvokeHelper<R, ::testing::tuple<A1, A2, A3> > {
|
||||
public:
|
||||
template <typename Function>
|
||||
static R Invoke(Function function, const ::std::tr1::tuple<A1, A2,
|
||||
A3>& args) {
|
||||
using ::std::tr1::get;
|
||||
static R Invoke(Function function, const ::testing::tuple<A1, A2, A3>& args) {
|
||||
return function(get<0>(args), get<1>(args), get<2>(args));
|
||||
}
|
||||
|
||||
template <class Class, typename MethodPtr>
|
||||
static R InvokeMethod(Class* obj_ptr,
|
||||
MethodPtr method_ptr,
|
||||
const ::std::tr1::tuple<A1, A2, A3>& args) {
|
||||
using ::std::tr1::get;
|
||||
return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args));
|
||||
const ::testing::tuple<A1, A2, A3>& args) {
|
||||
return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
|
||||
get<2>(args));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename R, typename A1, typename A2, typename A3, typename A4>
|
||||
class InvokeHelper<R, ::std::tr1::tuple<A1, A2, A3, A4> > {
|
||||
class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4> > {
|
||||
public:
|
||||
template <typename Function>
|
||||
static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3,
|
||||
static R Invoke(Function function, const ::testing::tuple<A1, A2, A3,
|
||||
A4>& args) {
|
||||
using ::std::tr1::get;
|
||||
return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args));
|
||||
return function(get<0>(args), get<1>(args), get<2>(args),
|
||||
get<3>(args));
|
||||
}
|
||||
|
||||
template <class Class, typename MethodPtr>
|
||||
static R InvokeMethod(Class* obj_ptr,
|
||||
MethodPtr method_ptr,
|
||||
const ::std::tr1::tuple<A1, A2, A3, A4>& args) {
|
||||
using ::std::tr1::get;
|
||||
return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args),
|
||||
get<3>(args));
|
||||
const ::testing::tuple<A1, A2, A3, A4>& args) {
|
||||
return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
|
||||
get<2>(args), get<3>(args));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename R, typename A1, typename A2, typename A3, typename A4,
|
||||
typename A5>
|
||||
class InvokeHelper<R, ::std::tr1::tuple<A1, A2, A3, A4, A5> > {
|
||||
class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5> > {
|
||||
public:
|
||||
template <typename Function>
|
||||
static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4,
|
||||
static R Invoke(Function function, const ::testing::tuple<A1, A2, A3, A4,
|
||||
A5>& args) {
|
||||
using ::std::tr1::get;
|
||||
return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args),
|
||||
get<4>(args));
|
||||
return function(get<0>(args), get<1>(args), get<2>(args),
|
||||
get<3>(args), get<4>(args));
|
||||
}
|
||||
|
||||
template <class Class, typename MethodPtr>
|
||||
static R InvokeMethod(Class* obj_ptr,
|
||||
MethodPtr method_ptr,
|
||||
const ::std::tr1::tuple<A1, A2, A3, A4, A5>& args) {
|
||||
using ::std::tr1::get;
|
||||
return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args),
|
||||
get<3>(args), get<4>(args));
|
||||
const ::testing::tuple<A1, A2, A3, A4, A5>& args) {
|
||||
return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
|
||||
get<2>(args), get<3>(args), get<4>(args));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename R, typename A1, typename A2, typename A3, typename A4,
|
||||
typename A5, typename A6>
|
||||
class InvokeHelper<R, ::std::tr1::tuple<A1, A2, A3, A4, A5, A6> > {
|
||||
class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6> > {
|
||||
public:
|
||||
template <typename Function>
|
||||
static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4,
|
||||
A5, A6>& args) {
|
||||
using ::std::tr1::get;
|
||||
return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args),
|
||||
get<4>(args), get<5>(args));
|
||||
static R Invoke(Function function, const ::testing::tuple<A1, A2, A3, A4, A5,
|
||||
A6>& args) {
|
||||
return function(get<0>(args), get<1>(args), get<2>(args),
|
||||
get<3>(args), get<4>(args), get<5>(args));
|
||||
}
|
||||
|
||||
template <class Class, typename MethodPtr>
|
||||
static R InvokeMethod(Class* obj_ptr,
|
||||
MethodPtr method_ptr,
|
||||
const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6>& args) {
|
||||
using ::std::tr1::get;
|
||||
return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args),
|
||||
get<3>(args), get<4>(args), get<5>(args));
|
||||
const ::testing::tuple<A1, A2, A3, A4, A5, A6>& args) {
|
||||
return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
|
||||
get<2>(args), get<3>(args), get<4>(args), get<5>(args));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename R, typename A1, typename A2, typename A3, typename A4,
|
||||
typename A5, typename A6, typename A7>
|
||||
class InvokeHelper<R, ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7> > {
|
||||
class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6, A7> > {
|
||||
public:
|
||||
template <typename Function>
|
||||
static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4,
|
||||
A5, A6, A7>& args) {
|
||||
using ::std::tr1::get;
|
||||
return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args),
|
||||
get<4>(args), get<5>(args), get<6>(args));
|
||||
static R Invoke(Function function, const ::testing::tuple<A1, A2, A3, A4, A5,
|
||||
A6, A7>& args) {
|
||||
return function(get<0>(args), get<1>(args), get<2>(args),
|
||||
get<3>(args), get<4>(args), get<5>(args), get<6>(args));
|
||||
}
|
||||
|
||||
template <class Class, typename MethodPtr>
|
||||
static R InvokeMethod(Class* obj_ptr,
|
||||
MethodPtr method_ptr,
|
||||
const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6,
|
||||
const ::testing::tuple<A1, A2, A3, A4, A5, A6,
|
||||
A7>& args) {
|
||||
using ::std::tr1::get;
|
||||
return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args),
|
||||
get<3>(args), get<4>(args), get<5>(args), get<6>(args));
|
||||
return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
|
||||
get<2>(args), get<3>(args), get<4>(args), get<5>(args),
|
||||
get<6>(args));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename R, typename A1, typename A2, typename A3, typename A4,
|
||||
typename A5, typename A6, typename A7, typename A8>
|
||||
class InvokeHelper<R, ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8> > {
|
||||
class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8> > {
|
||||
public:
|
||||
template <typename Function>
|
||||
static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4,
|
||||
A5, A6, A7, A8>& args) {
|
||||
using ::std::tr1::get;
|
||||
return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args),
|
||||
get<4>(args), get<5>(args), get<6>(args), get<7>(args));
|
||||
static R Invoke(Function function, const ::testing::tuple<A1, A2, A3, A4, A5,
|
||||
A6, A7, A8>& args) {
|
||||
return function(get<0>(args), get<1>(args), get<2>(args),
|
||||
get<3>(args), get<4>(args), get<5>(args), get<6>(args),
|
||||
get<7>(args));
|
||||
}
|
||||
|
||||
template <class Class, typename MethodPtr>
|
||||
static R InvokeMethod(Class* obj_ptr,
|
||||
MethodPtr method_ptr,
|
||||
const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7,
|
||||
const ::testing::tuple<A1, A2, A3, A4, A5, A6, A7,
|
||||
A8>& args) {
|
||||
using ::std::tr1::get;
|
||||
return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args),
|
||||
get<3>(args), get<4>(args), get<5>(args), get<6>(args), get<7>(args));
|
||||
return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
|
||||
get<2>(args), get<3>(args), get<4>(args), get<5>(args),
|
||||
get<6>(args), get<7>(args));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename R, typename A1, typename A2, typename A3, typename A4,
|
||||
typename A5, typename A6, typename A7, typename A8, typename A9>
|
||||
class InvokeHelper<R, ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9> > {
|
||||
class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9> > {
|
||||
public:
|
||||
template <typename Function>
|
||||
static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4,
|
||||
A5, A6, A7, A8, A9>& args) {
|
||||
using ::std::tr1::get;
|
||||
return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args),
|
||||
get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args));
|
||||
static R Invoke(Function function, const ::testing::tuple<A1, A2, A3, A4, A5,
|
||||
A6, A7, A8, A9>& args) {
|
||||
return function(get<0>(args), get<1>(args), get<2>(args),
|
||||
get<3>(args), get<4>(args), get<5>(args), get<6>(args),
|
||||
get<7>(args), get<8>(args));
|
||||
}
|
||||
|
||||
template <class Class, typename MethodPtr>
|
||||
static R InvokeMethod(Class* obj_ptr,
|
||||
MethodPtr method_ptr,
|
||||
const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8,
|
||||
const ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8,
|
||||
A9>& args) {
|
||||
using ::std::tr1::get;
|
||||
return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args),
|
||||
get<3>(args), get<4>(args), get<5>(args), get<6>(args), get<7>(args),
|
||||
get<8>(args));
|
||||
return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
|
||||
get<2>(args), get<3>(args), get<4>(args), get<5>(args),
|
||||
get<6>(args), get<7>(args), get<8>(args));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename R, typename A1, typename A2, typename A3, typename A4,
|
||||
typename A5, typename A6, typename A7, typename A8, typename A9,
|
||||
typename A10>
|
||||
class InvokeHelper<R, ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9,
|
||||
class InvokeHelper<R, ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9,
|
||||
A10> > {
|
||||
public:
|
||||
template <typename Function>
|
||||
static R Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4,
|
||||
A5, A6, A7, A8, A9, A10>& args) {
|
||||
using ::std::tr1::get;
|
||||
return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args),
|
||||
get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args),
|
||||
get<9>(args));
|
||||
static R Invoke(Function function, const ::testing::tuple<A1, A2, A3, A4, A5,
|
||||
A6, A7, A8, A9, A10>& args) {
|
||||
return function(get<0>(args), get<1>(args), get<2>(args),
|
||||
get<3>(args), get<4>(args), get<5>(args), get<6>(args),
|
||||
get<7>(args), get<8>(args), get<9>(args));
|
||||
}
|
||||
|
||||
template <class Class, typename MethodPtr>
|
||||
static R InvokeMethod(Class* obj_ptr,
|
||||
MethodPtr method_ptr,
|
||||
const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8,
|
||||
const ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8,
|
||||
A9, A10>& args) {
|
||||
using ::std::tr1::get;
|
||||
return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args),
|
||||
get<3>(args), get<4>(args), get<5>(args), get<6>(args), get<7>(args),
|
||||
get<8>(args), get<9>(args));
|
||||
return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args),
|
||||
get<2>(args), get<3>(args), get<4>(args), get<5>(args),
|
||||
get<6>(args), get<7>(args), get<8>(args), get<9>(args));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -386,21 +371,21 @@ class CallableHelper {
|
|||
// An INTERNAL macro for extracting the type of a tuple field. It's
|
||||
// subject to change without notice - DO NOT USE IN USER CODE!
|
||||
#define GMOCK_FIELD_(Tuple, N) \
|
||||
typename ::std::tr1::tuple_element<N, Tuple>::type
|
||||
typename ::testing::tuple_element<N, Tuple>::type
|
||||
|
||||
// SelectArgs<Result, ArgumentTuple, k1, k2, ..., k_n>::type is the
|
||||
// type of an n-ary function whose i-th (1-based) argument type is the
|
||||
// k{i}-th (0-based) field of ArgumentTuple, which must be a tuple
|
||||
// type, and whose return type is Result. For example,
|
||||
// SelectArgs<int, ::std::tr1::tuple<bool, char, double, long>, 0, 3>::type
|
||||
// SelectArgs<int, ::testing::tuple<bool, char, double, long>, 0, 3>::type
|
||||
// is int(bool, long).
|
||||
//
|
||||
// SelectArgs<Result, ArgumentTuple, k1, k2, ..., k_n>::Select(args)
|
||||
// returns the selected fields (k1, k2, ..., k_n) of args as a tuple.
|
||||
// For example,
|
||||
// SelectArgs<int, ::std::tr1::tuple<bool, char, double>, 2, 0>::Select(
|
||||
// ::std::tr1::make_tuple(true, 'a', 2.5))
|
||||
// returns ::std::tr1::tuple (2.5, true).
|
||||
// SelectArgs<int, tuple<bool, char, double>, 2, 0>::Select(
|
||||
// ::testing::make_tuple(true, 'a', 2.5))
|
||||
// returns tuple (2.5, true).
|
||||
//
|
||||
// The numbers in list k1, k2, ..., k_n must be >= 0, where n can be
|
||||
// in the range [0, 10]. Duplicates are allowed and they don't have
|
||||
|
@ -418,7 +403,6 @@ class SelectArgs {
|
|||
GMOCK_FIELD_(ArgumentTuple, k10));
|
||||
typedef typename Function<type>::ArgumentTuple SelectedArgs;
|
||||
static SelectedArgs Select(const ArgumentTuple& args) {
|
||||
using ::std::tr1::get;
|
||||
return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
|
||||
get<k4>(args), get<k5>(args), get<k6>(args), get<k7>(args),
|
||||
get<k8>(args), get<k9>(args), get<k10>(args));
|
||||
|
@ -432,7 +416,6 @@ class SelectArgs<Result, ArgumentTuple,
|
|||
typedef Result type();
|
||||
typedef typename Function<type>::ArgumentTuple SelectedArgs;
|
||||
static SelectedArgs Select(const ArgumentTuple& /* args */) {
|
||||
using ::std::tr1::get;
|
||||
return SelectedArgs();
|
||||
}
|
||||
};
|
||||
|
@ -444,7 +427,6 @@ class SelectArgs<Result, ArgumentTuple,
|
|||
typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1));
|
||||
typedef typename Function<type>::ArgumentTuple SelectedArgs;
|
||||
static SelectedArgs Select(const ArgumentTuple& args) {
|
||||
using ::std::tr1::get;
|
||||
return SelectedArgs(get<k1>(args));
|
||||
}
|
||||
};
|
||||
|
@ -457,7 +439,6 @@ class SelectArgs<Result, ArgumentTuple,
|
|||
GMOCK_FIELD_(ArgumentTuple, k2));
|
||||
typedef typename Function<type>::ArgumentTuple SelectedArgs;
|
||||
static SelectedArgs Select(const ArgumentTuple& args) {
|
||||
using ::std::tr1::get;
|
||||
return SelectedArgs(get<k1>(args), get<k2>(args));
|
||||
}
|
||||
};
|
||||
|
@ -470,7 +451,6 @@ class SelectArgs<Result, ArgumentTuple,
|
|||
GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3));
|
||||
typedef typename Function<type>::ArgumentTuple SelectedArgs;
|
||||
static SelectedArgs Select(const ArgumentTuple& args) {
|
||||
using ::std::tr1::get;
|
||||
return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args));
|
||||
}
|
||||
};
|
||||
|
@ -485,7 +465,6 @@ class SelectArgs<Result, ArgumentTuple,
|
|||
GMOCK_FIELD_(ArgumentTuple, k4));
|
||||
typedef typename Function<type>::ArgumentTuple SelectedArgs;
|
||||
static SelectedArgs Select(const ArgumentTuple& args) {
|
||||
using ::std::tr1::get;
|
||||
return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
|
||||
get<k4>(args));
|
||||
}
|
||||
|
@ -501,7 +480,6 @@ class SelectArgs<Result, ArgumentTuple,
|
|||
GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5));
|
||||
typedef typename Function<type>::ArgumentTuple SelectedArgs;
|
||||
static SelectedArgs Select(const ArgumentTuple& args) {
|
||||
using ::std::tr1::get;
|
||||
return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
|
||||
get<k4>(args), get<k5>(args));
|
||||
}
|
||||
|
@ -518,7 +496,6 @@ class SelectArgs<Result, ArgumentTuple,
|
|||
GMOCK_FIELD_(ArgumentTuple, k6));
|
||||
typedef typename Function<type>::ArgumentTuple SelectedArgs;
|
||||
static SelectedArgs Select(const ArgumentTuple& args) {
|
||||
using ::std::tr1::get;
|
||||
return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
|
||||
get<k4>(args), get<k5>(args), get<k6>(args));
|
||||
}
|
||||
|
@ -535,7 +512,6 @@ class SelectArgs<Result, ArgumentTuple,
|
|||
GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7));
|
||||
typedef typename Function<type>::ArgumentTuple SelectedArgs;
|
||||
static SelectedArgs Select(const ArgumentTuple& args) {
|
||||
using ::std::tr1::get;
|
||||
return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
|
||||
get<k4>(args), get<k5>(args), get<k6>(args), get<k7>(args));
|
||||
}
|
||||
|
@ -553,7 +529,6 @@ class SelectArgs<Result, ArgumentTuple,
|
|||
GMOCK_FIELD_(ArgumentTuple, k8));
|
||||
typedef typename Function<type>::ArgumentTuple SelectedArgs;
|
||||
static SelectedArgs Select(const ArgumentTuple& args) {
|
||||
using ::std::tr1::get;
|
||||
return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
|
||||
get<k4>(args), get<k5>(args), get<k6>(args), get<k7>(args),
|
||||
get<k8>(args));
|
||||
|
@ -572,7 +547,6 @@ class SelectArgs<Result, ArgumentTuple,
|
|||
GMOCK_FIELD_(ArgumentTuple, k8), GMOCK_FIELD_(ArgumentTuple, k9));
|
||||
typedef typename Function<type>::ArgumentTuple SelectedArgs;
|
||||
static SelectedArgs Select(const ArgumentTuple& args) {
|
||||
using ::std::tr1::get;
|
||||
return SelectedArgs(get<k1>(args), get<k2>(args), get<k3>(args),
|
||||
get<k4>(args), get<k5>(args), get<k6>(args), get<k7>(args),
|
||||
get<k8>(args), get<k9>(args));
|
||||
|
@ -638,8 +612,7 @@ struct ExcessiveArg {};
|
|||
template <typename Result, class Impl>
|
||||
class ActionHelper {
|
||||
public:
|
||||
static Result Perform(Impl* impl, const ::std::tr1::tuple<>& args) {
|
||||
using ::std::tr1::get;
|
||||
static Result Perform(Impl* impl, const ::testing::tuple<>& args) {
|
||||
return impl->template gmock_PerformImpl<>(args, ExcessiveArg(),
|
||||
ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
|
||||
ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
|
||||
|
@ -647,8 +620,7 @@ class ActionHelper {
|
|||
}
|
||||
|
||||
template <typename A0>
|
||||
static Result Perform(Impl* impl, const ::std::tr1::tuple<A0>& args) {
|
||||
using ::std::tr1::get;
|
||||
static Result Perform(Impl* impl, const ::testing::tuple<A0>& args) {
|
||||
return impl->template gmock_PerformImpl<A0>(args, get<0>(args),
|
||||
ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
|
||||
ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
|
||||
|
@ -656,8 +628,7 @@ class ActionHelper {
|
|||
}
|
||||
|
||||
template <typename A0, typename A1>
|
||||
static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1>& args) {
|
||||
using ::std::tr1::get;
|
||||
static Result Perform(Impl* impl, const ::testing::tuple<A0, A1>& args) {
|
||||
return impl->template gmock_PerformImpl<A0, A1>(args, get<0>(args),
|
||||
get<1>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
|
||||
ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
|
||||
|
@ -665,8 +636,7 @@ class ActionHelper {
|
|||
}
|
||||
|
||||
template <typename A0, typename A1, typename A2>
|
||||
static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2>& args) {
|
||||
using ::std::tr1::get;
|
||||
static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2>& args) {
|
||||
return impl->template gmock_PerformImpl<A0, A1, A2>(args, get<0>(args),
|
||||
get<1>(args), get<2>(args), ExcessiveArg(), ExcessiveArg(),
|
||||
ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
|
||||
|
@ -674,9 +644,8 @@ class ActionHelper {
|
|||
}
|
||||
|
||||
template <typename A0, typename A1, typename A2, typename A3>
|
||||
static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2,
|
||||
static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2,
|
||||
A3>& args) {
|
||||
using ::std::tr1::get;
|
||||
return impl->template gmock_PerformImpl<A0, A1, A2, A3>(args, get<0>(args),
|
||||
get<1>(args), get<2>(args), get<3>(args), ExcessiveArg(),
|
||||
ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
|
||||
|
@ -684,9 +653,8 @@ class ActionHelper {
|
|||
}
|
||||
|
||||
template <typename A0, typename A1, typename A2, typename A3, typename A4>
|
||||
static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3,
|
||||
static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2, A3,
|
||||
A4>& args) {
|
||||
using ::std::tr1::get;
|
||||
return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4>(args,
|
||||
get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args),
|
||||
ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
|
||||
|
@ -695,9 +663,8 @@ class ActionHelper {
|
|||
|
||||
template <typename A0, typename A1, typename A2, typename A3, typename A4,
|
||||
typename A5>
|
||||
static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3, A4,
|
||||
static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2, A3, A4,
|
||||
A5>& args) {
|
||||
using ::std::tr1::get;
|
||||
return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5>(args,
|
||||
get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args),
|
||||
get<5>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(),
|
||||
|
@ -706,9 +673,8 @@ class ActionHelper {
|
|||
|
||||
template <typename A0, typename A1, typename A2, typename A3, typename A4,
|
||||
typename A5, typename A6>
|
||||
static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3, A4,
|
||||
static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2, A3, A4,
|
||||
A5, A6>& args) {
|
||||
using ::std::tr1::get;
|
||||
return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6>(args,
|
||||
get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args),
|
||||
get<5>(args), get<6>(args), ExcessiveArg(), ExcessiveArg(),
|
||||
|
@ -717,9 +683,8 @@ class ActionHelper {
|
|||
|
||||
template <typename A0, typename A1, typename A2, typename A3, typename A4,
|
||||
typename A5, typename A6, typename A7>
|
||||
static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3, A4,
|
||||
static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2, A3, A4,
|
||||
A5, A6, A7>& args) {
|
||||
using ::std::tr1::get;
|
||||
return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6,
|
||||
A7>(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args),
|
||||
get<4>(args), get<5>(args), get<6>(args), get<7>(args), ExcessiveArg(),
|
||||
|
@ -728,9 +693,8 @@ class ActionHelper {
|
|||
|
||||
template <typename A0, typename A1, typename A2, typename A3, typename A4,
|
||||
typename A5, typename A6, typename A7, typename A8>
|
||||
static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3, A4,
|
||||
static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2, A3, A4,
|
||||
A5, A6, A7, A8>& args) {
|
||||
using ::std::tr1::get;
|
||||
return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6, A7,
|
||||
A8>(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args),
|
||||
get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args),
|
||||
|
@ -739,9 +703,8 @@ class ActionHelper {
|
|||
|
||||
template <typename A0, typename A1, typename A2, typename A3, typename A4,
|
||||
typename A5, typename A6, typename A7, typename A8, typename A9>
|
||||
static Result Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3, A4,
|
||||
static Result Perform(Impl* impl, const ::testing::tuple<A0, A1, A2, A3, A4,
|
||||
A5, A6, A7, A8, A9>& args) {
|
||||
using ::std::tr1::get;
|
||||
return impl->template gmock_PerformImpl<A0, A1, A2, A3, A4, A5, A6, A7, A8,
|
||||
A9>(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args),
|
||||
get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args),
|
||||
|
@ -1053,7 +1016,7 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6,
|
|||
// ACTION_TEMPLATE(DuplicateArg,
|
||||
// HAS_2_TEMPLATE_PARAMS(int, k, typename, T),
|
||||
// AND_1_VALUE_PARAMS(output)) {
|
||||
// *output = T(std::tr1::get<k>(args));
|
||||
// *output = T(::testing::get<k>(args));
|
||||
// }
|
||||
// ...
|
||||
// int n;
|
||||
|
@ -2262,77 +2225,77 @@ ACTION_TEMPLATE(InvokeArgument,
|
|||
HAS_1_TEMPLATE_PARAMS(int, k),
|
||||
AND_0_VALUE_PARAMS()) {
|
||||
return internal::CallableHelper<return_type>::Call(
|
||||
::std::tr1::get<k>(args));
|
||||
::testing::get<k>(args));
|
||||
}
|
||||
|
||||
ACTION_TEMPLATE(InvokeArgument,
|
||||
HAS_1_TEMPLATE_PARAMS(int, k),
|
||||
AND_1_VALUE_PARAMS(p0)) {
|
||||
return internal::CallableHelper<return_type>::Call(
|
||||
::std::tr1::get<k>(args), p0);
|
||||
::testing::get<k>(args), p0);
|
||||
}
|
||||
|
||||
ACTION_TEMPLATE(InvokeArgument,
|
||||
HAS_1_TEMPLATE_PARAMS(int, k),
|
||||
AND_2_VALUE_PARAMS(p0, p1)) {
|
||||
return internal::CallableHelper<return_type>::Call(
|
||||
::std::tr1::get<k>(args), p0, p1);
|
||||
::testing::get<k>(args), p0, p1);
|
||||
}
|
||||
|
||||
ACTION_TEMPLATE(InvokeArgument,
|
||||
HAS_1_TEMPLATE_PARAMS(int, k),
|
||||
AND_3_VALUE_PARAMS(p0, p1, p2)) {
|
||||
return internal::CallableHelper<return_type>::Call(
|
||||
::std::tr1::get<k>(args), p0, p1, p2);
|
||||
::testing::get<k>(args), p0, p1, p2);
|
||||
}
|
||||
|
||||
ACTION_TEMPLATE(InvokeArgument,
|
||||
HAS_1_TEMPLATE_PARAMS(int, k),
|
||||
AND_4_VALUE_PARAMS(p0, p1, p2, p3)) {
|
||||
return internal::CallableHelper<return_type>::Call(
|
||||
::std::tr1::get<k>(args), p0, p1, p2, p3);
|
||||
::testing::get<k>(args), p0, p1, p2, p3);
|
||||
}
|
||||
|
||||
ACTION_TEMPLATE(InvokeArgument,
|
||||
HAS_1_TEMPLATE_PARAMS(int, k),
|
||||
AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)) {
|
||||
return internal::CallableHelper<return_type>::Call(
|
||||
::std::tr1::get<k>(args), p0, p1, p2, p3, p4);
|
||||
::testing::get<k>(args), p0, p1, p2, p3, p4);
|
||||
}
|
||||
|
||||
ACTION_TEMPLATE(InvokeArgument,
|
||||
HAS_1_TEMPLATE_PARAMS(int, k),
|
||||
AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)) {
|
||||
return internal::CallableHelper<return_type>::Call(
|
||||
::std::tr1::get<k>(args), p0, p1, p2, p3, p4, p5);
|
||||
::testing::get<k>(args), p0, p1, p2, p3, p4, p5);
|
||||
}
|
||||
|
||||
ACTION_TEMPLATE(InvokeArgument,
|
||||
HAS_1_TEMPLATE_PARAMS(int, k),
|
||||
AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)) {
|
||||
return internal::CallableHelper<return_type>::Call(
|
||||
::std::tr1::get<k>(args), p0, p1, p2, p3, p4, p5, p6);
|
||||
::testing::get<k>(args), p0, p1, p2, p3, p4, p5, p6);
|
||||
}
|
||||
|
||||
ACTION_TEMPLATE(InvokeArgument,
|
||||
HAS_1_TEMPLATE_PARAMS(int, k),
|
||||
AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)) {
|
||||
return internal::CallableHelper<return_type>::Call(
|
||||
::std::tr1::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7);
|
||||
::testing::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7);
|
||||
}
|
||||
|
||||
ACTION_TEMPLATE(InvokeArgument,
|
||||
HAS_1_TEMPLATE_PARAMS(int, k),
|
||||
AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)) {
|
||||
return internal::CallableHelper<return_type>::Call(
|
||||
::std::tr1::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7, p8);
|
||||
::testing::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7, p8);
|
||||
}
|
||||
|
||||
ACTION_TEMPLATE(InvokeArgument,
|
||||
HAS_1_TEMPLATE_PARAMS(int, k),
|
||||
AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)) {
|
||||
return internal::CallableHelper<return_type>::Call(
|
||||
::std::tr1::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9);
|
||||
::testing::get<k>(args), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9);
|
||||
}
|
||||
|
||||
// Various overloads for ReturnNew<T>().
|
||||
|
|
|
@ -61,24 +61,20 @@ $range j 1..i
|
|||
$var types = [[$for j [[, typename A$j]]]]
|
||||
$var as = [[$for j, [[A$j]]]]
|
||||
$var args = [[$if i==0 [[]] $else [[ args]]]]
|
||||
$var import = [[$if i==0 [[]] $else [[
|
||||
using ::std::tr1::get;
|
||||
|
||||
]]]]
|
||||
$var gets = [[$for j, [[get<$(j - 1)>(args)]]]]
|
||||
template <typename R$types>
|
||||
class InvokeHelper<R, ::std::tr1::tuple<$as> > {
|
||||
class InvokeHelper<R, ::testing::tuple<$as> > {
|
||||
public:
|
||||
template <typename Function>
|
||||
static R Invoke(Function function, const ::std::tr1::tuple<$as>&$args) {
|
||||
$import return function($gets);
|
||||
static R Invoke(Function function, const ::testing::tuple<$as>&$args) {
|
||||
return function($gets);
|
||||
}
|
||||
|
||||
template <class Class, typename MethodPtr>
|
||||
static R InvokeMethod(Class* obj_ptr,
|
||||
MethodPtr method_ptr,
|
||||
const ::std::tr1::tuple<$as>&$args) {
|
||||
$import return (obj_ptr->*method_ptr)($gets);
|
||||
const ::testing::tuple<$as>&$args) {
|
||||
return (obj_ptr->*method_ptr)($gets);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -141,7 +137,7 @@ $var Ts = [[$for j, [[T$j]]]]
|
|||
// An INTERNAL macro for extracting the type of a tuple field. It's
|
||||
// subject to change without notice - DO NOT USE IN USER CODE!
|
||||
#define GMOCK_FIELD_(Tuple, N) \
|
||||
typename ::std::tr1::tuple_element<N, Tuple>::type
|
||||
typename ::testing::tuple_element<N, Tuple>::type
|
||||
|
||||
$range i 1..n
|
||||
|
||||
|
@ -149,15 +145,15 @@ $range i 1..n
|
|||
// type of an n-ary function whose i-th (1-based) argument type is the
|
||||
// k{i}-th (0-based) field of ArgumentTuple, which must be a tuple
|
||||
// type, and whose return type is Result. For example,
|
||||
// SelectArgs<int, ::std::tr1::tuple<bool, char, double, long>, 0, 3>::type
|
||||
// SelectArgs<int, ::testing::tuple<bool, char, double, long>, 0, 3>::type
|
||||
// is int(bool, long).
|
||||
//
|
||||
// SelectArgs<Result, ArgumentTuple, k1, k2, ..., k_n>::Select(args)
|
||||
// returns the selected fields (k1, k2, ..., k_n) of args as a tuple.
|
||||
// For example,
|
||||
// SelectArgs<int, ::std::tr1::tuple<bool, char, double>, 2, 0>::Select(
|
||||
// ::std::tr1::make_tuple(true, 'a', 2.5))
|
||||
// returns ::std::tr1::tuple (2.5, true).
|
||||
// SelectArgs<int, tuple<bool, char, double>, 2, 0>::Select(
|
||||
// ::testing::make_tuple(true, 'a', 2.5))
|
||||
// returns tuple (2.5, true).
|
||||
//
|
||||
// The numbers in list k1, k2, ..., k_n must be >= 0, where n can be
|
||||
// in the range [0, $n]. Duplicates are allowed and they don't have
|
||||
|
@ -169,7 +165,6 @@ class SelectArgs {
|
|||
typedef Result type($for i, [[GMOCK_FIELD_(ArgumentTuple, k$i)]]);
|
||||
typedef typename Function<type>::ArgumentTuple SelectedArgs;
|
||||
static SelectedArgs Select(const ArgumentTuple& args) {
|
||||
using ::std::tr1::get;
|
||||
return SelectedArgs($for i, [[get<k$i>(args)]]);
|
||||
}
|
||||
};
|
||||
|
@ -186,7 +181,6 @@ class SelectArgs<Result, ArgumentTuple,
|
|||
typedef typename Function<type>::ArgumentTuple SelectedArgs;
|
||||
static SelectedArgs Select(const ArgumentTuple& [[]]
|
||||
$if i == 1 [[/* args */]] $else [[args]]) {
|
||||
using ::std::tr1::get;
|
||||
return SelectedArgs($for j1, [[get<k$j1>(args)]]);
|
||||
}
|
||||
};
|
||||
|
@ -266,8 +260,7 @@ $range k 1..n-i
|
|||
$var eas = [[$for k, [[ExcessiveArg()]]]]
|
||||
$var arg_list = [[$if (i==0) | (i==n) [[$as$eas]] $else [[$as, $eas]]]]
|
||||
$template
|
||||
static Result Perform(Impl* impl, const ::std::tr1::tuple<$As>& args) {
|
||||
using ::std::tr1::get;
|
||||
static Result Perform(Impl* impl, const ::testing::tuple<$As>& args) {
|
||||
return impl->template gmock_PerformImpl<$As>(args, $arg_list);
|
||||
}
|
||||
|
||||
|
@ -454,7 +447,7 @@ $for k [[, \
|
|||
// ACTION_TEMPLATE(DuplicateArg,
|
||||
// HAS_2_TEMPLATE_PARAMS(int, k, typename, T),
|
||||
// AND_1_VALUE_PARAMS(output)) {
|
||||
// *output = T(std::tr1::get<k>(args));
|
||||
// *output = T(::testing::get<k>(args));
|
||||
// }
|
||||
// ...
|
||||
// int n;
|
||||
|
@ -789,7 +782,7 @@ ACTION_TEMPLATE(InvokeArgument,
|
|||
HAS_1_TEMPLATE_PARAMS(int, k),
|
||||
AND_$i[[]]_VALUE_PARAMS($for j, [[p$j]])) {
|
||||
return internal::CallableHelper<return_type>::Call(
|
||||
::std::tr1::get<k>(args)$for j [[, p$j]]);
|
||||
::testing::get<k>(args)$for j [[, p$j]]);
|
||||
}
|
||||
|
||||
]]
|
||||
|
|
|
@ -85,7 +85,7 @@ class FunctionMocker<R(A1)> : public
|
|||
typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
|
||||
|
||||
MockSpec<F>& With(const Matcher<A1>& m1) {
|
||||
this->current_spec().SetMatchers(::std::tr1::make_tuple(m1));
|
||||
this->current_spec().SetMatchers(::testing::make_tuple(m1));
|
||||
return this->current_spec();
|
||||
}
|
||||
|
||||
|
@ -106,7 +106,7 @@ class FunctionMocker<R(A1, A2)> : public
|
|||
typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
|
||||
|
||||
MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2) {
|
||||
this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2));
|
||||
this->current_spec().SetMatchers(::testing::make_tuple(m1, m2));
|
||||
return this->current_spec();
|
||||
}
|
||||
|
||||
|
@ -128,7 +128,7 @@ class FunctionMocker<R(A1, A2, A3)> : public
|
|||
|
||||
MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
|
||||
const Matcher<A3>& m3) {
|
||||
this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3));
|
||||
this->current_spec().SetMatchers(::testing::make_tuple(m1, m2, m3));
|
||||
return this->current_spec();
|
||||
}
|
||||
|
||||
|
@ -150,7 +150,7 @@ class FunctionMocker<R(A1, A2, A3, A4)> : public
|
|||
|
||||
MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
|
||||
const Matcher<A3>& m3, const Matcher<A4>& m4) {
|
||||
this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4));
|
||||
this->current_spec().SetMatchers(::testing::make_tuple(m1, m2, m3, m4));
|
||||
return this->current_spec();
|
||||
}
|
||||
|
||||
|
@ -173,8 +173,7 @@ class FunctionMocker<R(A1, A2, A3, A4, A5)> : public
|
|||
|
||||
MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
|
||||
const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5) {
|
||||
this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4,
|
||||
m5));
|
||||
this->current_spec().SetMatchers(::testing::make_tuple(m1, m2, m3, m4, m5));
|
||||
return this->current_spec();
|
||||
}
|
||||
|
||||
|
@ -198,7 +197,7 @@ class FunctionMocker<R(A1, A2, A3, A4, A5, A6)> : public
|
|||
MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
|
||||
const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
|
||||
const Matcher<A6>& m6) {
|
||||
this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5,
|
||||
this->current_spec().SetMatchers(::testing::make_tuple(m1, m2, m3, m4, m5,
|
||||
m6));
|
||||
return this->current_spec();
|
||||
}
|
||||
|
@ -223,7 +222,7 @@ class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7)> : public
|
|||
MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
|
||||
const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
|
||||
const Matcher<A6>& m6, const Matcher<A7>& m7) {
|
||||
this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5,
|
||||
this->current_spec().SetMatchers(::testing::make_tuple(m1, m2, m3, m4, m5,
|
||||
m6, m7));
|
||||
return this->current_spec();
|
||||
}
|
||||
|
@ -248,7 +247,7 @@ class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8)> : public
|
|||
MockSpec<F>& With(const Matcher<A1>& m1, const Matcher<A2>& m2,
|
||||
const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
|
||||
const Matcher<A6>& m6, const Matcher<A7>& m7, const Matcher<A8>& m8) {
|
||||
this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5,
|
||||
this->current_spec().SetMatchers(::testing::make_tuple(m1, m2, m3, m4, m5,
|
||||
m6, m7, m8));
|
||||
return this->current_spec();
|
||||
}
|
||||
|
@ -274,7 +273,7 @@ class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8, A9)> : public
|
|||
const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
|
||||
const Matcher<A6>& m6, const Matcher<A7>& m7, const Matcher<A8>& m8,
|
||||
const Matcher<A9>& m9) {
|
||||
this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5,
|
||||
this->current_spec().SetMatchers(::testing::make_tuple(m1, m2, m3, m4, m5,
|
||||
m6, m7, m8, m9));
|
||||
return this->current_spec();
|
||||
}
|
||||
|
@ -301,7 +300,7 @@ class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)> : public
|
|||
const Matcher<A3>& m3, const Matcher<A4>& m4, const Matcher<A5>& m5,
|
||||
const Matcher<A6>& m6, const Matcher<A7>& m7, const Matcher<A8>& m8,
|
||||
const Matcher<A9>& m9, const Matcher<A10>& m10) {
|
||||
this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5,
|
||||
this->current_spec().SetMatchers(::testing::make_tuple(m1, m2, m3, m4, m5,
|
||||
m6, m7, m8, m9, m10));
|
||||
return this->current_spec();
|
||||
}
|
||||
|
@ -353,7 +352,7 @@ using internal::FunctionMocker;
|
|||
#define GMOCK_METHOD0_(tn, constness, ct, Method, ...) \
|
||||
GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
|
||||
) constness { \
|
||||
GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
|
||||
GTEST_COMPILE_ASSERT_((::testing::tuple_size< \
|
||||
tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
|
||||
== 0), \
|
||||
this_method_does_not_take_0_arguments); \
|
||||
|
@ -372,7 +371,7 @@ using internal::FunctionMocker;
|
|||
#define GMOCK_METHOD1_(tn, constness, ct, Method, ...) \
|
||||
GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
|
||||
GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1) constness { \
|
||||
GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
|
||||
GTEST_COMPILE_ASSERT_((::testing::tuple_size< \
|
||||
tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
|
||||
== 1), \
|
||||
this_method_does_not_take_1_argument); \
|
||||
|
@ -392,7 +391,7 @@ using internal::FunctionMocker;
|
|||
GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
|
||||
GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
|
||||
GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2) constness { \
|
||||
GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
|
||||
GTEST_COMPILE_ASSERT_((::testing::tuple_size< \
|
||||
tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
|
||||
== 2), \
|
||||
this_method_does_not_take_2_arguments); \
|
||||
|
@ -414,7 +413,7 @@ using internal::FunctionMocker;
|
|||
GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \
|
||||
GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
|
||||
GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3) constness { \
|
||||
GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
|
||||
GTEST_COMPILE_ASSERT_((::testing::tuple_size< \
|
||||
tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
|
||||
== 3), \
|
||||
this_method_does_not_take_3_arguments); \
|
||||
|
@ -440,7 +439,7 @@ using internal::FunctionMocker;
|
|||
GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \
|
||||
GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
|
||||
GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4) constness { \
|
||||
GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
|
||||
GTEST_COMPILE_ASSERT_((::testing::tuple_size< \
|
||||
tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
|
||||
== 4), \
|
||||
this_method_does_not_take_4_arguments); \
|
||||
|
@ -468,7 +467,7 @@ using internal::FunctionMocker;
|
|||
GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \
|
||||
GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, \
|
||||
GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5) constness { \
|
||||
GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
|
||||
GTEST_COMPILE_ASSERT_((::testing::tuple_size< \
|
||||
tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
|
||||
== 5), \
|
||||
this_method_does_not_take_5_arguments); \
|
||||
|
@ -498,7 +497,7 @@ using internal::FunctionMocker;
|
|||
GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, \
|
||||
GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5, \
|
||||
GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6) constness { \
|
||||
GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
|
||||
GTEST_COMPILE_ASSERT_((::testing::tuple_size< \
|
||||
tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
|
||||
== 6), \
|
||||
this_method_does_not_take_6_arguments); \
|
||||
|
@ -530,7 +529,7 @@ using internal::FunctionMocker;
|
|||
GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5, \
|
||||
GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \
|
||||
GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7) constness { \
|
||||
GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
|
||||
GTEST_COMPILE_ASSERT_((::testing::tuple_size< \
|
||||
tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
|
||||
== 7), \
|
||||
this_method_does_not_take_7_arguments); \
|
||||
|
@ -564,7 +563,7 @@ using internal::FunctionMocker;
|
|||
GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \
|
||||
GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7, \
|
||||
GMOCK_ARG_(tn, 8, __VA_ARGS__) gmock_a8) constness { \
|
||||
GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
|
||||
GTEST_COMPILE_ASSERT_((::testing::tuple_size< \
|
||||
tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
|
||||
== 8), \
|
||||
this_method_does_not_take_8_arguments); \
|
||||
|
@ -600,7 +599,7 @@ using internal::FunctionMocker;
|
|||
GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7, \
|
||||
GMOCK_ARG_(tn, 8, __VA_ARGS__) gmock_a8, \
|
||||
GMOCK_ARG_(tn, 9, __VA_ARGS__) gmock_a9) constness { \
|
||||
GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
|
||||
GTEST_COMPILE_ASSERT_((::testing::tuple_size< \
|
||||
tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
|
||||
== 9), \
|
||||
this_method_does_not_take_9_arguments); \
|
||||
|
@ -640,7 +639,7 @@ using internal::FunctionMocker;
|
|||
GMOCK_ARG_(tn, 8, __VA_ARGS__) gmock_a8, \
|
||||
GMOCK_ARG_(tn, 9, __VA_ARGS__) gmock_a9, \
|
||||
GMOCK_ARG_(tn, 10, __VA_ARGS__) gmock_a10) constness { \
|
||||
GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
|
||||
GTEST_COMPILE_ASSERT_((::testing::tuple_size< \
|
||||
tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \
|
||||
== 10), \
|
||||
this_method_does_not_take_10_arguments); \
|
||||
|
|
|
@ -78,7 +78,7 @@ class FunctionMocker<R($As)> : public
|
|||
MockSpec<F>& With($matchers) {
|
||||
|
||||
$if i >= 1 [[
|
||||
this->current_spec().SetMatchers(::std::tr1::make_tuple($ms));
|
||||
this->current_spec().SetMatchers(::testing::make_tuple($ms));
|
||||
|
||||
]]
|
||||
return this->current_spec();
|
||||
|
@ -139,7 +139,7 @@ $var matcher_as = [[$for j, \
|
|||
#define GMOCK_METHOD$i[[]]_(tn, constness, ct, Method, ...) \
|
||||
GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
|
||||
$arg_as) constness { \
|
||||
GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \
|
||||
GTEST_COMPILE_ASSERT_((::testing::tuple_size< \
|
||||
tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value == $i), \
|
||||
this_method_does_not_take_$i[[]]_argument[[$if i != 1 [[s]]]]); \
|
||||
GMOCK_MOCKER_($i, constness, Method).SetOwnerAndName(this, #Method); \
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace internal {
|
|||
|
||||
// The type of the i-th (0-based) field of Tuple.
|
||||
#define GMOCK_FIELD_TYPE_(Tuple, i) \
|
||||
typename ::std::tr1::tuple_element<i, Tuple>::type
|
||||
typename ::testing::tuple_element<i, Tuple>::type
|
||||
|
||||
// TupleFields<Tuple, k0, ..., kn> is for selecting fields from a
|
||||
// tuple of type Tuple. It has two members:
|
||||
|
@ -72,14 +72,13 @@ template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5, int k6,
|
|||
int k7, int k8, int k9>
|
||||
class TupleFields {
|
||||
public:
|
||||
typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
|
||||
typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k7), GMOCK_FIELD_TYPE_(Tuple, k8),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k9)> type;
|
||||
static type GetSelectedFields(const Tuple& t) {
|
||||
using ::std::tr1::get;
|
||||
return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
|
||||
get<k5>(t), get<k6>(t), get<k7>(t), get<k8>(t), get<k9>(t));
|
||||
}
|
||||
|
@ -90,9 +89,8 @@ class TupleFields {
|
|||
template <class Tuple>
|
||||
class TupleFields<Tuple, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1> {
|
||||
public:
|
||||
typedef ::std::tr1::tuple<> type;
|
||||
typedef ::testing::tuple<> type;
|
||||
static type GetSelectedFields(const Tuple& /* t */) {
|
||||
using ::std::tr1::get;
|
||||
return type();
|
||||
}
|
||||
};
|
||||
|
@ -100,9 +98,8 @@ class TupleFields<Tuple, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1> {
|
|||
template <class Tuple, int k0>
|
||||
class TupleFields<Tuple, k0, -1, -1, -1, -1, -1, -1, -1, -1, -1> {
|
||||
public:
|
||||
typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0)> type;
|
||||
typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0)> type;
|
||||
static type GetSelectedFields(const Tuple& t) {
|
||||
using ::std::tr1::get;
|
||||
return type(get<k0>(t));
|
||||
}
|
||||
};
|
||||
|
@ -110,10 +107,9 @@ class TupleFields<Tuple, k0, -1, -1, -1, -1, -1, -1, -1, -1, -1> {
|
|||
template <class Tuple, int k0, int k1>
|
||||
class TupleFields<Tuple, k0, k1, -1, -1, -1, -1, -1, -1, -1, -1> {
|
||||
public:
|
||||
typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
|
||||
typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k1)> type;
|
||||
static type GetSelectedFields(const Tuple& t) {
|
||||
using ::std::tr1::get;
|
||||
return type(get<k0>(t), get<k1>(t));
|
||||
}
|
||||
};
|
||||
|
@ -121,10 +117,9 @@ class TupleFields<Tuple, k0, k1, -1, -1, -1, -1, -1, -1, -1, -1> {
|
|||
template <class Tuple, int k0, int k1, int k2>
|
||||
class TupleFields<Tuple, k0, k1, k2, -1, -1, -1, -1, -1, -1, -1> {
|
||||
public:
|
||||
typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
|
||||
typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2)> type;
|
||||
static type GetSelectedFields(const Tuple& t) {
|
||||
using ::std::tr1::get;
|
||||
return type(get<k0>(t), get<k1>(t), get<k2>(t));
|
||||
}
|
||||
};
|
||||
|
@ -132,11 +127,10 @@ class TupleFields<Tuple, k0, k1, k2, -1, -1, -1, -1, -1, -1, -1> {
|
|||
template <class Tuple, int k0, int k1, int k2, int k3>
|
||||
class TupleFields<Tuple, k0, k1, k2, k3, -1, -1, -1, -1, -1, -1> {
|
||||
public:
|
||||
typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
|
||||
typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k3)> type;
|
||||
static type GetSelectedFields(const Tuple& t) {
|
||||
using ::std::tr1::get;
|
||||
return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t));
|
||||
}
|
||||
};
|
||||
|
@ -144,11 +138,10 @@ class TupleFields<Tuple, k0, k1, k2, k3, -1, -1, -1, -1, -1, -1> {
|
|||
template <class Tuple, int k0, int k1, int k2, int k3, int k4>
|
||||
class TupleFields<Tuple, k0, k1, k2, k3, k4, -1, -1, -1, -1, -1> {
|
||||
public:
|
||||
typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
|
||||
typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4)> type;
|
||||
static type GetSelectedFields(const Tuple& t) {
|
||||
using ::std::tr1::get;
|
||||
return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t));
|
||||
}
|
||||
};
|
||||
|
@ -156,12 +149,11 @@ class TupleFields<Tuple, k0, k1, k2, k3, k4, -1, -1, -1, -1, -1> {
|
|||
template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5>
|
||||
class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, -1, -1, -1, -1> {
|
||||
public:
|
||||
typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
|
||||
typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k5)> type;
|
||||
static type GetSelectedFields(const Tuple& t) {
|
||||
using ::std::tr1::get;
|
||||
return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
|
||||
get<k5>(t));
|
||||
}
|
||||
|
@ -170,12 +162,11 @@ class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, -1, -1, -1, -1> {
|
|||
template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5, int k6>
|
||||
class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, k6, -1, -1, -1> {
|
||||
public:
|
||||
typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
|
||||
typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6)> type;
|
||||
static type GetSelectedFields(const Tuple& t) {
|
||||
using ::std::tr1::get;
|
||||
return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
|
||||
get<k5>(t), get<k6>(t));
|
||||
}
|
||||
|
@ -185,13 +176,12 @@ template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5, int k6,
|
|||
int k7>
|
||||
class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, k6, k7, -1, -1> {
|
||||
public:
|
||||
typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
|
||||
typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k7)> type;
|
||||
static type GetSelectedFields(const Tuple& t) {
|
||||
using ::std::tr1::get;
|
||||
return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
|
||||
get<k5>(t), get<k6>(t), get<k7>(t));
|
||||
}
|
||||
|
@ -201,13 +191,12 @@ template <class Tuple, int k0, int k1, int k2, int k3, int k4, int k5, int k6,
|
|||
int k7, int k8>
|
||||
class TupleFields<Tuple, k0, k1, k2, k3, k4, k5, k6, k7, k8, -1> {
|
||||
public:
|
||||
typedef ::std::tr1::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
|
||||
typedef ::testing::tuple<GMOCK_FIELD_TYPE_(Tuple, k0),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k1), GMOCK_FIELD_TYPE_(Tuple, k2),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k3), GMOCK_FIELD_TYPE_(Tuple, k4),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k5), GMOCK_FIELD_TYPE_(Tuple, k6),
|
||||
GMOCK_FIELD_TYPE_(Tuple, k7), GMOCK_FIELD_TYPE_(Tuple, k8)> type;
|
||||
static type GetSelectedFields(const Tuple& t) {
|
||||
using ::std::tr1::get;
|
||||
return type(get<k0>(t), get<k1>(t), get<k2>(t), get<k3>(t), get<k4>(t),
|
||||
get<k5>(t), get<k6>(t), get<k7>(t), get<k8>(t));
|
||||
}
|
||||
|
@ -577,29 +566,29 @@ Args(const InnerMatcher& matcher) {
|
|||
// undefined (e.g. hash_map).
|
||||
|
||||
inline internal::ElementsAreMatcher<
|
||||
std::tr1::tuple<> >
|
||||
::testing::tuple<> >
|
||||
ElementsAre() {
|
||||
typedef std::tr1::tuple<> Args;
|
||||
typedef ::testing::tuple<> Args;
|
||||
return internal::ElementsAreMatcher<Args>(Args());
|
||||
}
|
||||
|
||||
template <typename T1>
|
||||
inline internal::ElementsAreMatcher<
|
||||
std::tr1::tuple<
|
||||
::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type> >
|
||||
ElementsAre(const T1& e1) {
|
||||
typedef std::tr1::tuple<
|
||||
typedef ::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type> Args;
|
||||
return internal::ElementsAreMatcher<Args>(Args(e1));
|
||||
}
|
||||
|
||||
template <typename T1, typename T2>
|
||||
inline internal::ElementsAreMatcher<
|
||||
std::tr1::tuple<
|
||||
::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type> >
|
||||
ElementsAre(const T1& e1, const T2& e2) {
|
||||
typedef std::tr1::tuple<
|
||||
typedef ::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type> Args;
|
||||
return internal::ElementsAreMatcher<Args>(Args(e1, e2));
|
||||
|
@ -607,12 +596,12 @@ ElementsAre(const T1& e1, const T2& e2) {
|
|||
|
||||
template <typename T1, typename T2, typename T3>
|
||||
inline internal::ElementsAreMatcher<
|
||||
std::tr1::tuple<
|
||||
::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type> >
|
||||
ElementsAre(const T1& e1, const T2& e2, const T3& e3) {
|
||||
typedef std::tr1::tuple<
|
||||
typedef ::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type> Args;
|
||||
|
@ -621,13 +610,13 @@ ElementsAre(const T1& e1, const T2& e2, const T3& e3) {
|
|||
|
||||
template <typename T1, typename T2, typename T3, typename T4>
|
||||
inline internal::ElementsAreMatcher<
|
||||
std::tr1::tuple<
|
||||
::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
typename internal::DecayArray<T4>::type> >
|
||||
ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4) {
|
||||
typedef std::tr1::tuple<
|
||||
typedef ::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
|
@ -637,7 +626,7 @@ ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4) {
|
|||
|
||||
template <typename T1, typename T2, typename T3, typename T4, typename T5>
|
||||
inline internal::ElementsAreMatcher<
|
||||
std::tr1::tuple<
|
||||
::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
|
@ -645,7 +634,7 @@ inline internal::ElementsAreMatcher<
|
|||
typename internal::DecayArray<T5>::type> >
|
||||
ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
|
||||
const T5& e5) {
|
||||
typedef std::tr1::tuple<
|
||||
typedef ::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
|
@ -657,7 +646,7 @@ ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
|
|||
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
||||
typename T6>
|
||||
inline internal::ElementsAreMatcher<
|
||||
std::tr1::tuple<
|
||||
::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
|
@ -666,7 +655,7 @@ inline internal::ElementsAreMatcher<
|
|||
typename internal::DecayArray<T6>::type> >
|
||||
ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
|
||||
const T5& e5, const T6& e6) {
|
||||
typedef std::tr1::tuple<
|
||||
typedef ::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
|
@ -679,7 +668,7 @@ ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
|
|||
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
||||
typename T6, typename T7>
|
||||
inline internal::ElementsAreMatcher<
|
||||
std::tr1::tuple<
|
||||
::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
|
@ -689,7 +678,7 @@ inline internal::ElementsAreMatcher<
|
|||
typename internal::DecayArray<T7>::type> >
|
||||
ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
|
||||
const T5& e5, const T6& e6, const T7& e7) {
|
||||
typedef std::tr1::tuple<
|
||||
typedef ::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
|
@ -703,7 +692,7 @@ ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
|
|||
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
||||
typename T6, typename T7, typename T8>
|
||||
inline internal::ElementsAreMatcher<
|
||||
std::tr1::tuple<
|
||||
::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
|
@ -714,7 +703,7 @@ inline internal::ElementsAreMatcher<
|
|||
typename internal::DecayArray<T8>::type> >
|
||||
ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
|
||||
const T5& e5, const T6& e6, const T7& e7, const T8& e8) {
|
||||
typedef std::tr1::tuple<
|
||||
typedef ::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
|
@ -730,7 +719,7 @@ ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
|
|||
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
||||
typename T6, typename T7, typename T8, typename T9>
|
||||
inline internal::ElementsAreMatcher<
|
||||
std::tr1::tuple<
|
||||
::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
|
@ -742,7 +731,7 @@ inline internal::ElementsAreMatcher<
|
|||
typename internal::DecayArray<T9>::type> >
|
||||
ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
|
||||
const T5& e5, const T6& e6, const T7& e7, const T8& e8, const T9& e9) {
|
||||
typedef std::tr1::tuple<
|
||||
typedef ::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
|
@ -759,7 +748,7 @@ ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
|
|||
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
||||
typename T6, typename T7, typename T8, typename T9, typename T10>
|
||||
inline internal::ElementsAreMatcher<
|
||||
std::tr1::tuple<
|
||||
::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
|
@ -773,7 +762,7 @@ inline internal::ElementsAreMatcher<
|
|||
ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
|
||||
const T5& e5, const T6& e6, const T7& e7, const T8& e8, const T9& e9,
|
||||
const T10& e10) {
|
||||
typedef std::tr1::tuple<
|
||||
typedef ::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
|
@ -792,29 +781,29 @@ ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
|
|||
// that matches n elements in any order. We support up to n=10 arguments.
|
||||
|
||||
inline internal::UnorderedElementsAreMatcher<
|
||||
std::tr1::tuple<> >
|
||||
::testing::tuple<> >
|
||||
UnorderedElementsAre() {
|
||||
typedef std::tr1::tuple<> Args;
|
||||
typedef ::testing::tuple<> Args;
|
||||
return internal::UnorderedElementsAreMatcher<Args>(Args());
|
||||
}
|
||||
|
||||
template <typename T1>
|
||||
inline internal::UnorderedElementsAreMatcher<
|
||||
std::tr1::tuple<
|
||||
::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type> >
|
||||
UnorderedElementsAre(const T1& e1) {
|
||||
typedef std::tr1::tuple<
|
||||
typedef ::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type> Args;
|
||||
return internal::UnorderedElementsAreMatcher<Args>(Args(e1));
|
||||
}
|
||||
|
||||
template <typename T1, typename T2>
|
||||
inline internal::UnorderedElementsAreMatcher<
|
||||
std::tr1::tuple<
|
||||
::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type> >
|
||||
UnorderedElementsAre(const T1& e1, const T2& e2) {
|
||||
typedef std::tr1::tuple<
|
||||
typedef ::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type> Args;
|
||||
return internal::UnorderedElementsAreMatcher<Args>(Args(e1, e2));
|
||||
|
@ -822,12 +811,12 @@ UnorderedElementsAre(const T1& e1, const T2& e2) {
|
|||
|
||||
template <typename T1, typename T2, typename T3>
|
||||
inline internal::UnorderedElementsAreMatcher<
|
||||
std::tr1::tuple<
|
||||
::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type> >
|
||||
UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3) {
|
||||
typedef std::tr1::tuple<
|
||||
typedef ::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type> Args;
|
||||
|
@ -836,13 +825,13 @@ UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3) {
|
|||
|
||||
template <typename T1, typename T2, typename T3, typename T4>
|
||||
inline internal::UnorderedElementsAreMatcher<
|
||||
std::tr1::tuple<
|
||||
::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
typename internal::DecayArray<T4>::type> >
|
||||
UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4) {
|
||||
typedef std::tr1::tuple<
|
||||
typedef ::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
|
@ -852,7 +841,7 @@ UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4) {
|
|||
|
||||
template <typename T1, typename T2, typename T3, typename T4, typename T5>
|
||||
inline internal::UnorderedElementsAreMatcher<
|
||||
std::tr1::tuple<
|
||||
::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
|
@ -860,7 +849,7 @@ inline internal::UnorderedElementsAreMatcher<
|
|||
typename internal::DecayArray<T5>::type> >
|
||||
UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
|
||||
const T5& e5) {
|
||||
typedef std::tr1::tuple<
|
||||
typedef ::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
|
@ -872,7 +861,7 @@ UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
|
|||
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
||||
typename T6>
|
||||
inline internal::UnorderedElementsAreMatcher<
|
||||
std::tr1::tuple<
|
||||
::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
|
@ -881,7 +870,7 @@ inline internal::UnorderedElementsAreMatcher<
|
|||
typename internal::DecayArray<T6>::type> >
|
||||
UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
|
||||
const T5& e5, const T6& e6) {
|
||||
typedef std::tr1::tuple<
|
||||
typedef ::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
|
@ -895,7 +884,7 @@ UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
|
|||
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
||||
typename T6, typename T7>
|
||||
inline internal::UnorderedElementsAreMatcher<
|
||||
std::tr1::tuple<
|
||||
::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
|
@ -905,7 +894,7 @@ inline internal::UnorderedElementsAreMatcher<
|
|||
typename internal::DecayArray<T7>::type> >
|
||||
UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
|
||||
const T5& e5, const T6& e6, const T7& e7) {
|
||||
typedef std::tr1::tuple<
|
||||
typedef ::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
|
@ -920,7 +909,7 @@ UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
|
|||
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
||||
typename T6, typename T7, typename T8>
|
||||
inline internal::UnorderedElementsAreMatcher<
|
||||
std::tr1::tuple<
|
||||
::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
|
@ -931,7 +920,7 @@ inline internal::UnorderedElementsAreMatcher<
|
|||
typename internal::DecayArray<T8>::type> >
|
||||
UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
|
||||
const T5& e5, const T6& e6, const T7& e7, const T8& e8) {
|
||||
typedef std::tr1::tuple<
|
||||
typedef ::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
|
@ -947,7 +936,7 @@ UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
|
|||
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
||||
typename T6, typename T7, typename T8, typename T9>
|
||||
inline internal::UnorderedElementsAreMatcher<
|
||||
std::tr1::tuple<
|
||||
::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
|
@ -959,7 +948,7 @@ inline internal::UnorderedElementsAreMatcher<
|
|||
typename internal::DecayArray<T9>::type> >
|
||||
UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
|
||||
const T5& e5, const T6& e6, const T7& e7, const T8& e8, const T9& e9) {
|
||||
typedef std::tr1::tuple<
|
||||
typedef ::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
|
@ -976,7 +965,7 @@ UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
|
|||
template <typename T1, typename T2, typename T3, typename T4, typename T5,
|
||||
typename T6, typename T7, typename T8, typename T9, typename T10>
|
||||
inline internal::UnorderedElementsAreMatcher<
|
||||
std::tr1::tuple<
|
||||
::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
|
@ -990,7 +979,7 @@ inline internal::UnorderedElementsAreMatcher<
|
|||
UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4,
|
||||
const T5& e5, const T6& e6, const T7& e7, const T8& e8, const T9& e9,
|
||||
const T10& e10) {
|
||||
typedef std::tr1::tuple<
|
||||
typedef ::testing::tuple<
|
||||
typename internal::DecayArray<T1>::type,
|
||||
typename internal::DecayArray<T2>::type,
|
||||
typename internal::DecayArray<T3>::type,
|
||||
|
@ -1413,7 +1402,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
|
|||
return ::testing::internal::FormatMatcherDescription(\
|
||||
negation, #name, \
|
||||
::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
|
||||
::std::tr1::tuple<>()));\
|
||||
::testing::tuple<>()));\
|
||||
}\
|
||||
GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
|
||||
};\
|
||||
|
@ -1462,7 +1451,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
|
|||
return ::testing::internal::FormatMatcherDescription(\
|
||||
negation, #name, \
|
||||
::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
|
||||
::std::tr1::tuple<p0##_type>(p0)));\
|
||||
::testing::tuple<p0##_type>(p0)));\
|
||||
}\
|
||||
GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
|
||||
};\
|
||||
|
@ -1515,7 +1504,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
|
|||
return ::testing::internal::FormatMatcherDescription(\
|
||||
negation, #name, \
|
||||
::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
|
||||
::std::tr1::tuple<p0##_type, p1##_type>(p0, p1)));\
|
||||
::testing::tuple<p0##_type, p1##_type>(p0, p1)));\
|
||||
}\
|
||||
GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
|
||||
};\
|
||||
|
@ -1573,7 +1562,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
|
|||
return ::testing::internal::FormatMatcherDescription(\
|
||||
negation, #name, \
|
||||
::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
|
||||
::std::tr1::tuple<p0##_type, p1##_type, p2##_type>(p0, p1, \
|
||||
::testing::tuple<p0##_type, p1##_type, p2##_type>(p0, p1, \
|
||||
p2)));\
|
||||
}\
|
||||
GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
|
||||
|
@ -1636,7 +1625,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
|
|||
return ::testing::internal::FormatMatcherDescription(\
|
||||
negation, #name, \
|
||||
::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
|
||||
::std::tr1::tuple<p0##_type, p1##_type, p2##_type, \
|
||||
::testing::tuple<p0##_type, p1##_type, p2##_type, \
|
||||
p3##_type>(p0, p1, p2, p3)));\
|
||||
}\
|
||||
GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
|
||||
|
@ -1707,7 +1696,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
|
|||
return ::testing::internal::FormatMatcherDescription(\
|
||||
negation, #name, \
|
||||
::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
|
||||
::std::tr1::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
|
||||
::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
|
||||
p4##_type>(p0, p1, p2, p3, p4)));\
|
||||
}\
|
||||
GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
|
||||
|
@ -1781,7 +1770,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
|
|||
return ::testing::internal::FormatMatcherDescription(\
|
||||
negation, #name, \
|
||||
::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
|
||||
::std::tr1::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
|
||||
::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
|
||||
p4##_type, p5##_type>(p0, p1, p2, p3, p4, p5)));\
|
||||
}\
|
||||
GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
|
||||
|
@ -1859,7 +1848,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
|
|||
return ::testing::internal::FormatMatcherDescription(\
|
||||
negation, #name, \
|
||||
::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
|
||||
::std::tr1::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
|
||||
::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
|
||||
p4##_type, p5##_type, p6##_type>(p0, p1, p2, p3, p4, p5, \
|
||||
p6)));\
|
||||
}\
|
||||
|
@ -1944,7 +1933,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
|
|||
return ::testing::internal::FormatMatcherDescription(\
|
||||
negation, #name, \
|
||||
::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
|
||||
::std::tr1::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
|
||||
::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
|
||||
p4##_type, p5##_type, p6##_type, p7##_type>(p0, p1, p2, \
|
||||
p3, p4, p5, p6, p7)));\
|
||||
}\
|
||||
|
@ -2035,7 +2024,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
|
|||
return ::testing::internal::FormatMatcherDescription(\
|
||||
negation, #name, \
|
||||
::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
|
||||
::std::tr1::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
|
||||
::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
|
||||
p4##_type, p5##_type, p6##_type, p7##_type, \
|
||||
p8##_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8)));\
|
||||
}\
|
||||
|
@ -2131,7 +2120,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) {
|
|||
return ::testing::internal::FormatMatcherDescription(\
|
||||
negation, #name, \
|
||||
::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
|
||||
::std::tr1::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
|
||||
::testing::tuple<p0##_type, p1##_type, p2##_type, p3##_type, \
|
||||
p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, \
|
||||
p9##_type>(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)));\
|
||||
}\
|
||||
|
|
|
@ -53,7 +53,7 @@ $range i 0..n-1
|
|||
|
||||
// The type of the i-th (0-based) field of Tuple.
|
||||
#define GMOCK_FIELD_TYPE_(Tuple, i) \
|
||||
typename ::std::tr1::tuple_element<i, Tuple>::type
|
||||
typename ::testing::tuple_element<i, Tuple>::type
|
||||
|
||||
// TupleFields<Tuple, k0, ..., kn> is for selecting fields from a
|
||||
// tuple of type Tuple. It has two members:
|
||||
|
@ -73,9 +73,8 @@ class TupleFields;
|
|||
template <class Tuple$for i [[, int k$i]]>
|
||||
class TupleFields {
|
||||
public:
|
||||
typedef ::std::tr1::tuple<$for i, [[GMOCK_FIELD_TYPE_(Tuple, k$i)]]> type;
|
||||
typedef ::testing::tuple<$for i, [[GMOCK_FIELD_TYPE_(Tuple, k$i)]]> type;
|
||||
static type GetSelectedFields(const Tuple& t) {
|
||||
using ::std::tr1::get;
|
||||
return type($for i, [[get<k$i>(t)]]);
|
||||
}
|
||||
};
|
||||
|
@ -90,9 +89,8 @@ $range k 0..n-1
|
|||
template <class Tuple$for j [[, int k$j]]>
|
||||
class TupleFields<Tuple, $for k, [[$if k < i [[k$k]] $else [[-1]]]]> {
|
||||
public:
|
||||
typedef ::std::tr1::tuple<$for j, [[GMOCK_FIELD_TYPE_(Tuple, k$j)]]> type;
|
||||
typedef ::testing::tuple<$for j, [[GMOCK_FIELD_TYPE_(Tuple, k$j)]]> type;
|
||||
static type GetSelectedFields(const Tuple& $if i==0 [[/* t */]] $else [[t]]) {
|
||||
using ::std::tr1::get;
|
||||
return type($for j, [[get<k$j>(t)]]);
|
||||
}
|
||||
};
|
||||
|
@ -289,12 +287,12 @@ template <$for j, [[typename T$j]]>
|
|||
]]
|
||||
|
||||
inline internal::ElementsAreMatcher<
|
||||
std::tr1::tuple<
|
||||
::testing::tuple<
|
||||
$for j, [[
|
||||
|
||||
typename internal::DecayArray<T$j[[]]>::type]]> >
|
||||
ElementsAre($for j, [[const T$j& e$j]]) {
|
||||
typedef std::tr1::tuple<
|
||||
typedef ::testing::tuple<
|
||||
$for j, [[
|
||||
|
||||
typename internal::DecayArray<T$j[[]]>::type]]> Args;
|
||||
|
@ -317,12 +315,12 @@ template <$for j, [[typename T$j]]>
|
|||
]]
|
||||
|
||||
inline internal::UnorderedElementsAreMatcher<
|
||||
std::tr1::tuple<
|
||||
::testing::tuple<
|
||||
$for j, [[
|
||||
|
||||
typename internal::DecayArray<T$j[[]]>::type]]> >
|
||||
UnorderedElementsAre($for j, [[const T$j& e$j]]) {
|
||||
typedef std::tr1::tuple<
|
||||
typedef ::testing::tuple<
|
||||
$for j, [[
|
||||
|
||||
typename internal::DecayArray<T$j[[]]>::type]]> Args;
|
||||
|
@ -646,7 +644,7 @@ $var param_field_decls2 = [[$for j
|
|||
return ::testing::internal::FormatMatcherDescription(\
|
||||
negation, #name, \
|
||||
::testing::internal::UniversalTersePrintTupleFieldsToStrings(\
|
||||
::std::tr1::tuple<$for j, [[p$j##_type]]>($for j, [[p$j]])));\
|
||||
::testing::tuple<$for j, [[p$j##_type]]>($for j, [[p$j]])));\
|
||||
}\
|
||||
GTEST_DISALLOW_ASSIGN_(gmock_Impl);\
|
||||
};\
|
||||
|
|
|
@ -706,7 +706,6 @@ class TuplePrefix {
|
|||
template <typename MatcherTuple, typename ValueTuple>
|
||||
static bool Matches(const MatcherTuple& matcher_tuple,
|
||||
const ValueTuple& value_tuple) {
|
||||
using ::std::tr1::get;
|
||||
return TuplePrefix<N - 1>::Matches(matcher_tuple, value_tuple)
|
||||
&& get<N - 1>(matcher_tuple).Matches(get<N - 1>(value_tuple));
|
||||
}
|
||||
|
@ -719,9 +718,6 @@ class TuplePrefix {
|
|||
static void ExplainMatchFailuresTo(const MatcherTuple& matchers,
|
||||
const ValueTuple& values,
|
||||
::std::ostream* os) {
|
||||
using ::std::tr1::tuple_element;
|
||||
using ::std::tr1::get;
|
||||
|
||||
// First, describes failures in the first N - 1 fields.
|
||||
TuplePrefix<N - 1>::ExplainMatchFailuresTo(matchers, values, os);
|
||||
|
||||
|
@ -774,7 +770,6 @@ class TuplePrefix<0> {
|
|||
template <typename MatcherTuple, typename ValueTuple>
|
||||
bool TupleMatches(const MatcherTuple& matcher_tuple,
|
||||
const ValueTuple& value_tuple) {
|
||||
using ::std::tr1::tuple_size;
|
||||
// Makes sure that matcher_tuple and value_tuple have the same
|
||||
// number of fields.
|
||||
GTEST_COMPILE_ASSERT_(tuple_size<MatcherTuple>::value ==
|
||||
|
@ -790,7 +785,6 @@ template <typename MatcherTuple, typename ValueTuple>
|
|||
void ExplainMatchFailureTupleTo(const MatcherTuple& matchers,
|
||||
const ValueTuple& values,
|
||||
::std::ostream* os) {
|
||||
using ::std::tr1::tuple_size;
|
||||
TuplePrefix<tuple_size<MatcherTuple>::value>::ExplainMatchFailuresTo(
|
||||
matchers, values, os);
|
||||
}
|
||||
|
@ -802,7 +796,7 @@ void ExplainMatchFailureTupleTo(const MatcherTuple& matchers,
|
|||
template <typename Tuple, typename Func, typename OutIter>
|
||||
class TransformTupleValuesHelper {
|
||||
private:
|
||||
typedef typename ::std::tr1::tuple_size<Tuple> TupleSize;
|
||||
typedef ::testing::tuple_size<Tuple> TupleSize;
|
||||
|
||||
public:
|
||||
// For each member of tuple 't', taken in order, evaluates '*out++ = f(t)'.
|
||||
|
@ -815,7 +809,7 @@ class TransformTupleValuesHelper {
|
|||
template <typename Tup, size_t kRemainingSize>
|
||||
struct IterateOverTuple {
|
||||
OutIter operator() (Func f, const Tup& t, OutIter out) const {
|
||||
*out++ = f(::std::tr1::get<TupleSize::value - kRemainingSize>(t));
|
||||
*out++ = f(::testing::get<TupleSize::value - kRemainingSize>(t));
|
||||
return IterateOverTuple<Tup, kRemainingSize - 1>()(f, t, out);
|
||||
}
|
||||
};
|
||||
|
@ -1322,12 +1316,12 @@ class MatchesRegexMatcher {
|
|||
class name##2Matcher { \
|
||||
public: \
|
||||
template <typename T1, typename T2> \
|
||||
operator Matcher< ::std::tr1::tuple<T1, T2> >() const { \
|
||||
return MakeMatcher(new Impl< ::std::tr1::tuple<T1, T2> >); \
|
||||
operator Matcher< ::testing::tuple<T1, T2> >() const { \
|
||||
return MakeMatcher(new Impl< ::testing::tuple<T1, T2> >); \
|
||||
} \
|
||||
template <typename T1, typename T2> \
|
||||
operator Matcher<const ::std::tr1::tuple<T1, T2>&>() const { \
|
||||
return MakeMatcher(new Impl<const ::std::tr1::tuple<T1, T2>&>); \
|
||||
operator Matcher<const ::testing::tuple<T1, T2>&>() const { \
|
||||
return MakeMatcher(new Impl<const ::testing::tuple<T1, T2>&>); \
|
||||
} \
|
||||
private: \
|
||||
template <typename Tuple> \
|
||||
|
@ -1336,7 +1330,7 @@ class MatchesRegexMatcher {
|
|||
virtual bool MatchAndExplain( \
|
||||
Tuple args, \
|
||||
MatchResultListener* /* listener */) const { \
|
||||
return ::std::tr1::get<0>(args) op ::std::tr1::get<1>(args); \
|
||||
return ::testing::get<0>(args) op ::testing::get<1>(args); \
|
||||
} \
|
||||
virtual void DescribeTo(::std::ostream* os) const { \
|
||||
*os << "are " relation; \
|
||||
|
@ -2543,7 +2537,7 @@ class PointwiseMatcher {
|
|||
// reference, as they may be expensive to copy. We must use tuple
|
||||
// instead of pair here, as a pair cannot hold references (C++ 98,
|
||||
// 20.2.2 [lib.pairs]).
|
||||
typedef ::std::tr1::tuple<const LhsValue&, const RhsValue&> InnerMatcherArg;
|
||||
typedef ::testing::tuple<const LhsValue&, const RhsValue&> InnerMatcherArg;
|
||||
|
||||
Impl(const TupleMatcher& tuple_matcher, const RhsStlContainer& rhs)
|
||||
// mono_tuple_matcher_ holds a monomorphic version of the tuple matcher.
|
||||
|
@ -3280,7 +3274,7 @@ class UnorderedElementsAreMatcher {
|
|||
typedef typename View::value_type Element;
|
||||
typedef ::std::vector<Matcher<const Element&> > MatcherVec;
|
||||
MatcherVec matchers;
|
||||
matchers.reserve(::std::tr1::tuple_size<MatcherTuple>::value);
|
||||
matchers.reserve(::testing::tuple_size<MatcherTuple>::value);
|
||||
TransformTupleValues(CastAndAppendTransform<const Element&>(), matchers_,
|
||||
::std::back_inserter(matchers));
|
||||
return MakeMatcher(new UnorderedElementsAreMatcherImpl<Container>(
|
||||
|
@ -3305,7 +3299,7 @@ class ElementsAreMatcher {
|
|||
typedef typename View::value_type Element;
|
||||
typedef ::std::vector<Matcher<const Element&> > MatcherVec;
|
||||
MatcherVec matchers;
|
||||
matchers.reserve(::std::tr1::tuple_size<MatcherTuple>::value);
|
||||
matchers.reserve(::testing::tuple_size<MatcherTuple>::value);
|
||||
TransformTupleValues(CastAndAppendTransform<const Element&>(), matchers_,
|
||||
::std::back_inserter(matchers));
|
||||
return MakeMatcher(new ElementsAreMatcherImpl<Container>(
|
||||
|
|
|
@ -158,7 +158,7 @@ WithArg(const InnerAction& action) {
|
|||
ACTION_TEMPLATE(ReturnArg,
|
||||
HAS_1_TEMPLATE_PARAMS(int, k),
|
||||
AND_0_VALUE_PARAMS()) {
|
||||
return std::tr1::get<k>(args);
|
||||
return ::testing::get<k>(args);
|
||||
}
|
||||
|
||||
// Action SaveArg<k>(pointer) saves the k-th (0-based) argument of the
|
||||
|
@ -166,7 +166,7 @@ ACTION_TEMPLATE(ReturnArg,
|
|||
ACTION_TEMPLATE(SaveArg,
|
||||
HAS_1_TEMPLATE_PARAMS(int, k),
|
||||
AND_1_VALUE_PARAMS(pointer)) {
|
||||
*pointer = ::std::tr1::get<k>(args);
|
||||
*pointer = ::testing::get<k>(args);
|
||||
}
|
||||
|
||||
// Action SaveArgPointee<k>(pointer) saves the value pointed to
|
||||
|
@ -174,7 +174,7 @@ ACTION_TEMPLATE(SaveArg,
|
|||
ACTION_TEMPLATE(SaveArgPointee,
|
||||
HAS_1_TEMPLATE_PARAMS(int, k),
|
||||
AND_1_VALUE_PARAMS(pointer)) {
|
||||
*pointer = *::std::tr1::get<k>(args);
|
||||
*pointer = *::testing::get<k>(args);
|
||||
}
|
||||
|
||||
// Action SetArgReferee<k>(value) assigns 'value' to the variable
|
||||
|
@ -182,13 +182,13 @@ ACTION_TEMPLATE(SaveArgPointee,
|
|||
ACTION_TEMPLATE(SetArgReferee,
|
||||
HAS_1_TEMPLATE_PARAMS(int, k),
|
||||
AND_1_VALUE_PARAMS(value)) {
|
||||
typedef typename ::std::tr1::tuple_element<k, args_type>::type argk_type;
|
||||
typedef typename ::testing::tuple_element<k, args_type>::type argk_type;
|
||||
// Ensures that argument #k is a reference. If you get a compiler
|
||||
// error on the next line, you are using SetArgReferee<k>(value) in
|
||||
// a mock function whose k-th (0-based) argument is not a reference.
|
||||
GTEST_COMPILE_ASSERT_(internal::is_reference<argk_type>::value,
|
||||
SetArgReferee_must_be_used_with_a_reference_argument);
|
||||
::std::tr1::get<k>(args) = value;
|
||||
::testing::get<k>(args) = value;
|
||||
}
|
||||
|
||||
// Action SetArrayArgument<k>(first, last) copies the elements in
|
||||
|
@ -201,9 +201,9 @@ ACTION_TEMPLATE(SetArrayArgument,
|
|||
AND_2_VALUE_PARAMS(first, last)) {
|
||||
// Visual Studio deprecates ::std::copy, so we use our own copy in that case.
|
||||
#ifdef _MSC_VER
|
||||
internal::CopyElements(first, last, ::std::tr1::get<k>(args));
|
||||
internal::CopyElements(first, last, ::testing::get<k>(args));
|
||||
#else
|
||||
::std::copy(first, last, ::std::tr1::get<k>(args));
|
||||
::std::copy(first, last, ::testing::get<k>(args));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -212,7 +212,7 @@ ACTION_TEMPLATE(SetArrayArgument,
|
|||
ACTION_TEMPLATE(DeleteArg,
|
||||
HAS_1_TEMPLATE_PARAMS(int, k),
|
||||
AND_0_VALUE_PARAMS()) {
|
||||
delete ::std::tr1::get<k>(args);
|
||||
delete ::testing::get<k>(args);
|
||||
}
|
||||
|
||||
// This action returns the value pointed to by 'pointer'.
|
||||
|
|
|
@ -69,70 +69,70 @@ template <typename Tuple>
|
|||
struct MatcherTuple;
|
||||
|
||||
template <>
|
||||
struct MatcherTuple< ::std::tr1::tuple<> > {
|
||||
typedef ::std::tr1::tuple< > type;
|
||||
struct MatcherTuple< ::testing::tuple<> > {
|
||||
typedef ::testing::tuple< > type;
|
||||
};
|
||||
|
||||
template <typename A1>
|
||||
struct MatcherTuple< ::std::tr1::tuple<A1> > {
|
||||
typedef ::std::tr1::tuple<Matcher<A1> > type;
|
||||
struct MatcherTuple< ::testing::tuple<A1> > {
|
||||
typedef ::testing::tuple<Matcher<A1> > type;
|
||||
};
|
||||
|
||||
template <typename A1, typename A2>
|
||||
struct MatcherTuple< ::std::tr1::tuple<A1, A2> > {
|
||||
typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2> > type;
|
||||
struct MatcherTuple< ::testing::tuple<A1, A2> > {
|
||||
typedef ::testing::tuple<Matcher<A1>, Matcher<A2> > type;
|
||||
};
|
||||
|
||||
template <typename A1, typename A2, typename A3>
|
||||
struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3> > {
|
||||
typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3> > type;
|
||||
struct MatcherTuple< ::testing::tuple<A1, A2, A3> > {
|
||||
typedef ::testing::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3> > type;
|
||||
};
|
||||
|
||||
template <typename A1, typename A2, typename A3, typename A4>
|
||||
struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4> > {
|
||||
typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>,
|
||||
struct MatcherTuple< ::testing::tuple<A1, A2, A3, A4> > {
|
||||
typedef ::testing::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>,
|
||||
Matcher<A4> > type;
|
||||
};
|
||||
|
||||
template <typename A1, typename A2, typename A3, typename A4, typename A5>
|
||||
struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5> > {
|
||||
typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
|
||||
struct MatcherTuple< ::testing::tuple<A1, A2, A3, A4, A5> > {
|
||||
typedef ::testing::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
|
||||
Matcher<A5> > type;
|
||||
};
|
||||
|
||||
template <typename A1, typename A2, typename A3, typename A4, typename A5,
|
||||
typename A6>
|
||||
struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5, A6> > {
|
||||
typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
|
||||
struct MatcherTuple< ::testing::tuple<A1, A2, A3, A4, A5, A6> > {
|
||||
typedef ::testing::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
|
||||
Matcher<A5>, Matcher<A6> > type;
|
||||
};
|
||||
|
||||
template <typename A1, typename A2, typename A3, typename A4, typename A5,
|
||||
typename A6, typename A7>
|
||||
struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7> > {
|
||||
typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
|
||||
struct MatcherTuple< ::testing::tuple<A1, A2, A3, A4, A5, A6, A7> > {
|
||||
typedef ::testing::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
|
||||
Matcher<A5>, Matcher<A6>, Matcher<A7> > type;
|
||||
};
|
||||
|
||||
template <typename A1, typename A2, typename A3, typename A4, typename A5,
|
||||
typename A6, typename A7, typename A8>
|
||||
struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8> > {
|
||||
typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
|
||||
struct MatcherTuple< ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8> > {
|
||||
typedef ::testing::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
|
||||
Matcher<A5>, Matcher<A6>, Matcher<A7>, Matcher<A8> > type;
|
||||
};
|
||||
|
||||
template <typename A1, typename A2, typename A3, typename A4, typename A5,
|
||||
typename A6, typename A7, typename A8, typename A9>
|
||||
struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9> > {
|
||||
typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
|
||||
struct MatcherTuple< ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9> > {
|
||||
typedef ::testing::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
|
||||
Matcher<A5>, Matcher<A6>, Matcher<A7>, Matcher<A8>, Matcher<A9> > type;
|
||||
};
|
||||
|
||||
template <typename A1, typename A2, typename A3, typename A4, typename A5,
|
||||
typename A6, typename A7, typename A8, typename A9, typename A10>
|
||||
struct MatcherTuple< ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9,
|
||||
struct MatcherTuple< ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9,
|
||||
A10> > {
|
||||
typedef ::std::tr1::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
|
||||
typedef ::testing::tuple<Matcher<A1>, Matcher<A2>, Matcher<A3>, Matcher<A4>,
|
||||
Matcher<A5>, Matcher<A6>, Matcher<A7>, Matcher<A8>, Matcher<A9>,
|
||||
Matcher<A10> > type;
|
||||
};
|
||||
|
@ -156,7 +156,7 @@ struct Function;
|
|||
template <typename R>
|
||||
struct Function<R()> {
|
||||
typedef R Result;
|
||||
typedef ::std::tr1::tuple<> ArgumentTuple;
|
||||
typedef ::testing::tuple<> ArgumentTuple;
|
||||
typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
|
||||
typedef void MakeResultVoid();
|
||||
typedef IgnoredValue MakeResultIgnoredValue();
|
||||
|
@ -166,7 +166,7 @@ template <typename R, typename A1>
|
|||
struct Function<R(A1)>
|
||||
: Function<R()> {
|
||||
typedef A1 Argument1;
|
||||
typedef ::std::tr1::tuple<A1> ArgumentTuple;
|
||||
typedef ::testing::tuple<A1> ArgumentTuple;
|
||||
typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
|
||||
typedef void MakeResultVoid(A1);
|
||||
typedef IgnoredValue MakeResultIgnoredValue(A1);
|
||||
|
@ -176,7 +176,7 @@ template <typename R, typename A1, typename A2>
|
|||
struct Function<R(A1, A2)>
|
||||
: Function<R(A1)> {
|
||||
typedef A2 Argument2;
|
||||
typedef ::std::tr1::tuple<A1, A2> ArgumentTuple;
|
||||
typedef ::testing::tuple<A1, A2> ArgumentTuple;
|
||||
typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
|
||||
typedef void MakeResultVoid(A1, A2);
|
||||
typedef IgnoredValue MakeResultIgnoredValue(A1, A2);
|
||||
|
@ -186,7 +186,7 @@ template <typename R, typename A1, typename A2, typename A3>
|
|||
struct Function<R(A1, A2, A3)>
|
||||
: Function<R(A1, A2)> {
|
||||
typedef A3 Argument3;
|
||||
typedef ::std::tr1::tuple<A1, A2, A3> ArgumentTuple;
|
||||
typedef ::testing::tuple<A1, A2, A3> ArgumentTuple;
|
||||
typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
|
||||
typedef void MakeResultVoid(A1, A2, A3);
|
||||
typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3);
|
||||
|
@ -196,7 +196,7 @@ template <typename R, typename A1, typename A2, typename A3, typename A4>
|
|||
struct Function<R(A1, A2, A3, A4)>
|
||||
: Function<R(A1, A2, A3)> {
|
||||
typedef A4 Argument4;
|
||||
typedef ::std::tr1::tuple<A1, A2, A3, A4> ArgumentTuple;
|
||||
typedef ::testing::tuple<A1, A2, A3, A4> ArgumentTuple;
|
||||
typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
|
||||
typedef void MakeResultVoid(A1, A2, A3, A4);
|
||||
typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4);
|
||||
|
@ -207,7 +207,7 @@ template <typename R, typename A1, typename A2, typename A3, typename A4,
|
|||
struct Function<R(A1, A2, A3, A4, A5)>
|
||||
: Function<R(A1, A2, A3, A4)> {
|
||||
typedef A5 Argument5;
|
||||
typedef ::std::tr1::tuple<A1, A2, A3, A4, A5> ArgumentTuple;
|
||||
typedef ::testing::tuple<A1, A2, A3, A4, A5> ArgumentTuple;
|
||||
typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
|
||||
typedef void MakeResultVoid(A1, A2, A3, A4, A5);
|
||||
typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5);
|
||||
|
@ -218,7 +218,7 @@ template <typename R, typename A1, typename A2, typename A3, typename A4,
|
|||
struct Function<R(A1, A2, A3, A4, A5, A6)>
|
||||
: Function<R(A1, A2, A3, A4, A5)> {
|
||||
typedef A6 Argument6;
|
||||
typedef ::std::tr1::tuple<A1, A2, A3, A4, A5, A6> ArgumentTuple;
|
||||
typedef ::testing::tuple<A1, A2, A3, A4, A5, A6> ArgumentTuple;
|
||||
typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
|
||||
typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6);
|
||||
typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6);
|
||||
|
@ -229,7 +229,7 @@ template <typename R, typename A1, typename A2, typename A3, typename A4,
|
|||
struct Function<R(A1, A2, A3, A4, A5, A6, A7)>
|
||||
: Function<R(A1, A2, A3, A4, A5, A6)> {
|
||||
typedef A7 Argument7;
|
||||
typedef ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7> ArgumentTuple;
|
||||
typedef ::testing::tuple<A1, A2, A3, A4, A5, A6, A7> ArgumentTuple;
|
||||
typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
|
||||
typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7);
|
||||
typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7);
|
||||
|
@ -240,7 +240,7 @@ template <typename R, typename A1, typename A2, typename A3, typename A4,
|
|||
struct Function<R(A1, A2, A3, A4, A5, A6, A7, A8)>
|
||||
: Function<R(A1, A2, A3, A4, A5, A6, A7)> {
|
||||
typedef A8 Argument8;
|
||||
typedef ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8> ArgumentTuple;
|
||||
typedef ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8> ArgumentTuple;
|
||||
typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
|
||||
typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7, A8);
|
||||
typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7, A8);
|
||||
|
@ -251,7 +251,7 @@ template <typename R, typename A1, typename A2, typename A3, typename A4,
|
|||
struct Function<R(A1, A2, A3, A4, A5, A6, A7, A8, A9)>
|
||||
: Function<R(A1, A2, A3, A4, A5, A6, A7, A8)> {
|
||||
typedef A9 Argument9;
|
||||
typedef ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9> ArgumentTuple;
|
||||
typedef ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9> ArgumentTuple;
|
||||
typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
|
||||
typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7, A8, A9);
|
||||
typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7, A8,
|
||||
|
@ -264,7 +264,7 @@ template <typename R, typename A1, typename A2, typename A3, typename A4,
|
|||
struct Function<R(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)>
|
||||
: Function<R(A1, A2, A3, A4, A5, A6, A7, A8, A9)> {
|
||||
typedef A10 Argument10;
|
||||
typedef ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9,
|
||||
typedef ::testing::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9,
|
||||
A10> ArgumentTuple;
|
||||
typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
|
||||
typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10);
|
||||
|
|
|
@ -77,8 +77,8 @@ $var typename_As = [[$for j, [[typename A$j]]]]
|
|||
$var As = [[$for j, [[A$j]]]]
|
||||
$var matcher_As = [[$for j, [[Matcher<A$j>]]]]
|
||||
template <$typename_As>
|
||||
struct MatcherTuple< ::std::tr1::tuple<$As> > {
|
||||
typedef ::std::tr1::tuple<$matcher_As > type;
|
||||
struct MatcherTuple< ::testing::tuple<$As> > {
|
||||
typedef ::testing::tuple<$matcher_As > type;
|
||||
};
|
||||
|
||||
|
||||
|
@ -102,7 +102,7 @@ struct Function;
|
|||
template <typename R>
|
||||
struct Function<R()> {
|
||||
typedef R Result;
|
||||
typedef ::std::tr1::tuple<> ArgumentTuple;
|
||||
typedef ::testing::tuple<> ArgumentTuple;
|
||||
typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
|
||||
typedef void MakeResultVoid();
|
||||
typedef IgnoredValue MakeResultIgnoredValue();
|
||||
|
@ -121,7 +121,7 @@ template <typename R$typename_As>
|
|||
struct Function<R($As)>
|
||||
: Function<R($prev_As)> {
|
||||
typedef A$i Argument$i;
|
||||
typedef ::std::tr1::tuple<$As> ArgumentTuple;
|
||||
typedef ::testing::tuple<$As> ArgumentTuple;
|
||||
typedef typename MatcherTuple<ArgumentTuple>::type ArgumentMatcherTuple;
|
||||
typedef void MakeResultVoid($As);
|
||||
typedef IgnoredValue MakeResultIgnoredValue($As);
|
||||
|
|
|
@ -464,7 +464,7 @@ class StlContainerView<Element[N]> {
|
|||
// This specialization is used when RawContainer is a native array
|
||||
// represented as a (pointer, size) tuple.
|
||||
template <typename ElementPointer, typename Size>
|
||||
class StlContainerView< ::std::tr1::tuple<ElementPointer, Size> > {
|
||||
class StlContainerView< ::testing::tuple<ElementPointer, Size> > {
|
||||
public:
|
||||
typedef GTEST_REMOVE_CONST_(
|
||||
typename internal::PointeeOf<ElementPointer>::type) RawElement;
|
||||
|
@ -472,12 +472,10 @@ class StlContainerView< ::std::tr1::tuple<ElementPointer, Size> > {
|
|||
typedef const type const_reference;
|
||||
|
||||
static const_reference ConstReference(
|
||||
const ::std::tr1::tuple<ElementPointer, Size>& array) {
|
||||
using ::std::tr1::get;
|
||||
const ::testing::tuple<ElementPointer, Size>& array) {
|
||||
return type(get<0>(array), get<1>(array), kReference);
|
||||
}
|
||||
static type Copy(const ::std::tr1::tuple<ElementPointer, Size>& array) {
|
||||
using ::std::tr1::get;
|
||||
static type Copy(const ::testing::tuple<ElementPointer, Size>& array) {
|
||||
return type(get<0>(array), get<1>(array), kCopy);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -45,10 +45,10 @@
|
|||
|
||||
namespace {
|
||||
|
||||
using ::std::tr1::get;
|
||||
using ::std::tr1::make_tuple;
|
||||
using ::std::tr1::tuple;
|
||||
using ::std::tr1::tuple_element;
|
||||
using testing::get;
|
||||
using testing::make_tuple;
|
||||
using testing::tuple;
|
||||
using testing::tuple_element;
|
||||
using testing::internal::BuiltInDefaultValue;
|
||||
using testing::internal::Int64;
|
||||
using testing::internal::UInt64;
|
||||
|
|
|
@ -46,10 +46,10 @@ namespace gmock_generated_actions_test {
|
|||
|
||||
using ::std::plus;
|
||||
using ::std::string;
|
||||
using ::std::tr1::get;
|
||||
using ::std::tr1::make_tuple;
|
||||
using ::std::tr1::tuple;
|
||||
using ::std::tr1::tuple_element;
|
||||
using testing::get;
|
||||
using testing::make_tuple;
|
||||
using testing::tuple;
|
||||
using testing::tuple_element;
|
||||
using testing::_;
|
||||
using testing::Action;
|
||||
using testing::ActionInterface;
|
||||
|
@ -639,7 +639,7 @@ TEST(ActionMacroTest, CanReferenceArgumentType) {
|
|||
// Tests that the body of ACTION() can reference the argument tuple
|
||||
// via args_type and args.
|
||||
ACTION(Sum2) {
|
||||
StaticAssertTypeEq< ::std::tr1::tuple<int, char, int*>, args_type>();
|
||||
StaticAssertTypeEq<tuple<int, char, int*>, args_type>();
|
||||
args_type args_copy = args;
|
||||
return get<0>(args_copy) + get<1>(args_copy);
|
||||
}
|
||||
|
@ -1098,7 +1098,7 @@ TEST(ActionTemplateTest, WorksWithValueParams) {
|
|||
ACTION_TEMPLATE(MyDeleteArg,
|
||||
HAS_1_TEMPLATE_PARAMS(int, k),
|
||||
AND_0_VALUE_PARAMS()) {
|
||||
delete std::tr1::get<k>(args);
|
||||
delete get<k>(args);
|
||||
}
|
||||
|
||||
// Resets a bool variable in the destructor.
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
namespace {
|
||||
|
||||
using ::std::tr1::tuple;
|
||||
using ::testing::tuple;
|
||||
using ::testing::Matcher;
|
||||
using ::testing::internal::CompileAssertTypesEqual;
|
||||
using ::testing::internal::MatcherTuple;
|
||||
|
|
|
@ -53,9 +53,9 @@ using std::pair;
|
|||
using std::set;
|
||||
using std::stringstream;
|
||||
using std::vector;
|
||||
using std::tr1::get;
|
||||
using std::tr1::make_tuple;
|
||||
using std::tr1::tuple;
|
||||
using testing::get;
|
||||
using testing::make_tuple;
|
||||
using testing::tuple;
|
||||
using testing::_;
|
||||
using testing::Args;
|
||||
using testing::Contains;
|
||||
|
@ -507,7 +507,7 @@ class NativeArrayPassedAsPointerAndSize {
|
|||
|
||||
TEST(ElementsAreTest, WorksWithNativeArrayPassedAsPointerAndSize) {
|
||||
int array[] = { 0, 1 };
|
||||
::std::tr1::tuple<int*, size_t> array_as_tuple(array, 2);
|
||||
::testing::tuple<int*, size_t> array_as_tuple(array, 2);
|
||||
EXPECT_THAT(array_as_tuple, ElementsAre(0, 1));
|
||||
EXPECT_THAT(array_as_tuple, Not(ElementsAre(0)));
|
||||
|
||||
|
@ -561,7 +561,7 @@ TEST(ElementsAreTest, MakesCopyOfArguments) {
|
|||
int x = 1;
|
||||
int y = 2;
|
||||
// This should make a copy of x and y.
|
||||
::testing::internal::ElementsAreMatcher<std::tr1::tuple<int, int> >
|
||||
::testing::internal::ElementsAreMatcher<testing::tuple<int, int> >
|
||||
polymorphic_matcher = ElementsAre(x, y);
|
||||
// Changing x and y now shouldn't affect the meaning of the above matcher.
|
||||
x = y = 0;
|
||||
|
|
|
@ -59,9 +59,6 @@ namespace internal {
|
|||
|
||||
namespace {
|
||||
|
||||
using ::std::tr1::make_tuple;
|
||||
using ::std::tr1::tuple;
|
||||
|
||||
TEST(ConvertIdentifierNameToWordsTest, WorksWhenNameContainsNoWord) {
|
||||
EXPECT_EQ("", ConvertIdentifierNameToWords(""));
|
||||
EXPECT_EQ("", ConvertIdentifierNameToWords("_"));
|
||||
|
|
|
@ -81,9 +81,9 @@ using std::ostream;
|
|||
using std::pair;
|
||||
using std::set;
|
||||
using std::stringstream;
|
||||
using std::tr1::get;
|
||||
using std::tr1::make_tuple;
|
||||
using std::tr1::tuple;
|
||||
using testing::get;
|
||||
using testing::make_tuple;
|
||||
using testing::tuple;
|
||||
using std::vector;
|
||||
using testing::A;
|
||||
using testing::AllArgs;
|
||||
|
@ -1896,7 +1896,7 @@ TEST(GlobalWideEndsWithTest, CanDescribeSelf) {
|
|||
#endif // GTEST_HAS_GLOBAL_WSTRING
|
||||
|
||||
|
||||
typedef ::std::tr1::tuple<long, int> Tuple2; // NOLINT
|
||||
typedef ::testing::tuple<long, int> Tuple2; // NOLINT
|
||||
|
||||
// Tests that Eq() matches a 2-tuple where the first field == the
|
||||
// second field.
|
||||
|
|
|
@ -47,10 +47,10 @@ namespace gmock_more_actions_test {
|
|||
|
||||
using ::std::plus;
|
||||
using ::std::string;
|
||||
using ::std::tr1::get;
|
||||
using ::std::tr1::make_tuple;
|
||||
using ::std::tr1::tuple;
|
||||
using ::std::tr1::tuple_element;
|
||||
using testing::get;
|
||||
using testing::make_tuple;
|
||||
using testing::tuple;
|
||||
using testing::tuple_element;
|
||||
using testing::_;
|
||||
using testing::Action;
|
||||
using testing::ActionInterface;
|
||||
|
|
Loading…
Reference in New Issue
Block a user