feat(big): add SBigCompare

This commit is contained in:
fallenoak 2023-02-01 22:16:58 -06:00
parent bc0dc12f1c
commit 5edf49dae7
No known key found for this signature in database
GPG key ID: 7628F8E61AEA070D
3 changed files with 23 additions and 0 deletions

View file

@ -459,6 +459,23 @@ TEST_CASE("SBigAdd", "[big]") {
}
}
TEST_CASE("SBigCompare", "[big]") {
SECTION("compares 10 and 1") {
BigData* a;
SBigNew(&a);
SBigFromUnsigned(a, 10);
BigData* b;
SBigNew(&b);
SBigFromUnsigned(b, 1);
CHECK(SBigCompare(a, b) == 1);
SBigDel(a);
SBigDel(b);
}
}
TEST_CASE("SBigFromBinary", "[big]") {
SECTION("creates bigdata from 0") {
BigData* num;