abacus: bignum: fix order comparisons

This is a pretty big oversight...
This commit is contained in:
Bruno BELANYI 2021-08-21 12:48:37 +02:00
parent 5bc3963317
commit 3397bf4310
2 changed files with 12 additions and 0 deletions

View file

@ -60,6 +60,14 @@ TEST(BigNum, comparisons) {
EXPECT_GE(one, one);
}
TEST(BigNum, comparisons_digits) {
auto const nine = BigNum(9);
auto const ten = BigNum(10);
EXPECT_LT(nine, ten);
EXPECT_GT(ten, nine);
}
TEST(BigNum, unary) {
auto const zero = BigNum(0);
auto const one = BigNum(1);