| ... | @@ -1020,7 +1020,7 @@ test "big.int mulWrap multi-multi signed" { | ... | @@ -1020,7 +1020,7 @@ test "big.int mulWrap multi-multi signed" { |
| 1020 | | 1020 | |
| 1021 | var c = try Managed.init(testing.allocator); | 1021 | var c = try Managed.init(testing.allocator); |
| 1022 | defer c.deinit(); | 1022 | defer c.deinit(); |
| 1023 | try c.mulWrap(a.toConst(), b.toConst(), .signed, 128); | 1023 | try c.mulWrap(a.toConst(), b.toConst(), .signed, @bitSizeOf(SignedDoubleLimb)); |
| 1024 | | 1024 | |
| 1025 | try testing.expect((try c.to(SignedDoubleLimb)) == minInt(SignedDoubleLimb) + 2); | 1025 | try testing.expect((try c.to(SignedDoubleLimb)) == minInt(SignedDoubleLimb) + 2); |
| 1026 | } | 1026 | } |
| ... | @@ -1603,9 +1603,9 @@ test "big.int truncate multi to single unsigned" { | ... | @@ -1603,9 +1603,9 @@ test "big.int truncate multi to single unsigned" { |
| 1603 | var a = try Managed.initSet(testing.allocator, (maxInt(Limb) + 1) | 0x1234_5678_9ABC_DEF0); | 1603 | var a = try Managed.initSet(testing.allocator, (maxInt(Limb) + 1) | 0x1234_5678_9ABC_DEF0); |
| 1604 | defer a.deinit(); | 1604 | defer a.deinit(); |
| 1605 | | 1605 | |
| 1606 | try a.truncate(a.toConst(), .unsigned, 37); | 1606 | try a.truncate(a.toConst(), .unsigned, 27); |
| 1607 | | 1607 | |
| 1608 | try testing.expect((try a.to(u37)) == 0x18_9ABC_DEF0); | 1608 | try testing.expect((try a.to(u27)) == 0x2BC_DEF0); |
| 1609 | } | 1609 | } |
| 1610 | | 1610 | |
| 1611 | test "big.int truncate multi to single signed" { | 1611 | test "big.int truncate multi to single signed" { |