44using ::testing::TestWithParam;
45using ::testing::Values;
58template <
size_t max_precalculated>
67class PrimeTableTestSmpl7 :
public TestWithParam<CreatePrimeTableFunc*> {
69 virtual ~PrimeTableTestSmpl7() {
delete table_; }
70 virtual void SetUp() { table_ = (*GetParam())(); }
71 virtual void TearDown() {
80TEST_P(PrimeTableTestSmpl7, ReturnsFalseForNonPrimes) {
89TEST_P(PrimeTableTestSmpl7, ReturnsTrueForPrimes) {
98TEST_P(PrimeTableTestSmpl7, CanGetNextPrime) {
104 EXPECT_EQ(131, table_->GetNextPrime(128));
115 Values(&CreateOnTheFlyPrimeTable,
116 &CreatePreCalculatedPrimeTable<1000>));
#define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator,...)
#define TEST_P(test_case_name, test_name)
#define EXPECT_EQ(val1, val2)
#define EXPECT_TRUE(condition)
#define EXPECT_FALSE(condition)
internal::ValueArray1< T1 > Values(T1 v1)