Home
last modified time | relevance | path

Searched refs:IsPrime (Results 1 – 8 of 8) sorted by relevance

/freebsd/contrib/googletest/googletest/samples/
H A Dsample6_unittest.cc103 EXPECT_FALSE(this->table_->IsPrime(-5)); in TYPED_TEST()
104 EXPECT_FALSE(this->table_->IsPrime(0)); in TYPED_TEST()
105 EXPECT_FALSE(this->table_->IsPrime(1)); in TYPED_TEST()
106 EXPECT_FALSE(this->table_->IsPrime(4)); in TYPED_TEST()
107 EXPECT_FALSE(this->table_->IsPrime(6)); in TYPED_TEST()
108 EXPECT_FALSE(this->table_->IsPrime(100)); in TYPED_TEST()
112 EXPECT_TRUE(this->table_->IsPrime(2)); in TYPED_TEST()
113 EXPECT_TRUE(this->table_->IsPrime(3)); in TYPED_TEST()
114 EXPECT_TRUE(this->table_->IsPrime(5)); in TYPED_TEST()
115 EXPECT_TRUE(this->table_->IsPrime(7)); in TYPED_TEST()
[all …]
H A Dsample8_unittest.cc61 bool IsPrime(int n) const override { in IsPrime() function in __anon5e63a84a0111::HybridPrimeTable
63 return precalc_impl_->IsPrime(n); in IsPrime()
65 return on_the_fly_impl_->IsPrime(n); in IsPrime()
114 EXPECT_FALSE(table_->IsPrime(-5)); in TEST_P()
115 EXPECT_FALSE(table_->IsPrime(0)); in TEST_P()
116 EXPECT_FALSE(table_->IsPrime(1)); in TEST_P()
117 EXPECT_FALSE(table_->IsPrime(4)); in TEST_P()
118 EXPECT_FALSE(table_->IsPrime(6)); in TEST_P()
119 EXPECT_FALSE(table_->IsPrime(100)); in TEST_P()
123 EXPECT_TRUE(table_->IsPrime(2)); in TEST_P()
[all …]
H A Dsample1_unittest.cc116 EXPECT_FALSE(IsPrime(-1)); in TEST()
117 EXPECT_FALSE(IsPrime(-2)); in TEST()
118 EXPECT_FALSE(IsPrime(INT_MIN)); in TEST()
123 EXPECT_FALSE(IsPrime(0)); in TEST()
124 EXPECT_FALSE(IsPrime(1)); in TEST()
125 EXPECT_TRUE(IsPrime(2)); in TEST()
126 EXPECT_TRUE(IsPrime(3)); in TEST()
131 EXPECT_FALSE(IsPrime(4)); in TEST()
132 EXPECT_TRUE(IsPrime(5)); in TEST()
133 EXPECT_FALSE(IsPrime(6)); in TEST()
[all …]
H A Dsample7_unittest.cc76 EXPECT_FALSE(table_->IsPrime(-5)); in TEST_P()
77 EXPECT_FALSE(table_->IsPrime(0)); in TEST_P()
78 EXPECT_FALSE(table_->IsPrime(1)); in TEST_P()
79 EXPECT_FALSE(table_->IsPrime(4)); in TEST_P()
80 EXPECT_FALSE(table_->IsPrime(6)); in TEST_P()
81 EXPECT_FALSE(table_->IsPrime(100)); in TEST_P()
85 EXPECT_TRUE(table_->IsPrime(2)); in TEST_P()
86 EXPECT_TRUE(table_->IsPrime(3)); in TEST_P()
87 EXPECT_TRUE(table_->IsPrime(5)); in TEST_P()
88 EXPECT_TRUE(table_->IsPrime(7)); in TEST_P()
[all …]
H A Dsample5_unittest.cc112 TEST_F(IntegerFunctionTest, IsPrime) { in TEST_F() argument
114 EXPECT_FALSE(IsPrime(-1)); in TEST_F()
115 EXPECT_FALSE(IsPrime(-2)); in TEST_F()
116 EXPECT_FALSE(IsPrime(INT_MIN)); in TEST_F()
119 EXPECT_FALSE(IsPrime(0)); in TEST_F()
120 EXPECT_FALSE(IsPrime(1)); in TEST_F()
121 EXPECT_TRUE(IsPrime(2)); in TEST_F()
122 EXPECT_TRUE(IsPrime(3)); in TEST_F()
125 EXPECT_FALSE(IsPrime(4)); in TEST_F()
126 EXPECT_TRUE(IsPrime(5)); in TEST_F()
[all …]
H A Dprime_tables.h45 virtual bool IsPrime(int n) const = 0;
55 bool IsPrime(int n) const override { in IsPrime() function
70 if (IsPrime(n)) return n; in GetNextPrime()
87 bool IsPrime(int n) const override { in IsPrime() function
H A Dsample1.h39 bool IsPrime(int n);
H A Dsample1.cc45 bool IsPrime(int n) { in IsPrime() function