43 using ::testing::TestWithParam;
57 template <
size_t max_precalculated>
66 class PrimeTableTestSmpl7 :
public TestWithParam<CreatePrimeTableFunc*> {
68 ~PrimeTableTestSmpl7()
override {
delete table_; }
69 void SetUp()
override { table_ = (*GetParam())(); }
70 void TearDown()
override {
79 TEST_P(PrimeTableTestSmpl7, ReturnsFalseForNonPrimes) {
88 TEST_P(PrimeTableTestSmpl7, ReturnsTrueForPrimes) {
97 TEST_P(PrimeTableTestSmpl7, CanGetNextPrime) {
103 EXPECT_EQ(131, table_->GetNextPrime(128));
114 Values(&CreateOnTheFlyPrimeTable,
115 &CreatePreCalculatedPrimeTable<1000>));
internal::ValueArray< T...> Values(T...v)
#define EXPECT_EQ(val1, val2)
#define TEST_P(test_suite_name, test_name)
#define EXPECT_TRUE(condition)
#define EXPECT_FALSE(condition)
#define INSTANTIATE_TEST_SUITE_P(prefix, test_suite_name,...)