diff --git a/test/unit/stdlib/math/bigint.c3 b/test/unit/stdlib/math/bigint.c3 index 41b21f718..51eb40a6b 100644 --- a/test/unit/stdlib/math/bigint.c3 +++ b/test/unit/stdlib/math/bigint.c3 @@ -1,5 +1,20 @@ module std::math::bigint @test; +fn void test_init_with_u128() +{ + BigInt bi @noinit; + assert(!bi.init_with_u128(uint128.max).is_negative()); +} + +fn void init_with_array() +{ + BigInt bi @noinit; + + 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())); +} + fn void test_parse16() { BigInt bi @noinit;