Lines Matching defs:Perform
324 // Perform method.
330 virtual int Perform(const tuple<bool, int>& args) {
343 // When exercising the Perform() method of Action<F>, we must pass
345 // types. For example, if F is int(), then Perform() takes a
346 // 0-tuple; if F is void(bool, int), then Perform() takes a
348 EXPECT_EQ(5, action.Perform(make_tuple(true, 5)));
361 EXPECT_EQ(5, action.Perform(make_tuple(true, 5)));
362 EXPECT_EQ(0, action.Perform(make_tuple(false, 1)));
371 EXPECT_EQ(5, a1.Perform(make_tuple(true, 5)));
372 EXPECT_EQ(0, a1.Perform(make_tuple(false, 1)));
375 EXPECT_EQ(5, a2.Perform(make_tuple(true, 5)));
376 EXPECT_EQ(0, a2.Perform(make_tuple(false, 1)));
381 EXPECT_EQ(5, a1.Perform(make_tuple(true, 5)));
382 EXPECT_EQ(0, a1.Perform(make_tuple(false, 1)));
385 EXPECT_EQ(5, a2.Perform(make_tuple(true, 5)));
386 EXPECT_EQ(0, a2.Perform(make_tuple(false, 1)));
394 virtual bool Perform(const tuple<int>& arg) {
408 EXPECT_EQ(1, a2.Perform(make_tuple('a')));
409 EXPECT_EQ(0, a2.Perform(make_tuple('\0')));
420 // polymorphic action whose Perform() method template is either
423 Result Perform(const ArgumentTuple& args) { return get<1>(args); }
431 // implementation class' Perform() method template takes only one
435 // polymorphic action whose Perform() method template is either
438 Result Perform(const tuple<>&) const { return 0; }
457 Perform(make_tuple(false, 5, 2.0)));
461 // class' Perform() method template has only one template parameter.
464 EXPECT_EQ(0, a1.Perform(make_tuple()));
467 EXPECT_TRUE(a2.Perform(make_tuple()) == NULL);
474 return ret.Perform(make_tuple(1));
480 EXPECT_EQ(1, ret.Perform(make_tuple()));
483 EXPECT_EQ(-5, ret.Perform(make_tuple()));
489 EXPECT_STREQ("Hello", a1.Perform(make_tuple()));
492 EXPECT_EQ("world", a2.Perform(make_tuple()));
509 EXPECT_EQ(&base, ret.Perform(make_tuple()));
512 EXPECT_EQ(&derived, ret.Perform(make_tuple()));
542 action.Perform(tuple<>());
563 EXPECT_TRUE(a1.Perform(make_tuple()) == NULL);
566 EXPECT_TRUE(a2.Perform(make_tuple(true)) == NULL);
574 EXPECT_EQ(&n, &ret.Perform(make_tuple(true)));
582 EXPECT_EQ(&base, &a.Perform(make_tuple()));
585 EXPECT_EQ(&derived, &a.Perform(make_tuple()));
593 EXPECT_NE(&n, &ret.Perform(make_tuple()));
594 EXPECT_EQ(42, ret.Perform(make_tuple()));
597 EXPECT_NE(&n, &ret.Perform(make_tuple()));
598 EXPECT_EQ(42, ret.Perform(make_tuple()));
606 EXPECT_NE(&base, &a.Perform(make_tuple()));
609 EXPECT_NE(&derived, &a.Perform(make_tuple()));
705 a.Perform(make_tuple(true, &n, &ch));
712 a.Perform(make_tuple(true, &n, &ch));
725 a.Perform(make_tuple(&str, &ptr));
731 a.Perform(make_tuple(&str, &ptr));
740 a.Perform(make_tuple(&ptr));
748 a2.Perform(make_tuple(&str));
762 a.Perform(make_tuple(true, &str, &ptr));
770 a.Perform(make_tuple(true, &str, &ptr));
780 a.Perform(make_tuple(true, &ptr));
790 a2.Perform(make_tuple(true, &str));
814 a.Perform(make_tuple(true, &dest));
837 a.Perform(make_tuple(true, dest_base));
861 a.Perform(make_tuple(true, &dest));
887 a.Perform(make_tuple(true, dest_base));
902 a.Perform(make_tuple(true, &n, &ch));
909 a.Perform(make_tuple(true, &n, &ch));
933 a.Perform(make_tuple(true, &dest));
956 a.Perform(make_tuple(true, dest_base));
980 a.Perform(make_tuple(true, &dest));
1006 a.Perform(make_tuple(true, dest_base));
1099 EXPECT_EQ(1, a.Perform(make_tuple(2)));
1103 EXPECT_EQ(1, a2.Perform(make_tuple(2, 3.5)));
1108 a3.Perform(make_tuple(1));
1116 EXPECT_EQ(2, a.Perform(make_tuple()));
1121 EXPECT_EQ(2, a2.Perform(make_tuple(3, 3.5, 'a')));
1126 a3.Perform(make_tuple());
1135 EXPECT_EQ(123, a.Perform(make_tuple(true, 'a')));
1141 a.Perform(make_tuple(1));
1154 a.Perform(make_tuple());
1168 a.Perform(make_tuple(2));
1175 a.Perform(make_tuple(0));
1182 a.Perform(make_tuple());
1189 a.Perform(make_tuple(0));
1203 EXPECT_EQ(-5, a.Perform(make_tuple()));
1210 EXPECT_EQ(&x, a.Perform(make_tuple()));
1216 EXPECT_DOUBLE_EQ(5.0, a.Perform(make_tuple()));