48PrimeTable* CreatePrimeTable<OnTheFlyPrimeTable>() {
53PrimeTable* CreatePrimeTable<PreCalculatedPrimeTable>() {
63 PrimeTableTest() : table_(CreatePrimeTable<
T>()) {}
65 virtual ~PrimeTableTest() {
delete table_; }
77#if GTEST_HAS_TYPED_TEST
94typedef Types<OnTheFlyPrimeTable, PreCalculatedPrimeTable> Implementations;
100TYPED_TEST(PrimeTableTest, ReturnsFalseForNonPrimes) {
116TYPED_TEST(PrimeTableTest, ReturnsTrueForPrimes) {
126 EXPECT_EQ(2, this->table_->GetNextPrime(0));
127 EXPECT_EQ(3, this->table_->GetNextPrime(2));
128 EXPECT_EQ(5, this->table_->GetNextPrime(3));
129 EXPECT_EQ(7, this->table_->GetNextPrime(5));
130 EXPECT_EQ(11, this->table_->GetNextPrime(7));
131 EXPECT_EQ(131, this->table_->GetNextPrime(128));
140#if GTEST_HAS_TYPED_TEST_P
161class PrimeTableTest2 :
public PrimeTableTest<T> {
171TYPED_TEST_P(PrimeTableTest2, ReturnsFalseForNonPrimes) {
190 EXPECT_EQ(2, this->table_->GetNextPrime(0));
191 EXPECT_EQ(3, this->table_->GetNextPrime(2));
192 EXPECT_EQ(5, this->table_->GetNextPrime(3));
193 EXPECT_EQ(7, this->table_->GetNextPrime(5));
194 EXPECT_EQ(11, this->table_->GetNextPrime(7));
195 EXPECT_EQ(131, this->table_->GetNextPrime(128));
203 ReturnsFalseForNonPrimes, ReturnsTrueForPrimes, CanGetNextPrime);
218typedef Types<OnTheFlyPrimeTable, PreCalculatedPrimeTable>
219 PrimeTableImplementations;
222 PrimeTableImplementations);
#define EXPECT_EQ(val1, val2)
#define EXPECT_TRUE(condition)
#define EXPECT_FALSE(condition)
REGISTER_TYPED_TEST_CASE_P(TypeParamTest, TestA, TestB)
TYPED_TEST(TypedTest, TestA)
TYPED_TEST_CASE(TypedTest, MyTypes)
TYPED_TEST_CASE_P(TypeParamTest)
TYPED_TEST_P(TypeParamTest, TestA)
INSTANTIATE_TYPED_TEST_CASE_P(My, TypeParamTest, MyTypes)
#define T(meth, val, expected)