std::math::bigint: Fixed init_with_array with empty array

This commit is contained in:
Jonas Quinten
2025-02-21 19:53:00 +01:00
committed by Christoffer Lerno
parent 38110b0269
commit ed62268997
2 changed files with 8 additions and 2 deletions

View File

@@ -9,9 +9,8 @@ fn void test_init_with_u128()
fn void init_with_array()
{
BigInt bi @noinit;
assert(bi.init_with_array({}).equals(ZERO));
assert(bi.init_with_array({0, 0, 0, 1}).equals(bigint::from_int(1)));
assert("100000000" == bi.init_with_array({1, 0}).to_string_with_radix(16, allocator::temp()));
}