Merge pull request #2354 from rtfeldman/add_builtin_Num.minI128

Add `Num.minI128` builtin
This commit is contained in:
Richard Feldman 2022-01-16 22:38:27 -05:00 committed by GitHub
commit 2ade76b373
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 80 additions and 0 deletions

View file

@ -1829,6 +1829,20 @@ fn shift_right_zf_by() {
assert_evals_to!("Num.shiftRightBy 3 0b0000_1100u8", 0b0000_0011, i64);
}
#[test]
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
fn min_i128() {
assert_evals_to!(
indoc!(
r#"
Num.minI128
"#
),
i128::MIN,
i128
);
}
#[test]
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
fn max_i128() {