feat(big): add SBigDel

This commit is contained in:
fallenoak 2023-01-29 20:14:01 -06:00 committed by GitHub
parent 7d5a157162
commit 902ddcf7d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 0 deletions

View file

@ -76,6 +76,8 @@ TEST_CASE("SBigFromUnsigned", "[big]") {
CHECK(num->Primary().Count() == 1);
CHECK(num->Primary()[0] == 0);
SBigDel(num);
}
SECTION("creates bigdata from 0x12345678") {
@ -85,6 +87,8 @@ TEST_CASE("SBigFromUnsigned", "[big]") {
CHECK(num->Primary().Count() == 1);
CHECK(num->Primary()[0] == 0x12345678);
SBigDel(num);
}
}
@ -99,6 +103,8 @@ TEST_CASE("SBigToBinaryBuffer", "[big]") {
SBigToBinaryBuffer(num, buffer, sizeof(buffer), &bytes);
REQUIRE(bytes == 0);
SBigDel(num);
}
SECTION("returns expected buffer for bigdata representing 0x12345678") {
@ -112,5 +118,7 @@ TEST_CASE("SBigToBinaryBuffer", "[big]") {
CHECK(bytes == 4);
CHECK(*reinterpret_cast<uint32_t*>(buffer) == 0x12345678);
SBigDel(num);
}
}