• Home
  • Raw
  • Download

Lines Matching refs:bn

151   BigNum* bn = nullptr;  in TEST_F()  local
152 EXPECT_EQ(kEpidNoErr, NewBigNum(32, &bn)); in TEST_F()
153 DeleteBigNum(&bn); in TEST_F()
161 BigNum* bn = nullptr; in TEST_F() local
162 EXPECT_EQ(kEpidBadArgErr, NewBigNum(0, &bn)); in TEST_F()
163 DeleteBigNum(&bn); in TEST_F()
167 BigNum* bn = nullptr; in TEST_F() local
168 THROW_ON_EPIDERR(NewBigNum(sizeof(BigNumStr), &bn)); in TEST_F()
169 DeleteBigNum(&bn); in TEST_F()
170 EXPECT_EQ(nullptr, bn); in TEST_F()
174 BigNum* bn = nullptr; in TEST_F() local
176 EXPECT_EQ(nullptr, bn); in TEST_F()
183 BigNum* bn = nullptr; in TEST_F() local
184 THROW_ON_EPIDERR(NewBigNum(sizeof(BigNumStr), &bn)); in TEST_F()
185 EXPECT_EQ(kEpidBadArgErr, ReadBigNum(NULL, sizeof(BigNumStr), bn)); in TEST_F()
188 DeleteBigNum(&bn); in TEST_F()
192 BigNumObj bn(32); in TEST_F() local
193 EXPECT_EQ(kEpidBadArgErr, ReadBigNum(&this->str_0, 0, bn)); in TEST_F()
195 ReadBigNum(&this->str_0, std::numeric_limits<size_t>::max(), bn)); in TEST_F()
197 EXPECT_EQ(kEpidBadArgErr, ReadBigNum(&this->str_0, 0x100000001, bn)); in TEST_F()
202 BigNum* bn = nullptr; in TEST_F() local
203 THROW_ON_EPIDERR(NewBigNum(sizeof(BigNumStr), &bn)); in TEST_F()
205 this->vec_33byte_low.size(), bn)); in TEST_F()
206 DeleteBigNum(&bn); in TEST_F()
210 BigNum* bn = nullptr; in TEST_F() local
212 THROW_ON_EPIDERR(NewBigNum(sizeof(BigNumStr), &bn)); in TEST_F()
214 EXPECT_EQ(kEpidBadArgErr, WriteBigNum(bn, 0, NULL)); in TEST_F()
215 DeleteBigNum(&bn); in TEST_F()
220 BigNumObj bn(this->vec_33byte_low); in TEST_F() local
221 EXPECT_NE(kEpidNoErr, WriteBigNum(bn, sizeof(str), &str)); in TEST_F()
226 BigNumObj bn; in TEST_F() local
227 EXPECT_EQ(kEpidNoErr, ReadBigNum(&this->str_0, sizeof(this->str_0), bn)); in TEST_F()
232 BigNumObj bn; in TEST_F() local
234 ReadBigNum(&this->str_large, sizeof(this->str_large), bn)); in TEST_F()
239 BigNumObj bn; // defaults to 0 in TEST_F() local
241 EXPECT_EQ(kEpidNoErr, WriteBigNum(bn, sizeof(str), &str)); in TEST_F()
247 BigNumObj bn; in TEST_F() local
249 ReadBigNum(&this->str_large, sizeof(this->str_large), bn)); in TEST_F()
250 EXPECT_EQ(kEpidNoErr, WriteBigNum(bn, sizeof(str), &str)); in TEST_F()
258 BigNumObj bn; in TEST_F() local
260 EXPECT_NE(kEpidNoErr, BigNumAdd(bn, nullptr, nullptr)); in TEST_F()
261 EXPECT_NE(kEpidNoErr, BigNumAdd(nullptr, bn, nullptr)); in TEST_F()
262 EXPECT_NE(kEpidNoErr, BigNumAdd(nullptr, nullptr, bn)); in TEST_F()
263 EXPECT_NE(kEpidNoErr, BigNumAdd(bn, bn, nullptr)); in TEST_F()
264 EXPECT_NE(kEpidNoErr, BigNumAdd(nullptr, bn, bn)); in TEST_F()
265 EXPECT_NE(kEpidNoErr, BigNumAdd(bn, nullptr, bn)); in TEST_F()
269 BigNumObj bn; in TEST_F() local
272 EXPECT_EQ(kEpidNoErr, BigNumAdd(bn_large, bn_0, bn)); in TEST_F()
273 EXPECT_TRUE(CompareBigNum(bn, bn_large)); in TEST_F()
277 BigNumObj bn; in TEST_F() local
281 EXPECT_EQ(kEpidNoErr, BigNumAdd(bn_large, bn_1, bn)); in TEST_F()
282 EXPECT_TRUE(CompareBigNum(bn, bn_large_p1)); in TEST_F()
286 BigNumObj bn(32); in TEST_F() local
289 EXPECT_NE(kEpidNoErr, BigNumAdd(bn_32high, bn_1, bn)); in TEST_F()
293 BigNumObj bn(33); in TEST_F() local
297 EXPECT_EQ(kEpidNoErr, BigNumAdd(bn_32high, bn_1, bn)); in TEST_F()
298 EXPECT_TRUE(CompareBigNum(bn, bn_33low)); in TEST_F()
305 BigNumObj bn; in TEST_F() local
307 EXPECT_NE(kEpidNoErr, BigNumSub(bn, nullptr, nullptr)); in TEST_F()
308 EXPECT_NE(kEpidNoErr, BigNumSub(nullptr, bn, nullptr)); in TEST_F()
309 EXPECT_NE(kEpidNoErr, BigNumSub(nullptr, nullptr, bn)); in TEST_F()
310 EXPECT_NE(kEpidNoErr, BigNumSub(bn, bn, nullptr)); in TEST_F()
311 EXPECT_NE(kEpidNoErr, BigNumSub(nullptr, bn, bn)); in TEST_F()
312 EXPECT_NE(kEpidNoErr, BigNumSub(bn, nullptr, bn)); in TEST_F()
316 BigNumObj bn; in TEST_F() local
319 EXPECT_EQ(kEpidUnderflowErr, BigNumSub(bn_0, bn_1, bn)); in TEST_F()
323 BigNumObj bn; in TEST_F() local
326 EXPECT_EQ(kEpidNoErr, BigNumSub(bn_large, bn_0, bn)); in TEST_F()
327 EXPECT_TRUE(CompareBigNum(bn, bn_large)); in TEST_F()
331 BigNumObj bn; in TEST_F() local
335 EXPECT_EQ(kEpidNoErr, BigNumSub(bn_large, bn_1, bn)); in TEST_F()
336 EXPECT_TRUE(CompareBigNum(bn, bn_large_m1)); in TEST_F()
343 BigNumObj bn; in TEST_F() local
345 EXPECT_NE(kEpidNoErr, BigNumMul(bn, nullptr, nullptr)); in TEST_F()
346 EXPECT_NE(kEpidNoErr, BigNumMul(nullptr, bn, nullptr)); in TEST_F()
347 EXPECT_NE(kEpidNoErr, BigNumMul(nullptr, nullptr, bn)); in TEST_F()
348 EXPECT_NE(kEpidNoErr, BigNumMul(bn, bn, nullptr)); in TEST_F()
349 EXPECT_NE(kEpidNoErr, BigNumMul(nullptr, bn, bn)); in TEST_F()
350 EXPECT_NE(kEpidNoErr, BigNumMul(bn, nullptr, bn)); in TEST_F()
354 BigNumObj bn; in TEST_F() local
357 EXPECT_EQ(kEpidNoErr, BigNumMul(bn_large, bn_1, bn)); in TEST_F()
358 EXPECT_TRUE(CompareBigNum(bn, bn_large)); in TEST_F()
362 BigNumObj bn; in TEST_F() local
366 EXPECT_EQ(kEpidNoErr, BigNumMul(bn_big, bn_2, bn)); in TEST_F()
367 EXPECT_TRUE(CompareBigNum(bn, bn_2big)); in TEST_F()
371 BigNumObj bn; in TEST_F() local
374 EXPECT_EQ(kEpidNoErr, BigNumMul(bn_large, bn_0, bn)); in TEST_F()
375 EXPECT_TRUE(CompareBigNum(bn, bn_0)); in TEST_F()
379 BigNumObj bn(32); in TEST_F() local
382 EXPECT_EQ(kEpidBadArgErr, BigNumMul(bn_high_bit_set, bn_2, bn)); in TEST_F()
386 BigNumObj bn(33); in TEST_F() local
390 EXPECT_EQ(kEpidNoErr, BigNumMul(bn_high_bit_set, bn_2, bn)); in TEST_F()
391 EXPECT_TRUE(CompareBigNum(bn, bn_33low)); in TEST_F()