45#include "gtest/gtest.h"
46#include "gtest/gtest-spi.h"
54using std::stringstream;
57using testing::make_tuple;
101template <
typename MatcherType,
typename Value>
104 m.ExplainMatchResultTo(x, &ss);
110TEST(ArgsTest, AcceptsZeroTemplateArg) {
111 const tuple<int, bool>
t(5,
true);
116TEST(ArgsTest, AcceptsOneTemplateArg) {
117 const tuple<int, bool>
t(5,
true);
123TEST(ArgsTest, AcceptsTwoTemplateArgs) {
124 const tuple<short, int, long>
t(4, 5, 6L);
131TEST(ArgsTest, AcceptsRepeatedTemplateArgs) {
132 const tuple<short, int, long>
t(4, 5, 6L);
137TEST(ArgsTest, AcceptsDecreasingTemplateArgs) {
138 const tuple<short, int, long>
t(4, 5, 6L);
149# pragma warning(push)
150# pragma warning(disable:4100)
157TEST(ArgsTest, AcceptsMoreTemplateArgsThanArityOfOriginalTuple) {
162TEST(ArgsTest, CanBeNested) {
163 const tuple<short, int, long, int>
t(4, 5, 6L, 6);
168TEST(ArgsTest, CanMatchTupleByValue) {
169 typedef tuple<char, int, int> Tuple3;
175TEST(ArgsTest, CanMatchTupleByReference) {
176 typedef tuple<char, char, int> Tuple3;
187TEST(ArgsTest, AcceptsTenTemplateArgs) {
188 EXPECT_THAT(
make_tuple(0, 1L, 2, 3L, 4, 5, 6, 7, 8, 9),
189 (Args<9, 8, 7, 6, 5, 4, 3, 2, 1, 0>(
190 PrintsAs(
"(9, 8, 7, 6, 5, 4, 3, 2, 1, 0)"))));
191 EXPECT_THAT(
make_tuple(0, 1L, 2, 3L, 4, 5, 6, 7, 8, 9),
192 Not(Args<9, 8, 7, 6, 5, 4, 3, 2, 1, 0>(
193 PrintsAs(
"(0, 8, 7, 6, 5, 4, 3, 2, 1, 0)"))));
196TEST(ArgsTest, DescirbesSelfCorrectly) {
198 EXPECT_EQ(
"are a tuple whose fields (#2, #0) are a pair where "
199 "the first < the second",
203TEST(ArgsTest, DescirbesNestedArgsCorrectly) {
205 Args<0, 2, 3>(Args<2, 0>(
Lt()));
206 EXPECT_EQ(
"are a tuple whose fields (#0, #2, #3) are a tuple "
207 "whose fields (#2, #0) are a pair where the first < the second",
211TEST(ArgsTest, DescribesNegationCorrectly) {
213 EXPECT_EQ(
"are a tuple whose fields (#1, #0) aren't a pair "
214 "where the first > the second",
218TEST(ArgsTest, ExplainsMatchResultWithoutInnerExplanation) {
220 EXPECT_EQ(
"whose fields (#1, #2) are (42, 42)",
222 EXPECT_EQ(
"whose fields (#1, #2) are (42, 43)",
227class LessThanMatcher :
public MatcherInterface<tuple<char, int> > {
229 virtual void DescribeTo(::std::ostream* os)
const {}
231 virtual bool MatchAndExplain(tuple<char, int>
value,
232 MatchResultListener* listener)
const {
235 *listener <<
"where the first value is " <<
diff
236 <<
" more than the second";
246TEST(ArgsTest, ExplainsMatchResultWithInnerExplanation) {
248 EXPECT_EQ(
"whose fields (#0, #2) are ('a' (97, 0x61), 42), "
249 "where the first value is 55 more than the second",
251 EXPECT_EQ(
"whose fields (#0, #2) are ('\\0', 43)",
256class GreaterThanMatcher :
public MatcherInterface<int> {
258 explicit GreaterThanMatcher(
int rhs) : rhs_(rhs) {}
260 virtual void DescribeTo(::std::ostream* os)
const {
261 *os <<
"is greater than " << rhs_;
264 virtual bool MatchAndExplain(
int lhs,
265 MatchResultListener* listener)
const {
266 const int diff = lhs - rhs_;
268 *listener <<
"which is " <<
diff <<
" more than " << rhs_;
269 }
else if (diff == 0) {
270 *listener <<
"which is the same as " << rhs_;
272 *listener <<
"which is " << -
diff <<
" less than " << rhs_;
288TEST(ElementsAreTest, CanDescribeExpectingNoElement) {
293TEST(ElementsAreTest, CanDescribeExpectingOneElement) {
298TEST(ElementsAreTest, CanDescribeExpectingManyElements) {
301 "element #0 is equal to \"one\",\n"
302 "element #1 is equal to \"two\"",
Describe(m));
305TEST(ElementsAreTest, CanDescribeNegationOfExpectingNoElement) {
310TEST(ElementsAreTest, CanDescribeNegationOfExpectingOneElment) {
316TEST(ElementsAreTest, CanDescribeNegationOfExpectingManyElements) {
318 EXPECT_EQ(
"doesn't have 2 elements, or\n"
319 "element #0 isn't equal to \"one\", or\n"
323TEST(ElementsAreTest, DoesNotExplainTrivialMatch) {
332TEST(ElementsAreTest, ExplainsNonTrivialMatch) {
336 const int a[] = { 10, 0, 100 };
338 EXPECT_EQ(
"whose element #0 matches, which is 9 more than 1,\n"
339 "and whose element #2 matches, which is 98 more than 2",
343TEST(ElementsAreTest, CanExplainMismatchWrongSize) {
354TEST(ElementsAreTest, CanExplainMismatchRightSize) {
363 EXPECT_EQ(
"whose element #1 doesn't match, which is 4 less than 5",
367TEST(ElementsAreTest, MatchesOneElementVector) {
369 test_vector.push_back(
"test string");
374TEST(ElementsAreTest, MatchesOneElementList) {
381TEST(ElementsAreTest, MatchesThreeElementVector) {
383 test_vector.push_back(
"one");
384 test_vector.push_back(
"two");
385 test_vector.push_back(
"three");
390TEST(ElementsAreTest, MatchesOneElementEqMatcher) {
392 test_vector.push_back(4);
397TEST(ElementsAreTest, MatchesOneElementAnyMatcher) {
399 test_vector.push_back(4);
404TEST(ElementsAreTest, MatchesOneElementValue) {
406 test_vector.push_back(4);
411TEST(ElementsAreTest, MatchesThreeElementsMixedMatchers) {
413 test_vector.push_back(1);
414 test_vector.push_back(2);
415 test_vector.push_back(3);
420TEST(ElementsAreTest, MatchesTenElementVector) {
421 const int a[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
430TEST(ElementsAreTest, DoesNotMatchWrongSize) {
432 test_vector.push_back(
"test string");
433 test_vector.push_back(
"test string");
439TEST(ElementsAreTest, DoesNotMatchWrongValue) {
441 test_vector.push_back(
"other string");
447TEST(ElementsAreTest, DoesNotMatchWrongOrder) {
449 test_vector.push_back(
"one");
450 test_vector.push_back(
"three");
451 test_vector.push_back(
"two");
458TEST(ElementsAreTest, WorksForNestedContainer) {
459 const char* strings[] = {
466 nested.push_back(list<char>(strings[i], strings[i] + strlen(strings[i])));
475TEST(ElementsAreTest, WorksWithByRefElementMatchers) {
476 int a[] = { 0, 1, 2 };
483TEST(ElementsAreTest, WorksWithContainerPointerUsingPointee) {
484 int a[] = { 0, 1, 2 };
491TEST(ElementsAreTest, WorksWithNativeArrayPassedByReference) {
492 int array[] = { 0, 1, 2 };
498class NativeArrayPassedAsPointerAndSize {
500 NativeArrayPassedAsPointerAndSize() {}
508TEST(ElementsAreTest, WorksWithNativeArrayPassedAsPointerAndSize) {
509 int array[] = { 0, 1 };
510 ::testing::tuple<int*, size_t> array_as_tuple(array, 2);
514 NativeArrayPassedAsPointerAndSize helper;
517 helper.Helper(array, 2);
520TEST(ElementsAreTest, WorksWithTwoDimensionalNativeArray) {
521 const char a2[][3] = {
"hi",
"lo" };
529TEST(ElementsAreTest, AcceptsStringLiteral) {
530 string array[] = {
"hi",
"one",
"two" };
543extern const char kHi[];
545TEST(ElementsAreTest, AcceptsArrayWithUnknownSize) {
549 string array1[] = {
"hi" };
552 string array2[] = {
"ho" };
556const char kHi[] =
"hi";
560TEST(ElementsAreTest, MakesCopyOfArguments) {
568 const int array1[] = { 1, 2 };
570 const int array2[] = { 0, 0 };
579TEST(ElementsAreArrayTest, CanBeCreatedWithValueArray) {
580 const int a[] = { 1, 2, 3 };
589TEST(ElementsAreArrayTest, CanBeCreatedWithArraySize) {
590 const char*
a[] = {
"one",
"two",
"three" };
596 test_vector[0] =
"1";
600TEST(ElementsAreArrayTest, CanBeCreatedWithoutArraySize) {
601 const char*
a[] = {
"one",
"two",
"three" };
606 test_vector[0] =
"1";
610TEST(ElementsAreArrayTest, CanBeCreatedWithMatcherArray) {
615 test_vector.push_back(
"one");
616 test_vector.push_back(
"two");
617 test_vector.push_back(
"three");
620 test_vector.push_back(
"three");
624TEST(ElementsAreArrayTest, CanBeCreatedWithVector) {
625 const int a[] = { 1, 2, 3 };
629 test_vector.push_back(4);
633#if GTEST_HAS_STD_INITIALIZER_LIST_
635TEST(ElementsAreArrayTest, TakesInitializerList) {
636 const int a[5] = { 1, 2, 3, 4, 5 };
642TEST(ElementsAreArrayTest, TakesInitializerListOfCStrings) {
643 const string a[5] = {
"a",
"b",
"c",
"d",
"e" };
649TEST(ElementsAreArrayTest, TakesInitializerListOfSameTypedMatchers) {
650 const int a[5] = { 1, 2, 3, 4, 5 };
657TEST(ElementsAreArrayTest,
658 TakesInitializerListOfDifferentTypedMatchers) {
659 const int a[5] = { 1, 2, 3, 4, 5 };
671TEST(ElementsAreArrayTest, CanBeCreatedWithMatcherVector) {
672 const int a[] = { 1, 2, 3 };
678 test_vector.push_back(4);
682TEST(ElementsAreArrayTest, CanBeCreatedWithIteratorRange) {
683 const int a[] = { 1, 2, 3 };
690 int*
const null_int = NULL;
697TEST(ElementsAreArrayTest, WorksWithNativeArray) {
698 ::std::string
a[] = {
"hi",
"ho" };
699 ::std::string
b[] = {
"hi",
"ho" };
706TEST(ElementsAreArrayTest, SourceLifeSpan) {
707 const int a[] = { 1, 2, 3 };
710 ElementsAreArrayMatcher<int> matcher_maker =
716 for (Iter it =
expect.begin(); it !=
expect.end(); ++it) { *it += 10; }
718 test_vector.push_back(3);
726MATCHER(IsEven,
"") {
return (arg % 2) == 0; }
728TEST(MatcherMacroTest, Works) {
740MATCHER(IsEven2, negation ?
"is odd" :
"is even") {
741 if ((arg % 2) == 0) {
744 *result_listener <<
"OK";
747 *result_listener <<
"% 2 == " << (arg % 2);
755 string(negation ?
"doesn't equal" :
"equals") +
" the sum of " +
757 if (arg == (x + y)) {
758 *result_listener <<
"OK";
763 if (result_listener->stream() != NULL) {
764 *result_listener->stream() <<
"diff == " << (x + y - arg);
772TEST(MatcherMacroTest, DescriptionCanReferenceNegationAndParameters) {
783TEST(MatcherMacroTest, CanExplainMatchResult) {
801MATCHER(IsEmptyStringByRef,
"") {
806TEST(MatcherMacroTest, CanReferenceArgType) {
817MATCHER(IsOdd,
"") {
return (arg % 2) != 0; }
820TEST(MatcherMacroTest, WorksInNamespace) {
828 return Value(arg, matcher_test::IsOdd()) && arg > 0;
831TEST(MatcherMacroTest, CanBeComposedUsingValue) {
839MATCHER_P(IsGreaterThan32And, n,
"") {
return arg > 32 && arg > n; }
841TEST(MatcherPMacroTest, Works) {
853MATCHER_P(_is_Greater_Than32and_, n,
"") {
return arg > 32 && arg > n; }
855TEST(MatcherPMacroTest, GeneratesCorrectDescription) {
869 explicit UncopyableFoo(
char value) : value_(
value) {}
871 UncopyableFoo(
const UncopyableFoo&);
872 void operator=(
const UncopyableFoo&);
877MATCHER_P(ReferencesUncopyable, variable,
"") {
return &arg == &variable; }
879TEST(MatcherPMacroTest, WorksWhenExplicitlyInstantiatedWithReference) {
880 UncopyableFoo foo1(
'1'), foo2(
'2');
882 ReferencesUncopyable<const UncopyableFoo&>(foo1);
905TEST(MatcherPnMacroTest, CanReferenceParamTypes) {
906 EXPECT_THAT(0, ParamTypesAreIntLongAndChar(10, 20L,
'a'));
912MATCHER_P2(ReferencesAnyOf, variable1, variable2,
"") {
913 return &arg == &variable1 || &arg == &variable2;
916TEST(MatcherPnMacroTest, WorksWhenExplicitlyInstantiatedWithReferences) {
917 UncopyableFoo foo1(
'1'), foo2(
'2'), foo3(
'3');
919 ReferencesAnyOf<const UncopyableFoo&, const UncopyableFoo&>(foo1, foo2);
926TEST(MatcherPnMacroTest,
927 GeneratesCorretDescriptionWhenExplicitlyInstantiatedWithReferences) {
928 UncopyableFoo foo1(
'1'), foo2(
'2');
930 ReferencesAnyOf<const UncopyableFoo&, const UncopyableFoo&>(foo1, foo2);
936 EXPECT_EQ(
"references any of (1-byte object <31>, 1-byte object <32>)",
942MATCHER_P2(IsNotInClosedRange, low, hi,
"") {
return arg < low || arg > hi; }
944TEST(MatcherPnMacroTest, Works) {
958MATCHER(EqualsSumOf,
"") {
return arg == 0; }
965 return arg ==
a +
b +
c +
d +
e + f;
968 return arg ==
a +
b +
c +
d +
e + f + g;
971 return arg ==
a +
b +
c +
d +
e + f + g +
h;
973MATCHER_P9(EqualsSumOf,
a,
b, c,
d, e, f, g,
h, i,
"") {
974 return arg ==
a +
b +
c +
d +
e + f + g +
h +
i;
976MATCHER_P10(EqualsSumOf,
a,
b, c,
d, e, f, g,
h, i, j,
"") {
977 return arg ==
a +
b +
c +
d +
e + f + g +
h +
i + j;
980TEST(MatcherPnMacroTest, CanBeOverloadedOnNumberOfParameters) {
986 EXPECT_THAT(12345, EqualsSumOf(10000, 2000, 300, 40, 5));
988 EqualsSumOf(::std::string(
"a"),
'b',
'c',
"d",
"e",
'f'));
990 EqualsSumOf(::std::string(
"a"),
'b',
'c',
"d",
"e",
'f',
'g'));
992 EqualsSumOf(::std::string(
"a"),
'b',
'c',
"d",
"e",
'f',
'g',
995 EqualsSumOf(::std::string(
"a"),
'b',
'c',
"d",
"e",
'f',
'g',
998 EqualsSumOf(::std::string(
"a"),
'b',
'c',
"d",
"e",
'f',
'g',
999 "h",
'i', ::std::string(
"j")));
1008 Not(EqualsSumOf(::std::string(
"a"),
'b',
'c',
"d",
"e",
'f')));
1010 Not(EqualsSumOf(::std::string(
"a"),
'b',
'c',
"d",
"e",
'f',
1013 Not(EqualsSumOf(::std::string(
"a"),
'b',
'c',
"d",
"e",
'f',
'g',
1016 Not(EqualsSumOf(::std::string(
"a"),
'b',
'c',
"d",
"e",
'f',
'g',
1019 Not(EqualsSumOf(::std::string(
"a"),
'b',
'c',
"d",
"e",
'f',
'g',
1020 "h",
'i', ::std::string(
"j"))));
1025TEST(MatcherPnMacroTest, WorksForDifferentParameterTypes) {
1026 EXPECT_THAT(123, EqualsSumOf(100L, 20,
static_cast<char>(3)));
1027 EXPECT_THAT(
"abcd", EqualsSumOf(::std::string(
"a"),
"b",
'c',
"d"));
1029 EXPECT_THAT(124,
Not(EqualsSumOf(100L, 20,
static_cast<char>(3))));
1030 EXPECT_THAT(
"abcde",
Not(EqualsSumOf(::std::string(
"a"),
"b",
'c',
"d")));
1037 std::string prefix_str(prefix);
1038 char suffix_char =
static_cast<char>(suffix);
1039 return arg == prefix_str + suffix_char;
1042TEST(MatcherPnMacroTest, SimpleTypePromotion) {
1044 EqConcat(std::string(
"foo"),
't');
1046 EqConcat(
"foo",
static_cast<int>(
't'));
1055TEST(MatcherPnMacroTest, TypesAreCorrect) {
1057 EqualsSumOfMatcher a0 = EqualsSumOf();
1060 EqualsSumOfMatcherP<int> a1 = EqualsSumOf(1);
1064 EqualsSumOfMatcherP2<int, char> a2 = EqualsSumOf(1,
'2');
1065 EqualsSumOfMatcherP3<int, int, char> a3 = EqualsSumOf(1, 2,
'3');
1066 EqualsSumOfMatcherP4<int, int, int, char> a4 = EqualsSumOf(1, 2, 3,
'4');
1067 EqualsSumOfMatcherP5<int, int, int, int, char> a5 =
1068 EqualsSumOf(1, 2, 3, 4,
'5');
1069 EqualsSumOfMatcherP6<int, int, int, int, int, char> a6 =
1070 EqualsSumOf(1, 2, 3, 4, 5,
'6');
1071 EqualsSumOfMatcherP7<int, int, int, int, int, int, char> a7 =
1072 EqualsSumOf(1, 2, 3, 4, 5, 6,
'7');
1073 EqualsSumOfMatcherP8<int, int, int, int, int, int, int, char> a8 =
1074 EqualsSumOf(1, 2, 3, 4, 5, 6, 7,
'8');
1075 EqualsSumOfMatcherP9<int, int, int, int, int, int, int, int, char> a9 =
1076 EqualsSumOf(1, 2, 3, 4, 5, 6, 7, 8,
'9');
1077 EqualsSumOfMatcherP10<int, int, int, int, int, int, int, int, int, char> a10 =
1078 EqualsSumOf(1, 2, 3, 4, 5, 6, 7, 8, 9,
'0');
1099 const int count =
static_cast<int>(
Value(arg, m1))
1100 +
static_cast<int>(
Value(arg, m2)) +
static_cast<int>(
Value(arg, m3));
1104TEST(MatcherPnMacroTest, CanUseMatcherTypedParameterInValue) {
1111TEST(ContainsTest, ListMatchesWhenElementIsInContainer) {
1112 list<int> some_list;
1113 some_list.push_back(3);
1114 some_list.push_back(1);
1115 some_list.push_back(2);
1120 list<string> another_list;
1121 another_list.push_back(
"fee");
1122 another_list.push_back(
"fie");
1123 another_list.push_back(
"foe");
1124 another_list.push_back(
"fum");
1128TEST(ContainsTest, ListDoesNotMatchWhenElementIsNotInContainer) {
1129 list<int> some_list;
1130 some_list.push_back(3);
1131 some_list.push_back(1);
1135TEST(ContainsTest, SetMatchesWhenElementIsInContainer) {
1144 set<const char*> another_set;
1145 another_set.insert(
"fee");
1146 another_set.insert(
"fie");
1147 another_set.insert(
"foe");
1148 another_set.insert(
"fum");
1152TEST(ContainsTest, SetDoesNotMatchWhenElementIsNotInContainer) {
1158 set<const char*> c_string_set;
1159 c_string_set.insert(
"hello");
1163TEST(ContainsTest, ExplainsMatchResultCorrectly) {
1164 const int a[2] = { 1, 2 };
1178TEST(ContainsTest, DescribesItselfCorrectly) {
1186TEST(ContainsTest, MapMatchesWhenElementIsInContainer) {
1187 map<const char*, int> my_map;
1188 const char*
bar =
"a string";
1192 map<string, int> another_map;
1193 another_map[
"fee"] = 1;
1194 another_map[
"fie"] = 2;
1195 another_map[
"foe"] = 3;
1196 another_map[
"fum"] = 4;
1201TEST(ContainsTest, MapDoesNotMatchWhenElementIsNotInContainer) {
1202 map<int, int> some_map;
1208TEST(ContainsTest, ArrayMatchesWhenElementIsInContainer) {
1209 const char* string_array[] = {
"fee",
"fie",
"foe",
"fum" };
1213TEST(ContainsTest, ArrayDoesNotMatchWhenElementIsNotInContainer) {
1214 int int_array[] = { 1, 2, 3, 4 };
1218TEST(ContainsTest, AcceptsMatcher) {
1219 const int a[] = { 1, 2, 3 };
1224TEST(ContainsTest, WorksForNativeArrayAsTuple) {
1225 const int a[] = { 1, 2 };
1231TEST(ContainsTest, WorksForTwoDimensionalNativeArray) {
1232 int a[][3] = { { 1, 2, 3 }, { 4, 5, 6 } };
1239TEST(AllOfTest, HugeMatcher) {
1242 EXPECT_THAT(0,
testing::AllOf(
_,
_,
_,
_,
_,
_,
_,
_,
_,
1246TEST(AnyOfTest, HugeMatcher) {
1249 EXPECT_THAT(0,
testing::AnyOf(
_,
_,
_,
_,
_,
_,
_,
_,
_,
1264template <
typename T1,
typename T2>
1265bool AllOf(
const T1&
t1,
const T2&
t2) {
return true; }
1267TEST(AllOfTest, DoesNotCallAllOfUnqualified) {
1269 M(),
M(),
M(),
M(),
M(),
M(),
M(),
M(),
M(),
M()));
1272template <
typename T1,
typename T2>
bool
1273AnyOf(
const T1&
t1,
const T2&
t2) {
return true; }
1275TEST(AnyOfTest, DoesNotCallAnyOfUnqualified) {
1277 M(),
M(),
M(),
M(),
M(),
M(),
M(),
M(),
M(),
M()));
1283# pragma warning(pop)
cryptonote::block b
Definition block.cpp:40
static uint64_t h
Definition blockchain_stats.cpp:55
Definition gmock-matchers.h:319
Definition gmock-matchers.h:80
Definition gmock-matchers.h:143
Definition gmock-matchers.h:319
Definition gmock-matchers.h:3525
Definition gmock-matchers.h:3477
bool Matches(T x) const
Definition gmock-matchers.h:261
void DescribeTo(::std::ostream *os) const
Definition gmock-matchers.h:267
void DescribeNegationTo(::std::ostream *os) const
Definition gmock-matchers.h:270
GenericValue< UTF8<> > Value
GenericValue with UTF8 encoding.
Definition document.h:2116
#define EXPECT_EQ(val1, val2)
Definition gtest.h:1922
#define EXPECT_TRUE(condition)
Definition gtest.h:1859
#define TEST(test_case_name, test_name)
Definition gtest.h:2187
#define EXPECT_FALSE(condition)
Definition gtest.h:1862
#define GTEST_ARRAY_SIZE_(array)
Definition gtest-port.h:1092
#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)
Definition gtest-port.h:874
#define MOCK_METHOD2(m,...)
Definition gmock-generated-function-mockers.h:677
#define MATCHER_P7(name, p0, p1, p2, p3, p4, p5, p6, description)
Definition gmock-generated-matchers.h:1814
#define MATCHER_P9(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, description)
Definition gmock-generated-matchers.h:1987
#define MATCHER_P5(name, p0, p1, p2, p3, p4, description)
Definition gmock-generated-matchers.h:1666
#define MATCHER_P3(name, p0, p1, p2, description)
Definition gmock-generated-matchers.h:1537
#define MATCHER_P4(name, p0, p1, p2, p3, description)
Definition gmock-generated-matchers.h:1597
#define MATCHER_P2(name, p0, p1, description)
Definition gmock-generated-matchers.h:1480
#define MATCHER_P10(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, description)
Definition gmock-generated-matchers.h:2080
#define MATCHER_P(name, p0, description)
Definition gmock-generated-matchers.h:1428
#define MATCHER_P6(name, p0, p1, p2, p3, p4, p5, description)
Definition gmock-generated-matchers.h:1739
#define MATCHER_P8(name, p0, p1, p2, p3, p4, p5, p6, p7, description)
Definition gmock-generated-matchers.h:1898
#define MATCHER(name, description)
<< DiffStrings(str, arg);
Definition gmock-generated-matchers.h:1381
#define EXPECT_THAT(value, matcher)
Definition gmock-matchers.h:4390
#define EXPECT_CALL(obj, call)
Definition gmock-spec-builders.h:1845
internal::NotMatcher< InnerMatcher > Not(InnerMatcher m)
Definition gmock-matchers.h:4107
internal::GtMatcher< Rhs > Gt(Rhs x)
Definition gmock-matchers.h:3772
internal::LeMatcher< Rhs > Le(Rhs x)
Definition gmock-matchers.h:3778
internal::EqMatcher< T > Eq(T x)
Definition gmock-matchers.h:3742
internal::LtMatcher< Rhs > Lt(Rhs x)
Definition gmock-matchers.h:3784
const internal::AnythingMatcher _
Definition gmock-matchers.h:3729
internal::AllOfResult2< M1, M2 >::type AllOf(M1 m1, M2 m2)
Definition gmock-generated-matchers.h:1002
internal::ElementsAreArrayMatcher< typename ::std::iterator_traits< Iter >::value_type > ElementsAreArray(Iter first, Iter last)
Definition gmock-matchers.h:3646
internal::ElementsAreMatcher< ::testing::tuple<> > ElementsAre()
Definition gmock-generated-matchers.h:570
internal::NeMatcher< Rhs > Ne(Rhs x)
Definition gmock-matchers.h:3790
internal::GeMatcher< Rhs > Ge(Rhs x)
Definition gmock-matchers.h:3766
internal::AnyOfResult2< M1, M2 >::type AnyOf(M1 m1, M2 m2)
Definition gmock-generated-matchers.h:1085
internal::RefMatcher< T & > Ref(T &x)
Definition gmock-matchers.h:3809
PolymorphicMatcher< internal::StrEqualityMatcher< internal::string > > StrEq(const internal::string &str)
Definition gmock-matchers.h:3955
bool StaticAssertTypeEq()
Definition gtest.h:2150
void get(std::istream &input, bool &res)
Definition io.h:61
Definition gmock-generated-matchers_test.cc:1253
Definition gtest_output_test_.cc:549
t
Definition console.py:33
Definition gtest-printers_test.cc:126
Iter(n, format, sep='')
Definition gen_gtest_pred_impl.py:189
diff
Definition gen_wide_data.py:42
test_list
Definition gtest_output_test.py:248
mdb_size_t count(MDB_cursor *cur)
Definition value_stream.cpp:40
Definition gmock-generated-matchers_test.cc:816
c
Definition pymoduletest.py:79
int i
Definition pymoduletest.py:23
e
Definition pymoduletest.py:79
int
Definition pymoduletest.py:17
tuple make_tuple()
Definition gtest-tuple.h:675
string Describe(const Matcher< T > &m)
Definition gmock-matchers_test.cc:202
Matcher< int > GreaterThan(int n)
Definition gmock-matchers_test.cc:188
string Explain(const MatcherType &m, const Value &x)
Definition gmock-matchers_test.cc:218
string DescribeNegation(const Matcher< T > &m)
Definition gmock-matchers_test.cc:210
::std::string string
Definition gtest-port.h:1097
internal::NotMatcher< InnerMatcher > Not(InnerMatcher m)
Definition gmock-matchers.h:4107
internal::GtMatcher< Rhs > Gt(Rhs x)
Definition gmock-matchers.h:3772
internal::LeMatcher< Rhs > Le(Rhs x)
Definition gmock-matchers.h:3778
internal::EqMatcher< T > Eq(T x)
Definition gmock-matchers.h:3742
internal::LtMatcher< Rhs > Lt(Rhs x)
Definition gmock-matchers.h:3784
const internal::AnythingMatcher _
Definition gmock-matchers.h:3729
internal::AllOfResult2< M1, M2 >::type AllOf(M1 m1, M2 m2)
Definition gmock-generated-matchers.h:1002
internal::ArgsMatcher< InnerMatcher > Args(const InnerMatcher &matcher)
Definition gmock-generated-matchers.h:481
bool StaticAssertTypeEq()
Definition gtest.h:2150
internal::ElementsAreArrayMatcher< typename ::std::iterator_traits< Iter >::value_type > ElementsAreArray(Iter first, Iter last)
Definition gmock-matchers.h:3646
internal::ElementsAreMatcher< ::testing::tuple<> > ElementsAre()
Definition gmock-generated-matchers.h:570
::std::string PrintToString(const T &value)
Definition gtest-printers.h:980
internal::ContainsMatcher< M > Contains(M matcher)
Definition gmock-matchers.h:4282
Matcher< T > MakeMatcher(const MatcherInterface< T > *impl)
Definition gmock-matchers.h:484
internal::NeMatcher< Rhs > Ne(Rhs x)
Definition gmock-matchers.h:3790
internal::GeMatcher< Rhs > Ge(Rhs x)
Definition gmock-matchers.h:3766
internal::AnyOfResult2< M1, M2 >::type AnyOf(M1 m1, M2 m2)
Definition gmock-generated-matchers.h:1085
bool Value(const T &value, M matcher)
Definition gmock-matchers.h:4347
internal::RefMatcher< T & > Ref(T &x)
Definition gmock-matchers.h:3809
internal::PointeeMatcher< InnerMatcher > Pointee(const InnerMatcher &inner_matcher)
Definition gmock-matchers.h:3872
PolymorphicMatcher< internal::StrEqualityMatcher< internal::string > > StrEq(const internal::string &str)
Definition gmock-matchers.h:3955
const GenericPointer< typename T::ValueType > T2 value
Definition pointer.h:1225
const GenericPointer< typename T::ValueType > & pointer
Definition pointer.h:1124
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition pointer.h:1124
const char *const str
Definition portlistingparse.c:23
t2
Definition pow22523.h:103
t1
Definition pow22523.h:58
#define M(w0, w14, w9, w1)
Definition sha512-blocks.c:41