mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 02:22:30 +00:00
feat(big): add SetZero
This commit is contained in:
parent
f1cf4af382
commit
8413214ae0
3 changed files with 22 additions and 0 deletions
16
test/Big.cpp
16
test/Big.cpp
|
|
@ -420,3 +420,19 @@ TEST_CASE("SBigToBinaryBuffer", "[big]") {
|
|||
SBigDel(num);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("SetZero", "[big]") {
|
||||
SECTION("sets buffer to zero") {
|
||||
BigData* num;
|
||||
SBigNew(&num);
|
||||
SBigFromUnsigned(num, 0x12345678);
|
||||
|
||||
CHECK(num->Primary().Count() == 1);
|
||||
|
||||
SetZero(num->Primary());
|
||||
|
||||
CHECK(num->Primary().Count() == 0);
|
||||
|
||||
SBigDel(num);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue