mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Updated bigint.
This commit is contained in:
@@ -11,6 +11,17 @@ fn void test_plus()
|
||||
assert(a.add(b).equals(bigint::from_int(12323400012311213314141414i128 + 23400012311213314141414i128)));
|
||||
}
|
||||
|
||||
fn void test_mult()
|
||||
{
|
||||
BigInt a = bigint::from_int(123);
|
||||
BigInt b = bigint::from_int(234);
|
||||
assert(a.mult(b).equals(bigint::from_int(234 * 123)));
|
||||
|
||||
a = bigint::from_int(1232311213314141414i128);
|
||||
b = bigint::from_int(234000123112414i128);
|
||||
assert(a.mult(b).equals(bigint::from_int(1232311213314141414i128 * 234000123112414i128)));
|
||||
}
|
||||
|
||||
fn void test_minus()
|
||||
{
|
||||
BigInt a = bigint::from_int(123);
|
||||
|
||||
Reference in New Issue
Block a user