Fix tautological big_int tests.
This commit is contained in:
committed by
Andrew Kelley
parent
f8ea292d09
commit
d6faa4e868
@@ -4180,8 +4180,12 @@ pub const Value = extern union {
|
||||
const result_limbs = lhs_bigint.limbs.len -| (shift / (@sizeOf(std.math.big.Limb) * 8));
|
||||
if (result_limbs == 0) {
|
||||
// The shift is enough to remove all the bits from the number, which means the
|
||||
// result is zero.
|
||||
return Value.zero;
|
||||
// result is 0 or -1 depending on the sign.
|
||||
if (lhs_bigint.positive) {
|
||||
return Value.zero;
|
||||
} else {
|
||||
return Value.negative_one;
|
||||
}
|
||||
}
|
||||
|
||||
const limbs = try allocator.alloc(
|
||||
|
||||
Reference in New Issue
Block a user