Home
last modified time | relevance | path

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

/external/google-breakpad/src/testing/gtest/samples/
Dsample6_unittest.cc108 EXPECT_FALSE(this->table_->IsPrime(-5)); in TYPED_TEST()
109 EXPECT_FALSE(this->table_->IsPrime(0)); in TYPED_TEST()
110 EXPECT_FALSE(this->table_->IsPrime(1)); in TYPED_TEST()
111 EXPECT_FALSE(this->table_->IsPrime(4)); in TYPED_TEST()
112 EXPECT_FALSE(this->table_->IsPrime(6)); in TYPED_TEST()
113 EXPECT_FALSE(this->table_->IsPrime(100)); in TYPED_TEST()
117 EXPECT_TRUE(this->table_->IsPrime(2)); in TYPED_TEST()
118 EXPECT_TRUE(this->table_->IsPrime(3)); in TYPED_TEST()
119 EXPECT_TRUE(this->table_->IsPrime(5)); in TYPED_TEST()
120 EXPECT_TRUE(this->table_->IsPrime(7)); in TYPED_TEST()
[all …]
Dsample8_unittest.cc62 virtual bool IsPrime(int n) const { in IsPrime() function in HybridPrimeTable
64 return precalc_impl_->IsPrime(n); in IsPrime()
66 return on_the_fly_impl_->IsPrime(n); in IsPrime()
122 EXPECT_FALSE(table_->IsPrime(-5)); in TEST_P()
123 EXPECT_FALSE(table_->IsPrime(0)); in TEST_P()
124 EXPECT_FALSE(table_->IsPrime(1)); in TEST_P()
125 EXPECT_FALSE(table_->IsPrime(4)); in TEST_P()
126 EXPECT_FALSE(table_->IsPrime(6)); in TEST_P()
127 EXPECT_FALSE(table_->IsPrime(100)); in TEST_P()
131 EXPECT_TRUE(table_->IsPrime(2)); in TEST_P()
[all …]
Dsample1_unittest.cc122 EXPECT_FALSE(IsPrime(-1)); in TEST()
123 EXPECT_FALSE(IsPrime(-2)); in TEST()
124 EXPECT_FALSE(IsPrime(INT_MIN)); in TEST()
129 EXPECT_FALSE(IsPrime(0)); in TEST()
130 EXPECT_FALSE(IsPrime(1)); in TEST()
131 EXPECT_TRUE(IsPrime(2)); in TEST()
132 EXPECT_TRUE(IsPrime(3)); in TEST()
137 EXPECT_FALSE(IsPrime(4)); in TEST()
138 EXPECT_TRUE(IsPrime(5)); in TEST()
139 EXPECT_FALSE(IsPrime(6)); in TEST()
[all …]
Dsample7_unittest.cc82 EXPECT_FALSE(table_->IsPrime(-5)); in TEST_P()
83 EXPECT_FALSE(table_->IsPrime(0)); in TEST_P()
84 EXPECT_FALSE(table_->IsPrime(1)); in TEST_P()
85 EXPECT_FALSE(table_->IsPrime(4)); in TEST_P()
86 EXPECT_FALSE(table_->IsPrime(6)); in TEST_P()
87 EXPECT_FALSE(table_->IsPrime(100)); in TEST_P()
91 EXPECT_TRUE(table_->IsPrime(2)); in TEST_P()
92 EXPECT_TRUE(table_->IsPrime(3)); in TEST_P()
93 EXPECT_TRUE(table_->IsPrime(5)); in TEST_P()
94 EXPECT_TRUE(table_->IsPrime(7)); in TEST_P()
[all …]
Dsample5_unittest.cc118 TEST_F(IntegerFunctionTest, IsPrime) { in TEST_F() argument
120 EXPECT_FALSE(IsPrime(-1)); in TEST_F()
121 EXPECT_FALSE(IsPrime(-2)); in TEST_F()
122 EXPECT_FALSE(IsPrime(INT_MIN)); in TEST_F()
125 EXPECT_FALSE(IsPrime(0)); in TEST_F()
126 EXPECT_FALSE(IsPrime(1)); in TEST_F()
127 EXPECT_TRUE(IsPrime(2)); in TEST_F()
128 EXPECT_TRUE(IsPrime(3)); in TEST_F()
131 EXPECT_FALSE(IsPrime(4)); in TEST_F()
132 EXPECT_TRUE(IsPrime(5)); in TEST_F()
[all …]
Dprime_tables.h48 virtual bool IsPrime(int n) const = 0;
58 virtual bool IsPrime(int n) const { in IsPrime() function
71 if (IsPrime(n)) return n; in GetNextPrime()
89 virtual bool IsPrime(int n) const { in IsPrime() function
Dsample1.h41 bool IsPrime(int n);
Dsample1.cc47 bool IsPrime(int n) { in IsPrime() function
/external/protobuf/gtest/samples/
Dsample6_unittest.cc108 EXPECT_FALSE(this->table_->IsPrime(-5)); in TYPED_TEST()
109 EXPECT_FALSE(this->table_->IsPrime(0)); in TYPED_TEST()
110 EXPECT_FALSE(this->table_->IsPrime(1)); in TYPED_TEST()
111 EXPECT_FALSE(this->table_->IsPrime(4)); in TYPED_TEST()
112 EXPECT_FALSE(this->table_->IsPrime(6)); in TYPED_TEST()
113 EXPECT_FALSE(this->table_->IsPrime(100)); in TYPED_TEST()
117 EXPECT_TRUE(this->table_->IsPrime(2)); in TYPED_TEST()
118 EXPECT_TRUE(this->table_->IsPrime(3)); in TYPED_TEST()
119 EXPECT_TRUE(this->table_->IsPrime(5)); in TYPED_TEST()
120 EXPECT_TRUE(this->table_->IsPrime(7)); in TYPED_TEST()
[all …]
Dsample8_unittest.cc62 virtual bool IsPrime(int n) const { in IsPrime() function in HybridPrimeTable
64 return precalc_impl_->IsPrime(n); in IsPrime()
66 return on_the_fly_impl_->IsPrime(n); in IsPrime()
122 EXPECT_FALSE(table_->IsPrime(-5)); in TEST_P()
123 EXPECT_FALSE(table_->IsPrime(0)); in TEST_P()
124 EXPECT_FALSE(table_->IsPrime(1)); in TEST_P()
125 EXPECT_FALSE(table_->IsPrime(4)); in TEST_P()
126 EXPECT_FALSE(table_->IsPrime(6)); in TEST_P()
127 EXPECT_FALSE(table_->IsPrime(100)); in TEST_P()
131 EXPECT_TRUE(table_->IsPrime(2)); in TEST_P()
[all …]
Dsample1_unittest.cc122 EXPECT_FALSE(IsPrime(-1)); in TEST()
123 EXPECT_FALSE(IsPrime(-2)); in TEST()
124 EXPECT_FALSE(IsPrime(INT_MIN)); in TEST()
129 EXPECT_FALSE(IsPrime(0)); in TEST()
130 EXPECT_FALSE(IsPrime(1)); in TEST()
131 EXPECT_TRUE(IsPrime(2)); in TEST()
132 EXPECT_TRUE(IsPrime(3)); in TEST()
137 EXPECT_FALSE(IsPrime(4)); in TEST()
138 EXPECT_TRUE(IsPrime(5)); in TEST()
139 EXPECT_FALSE(IsPrime(6)); in TEST()
[all …]
Dsample7_unittest.cc84 EXPECT_FALSE(table_->IsPrime(-5)); in TEST_P()
85 EXPECT_FALSE(table_->IsPrime(0)); in TEST_P()
86 EXPECT_FALSE(table_->IsPrime(1)); in TEST_P()
87 EXPECT_FALSE(table_->IsPrime(4)); in TEST_P()
88 EXPECT_FALSE(table_->IsPrime(6)); in TEST_P()
89 EXPECT_FALSE(table_->IsPrime(100)); in TEST_P()
93 EXPECT_TRUE(table_->IsPrime(2)); in TEST_P()
94 EXPECT_TRUE(table_->IsPrime(3)); in TEST_P()
95 EXPECT_TRUE(table_->IsPrime(5)); in TEST_P()
96 EXPECT_TRUE(table_->IsPrime(7)); in TEST_P()
[all …]
Dsample5_unittest.cc118 TEST_F(IntegerFunctionTest, IsPrime) { in TEST_F() argument
120 EXPECT_TRUE(!IsPrime(-1)); in TEST_F()
121 EXPECT_TRUE(!IsPrime(-2)); in TEST_F()
122 EXPECT_TRUE(!IsPrime(INT_MIN)); in TEST_F()
125 EXPECT_TRUE(!IsPrime(0)); in TEST_F()
126 EXPECT_TRUE(!IsPrime(1)); in TEST_F()
127 EXPECT_TRUE(IsPrime(2)); in TEST_F()
128 EXPECT_TRUE(IsPrime(3)); in TEST_F()
131 EXPECT_TRUE(!IsPrime(4)); in TEST_F()
132 EXPECT_TRUE(IsPrime(5)); in TEST_F()
[all …]
Dprime_tables.h48 virtual bool IsPrime(int n) const = 0;
58 virtual bool IsPrime(int n) const { in IsPrime() function
71 if (IsPrime(n)) return n; in GetNextPrime()
89 virtual bool IsPrime(int n) const { in IsPrime() function
Dsample1.h41 bool IsPrime(int n);
Dsample1.cc47 bool IsPrime(int n) { in IsPrime() function