mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 16:44:33 +00:00
add x86_64 Int Num.neg support for gen_dev
This commit is contained in:
parent
b03ed18553
commit
71bef85984
5 changed files with 59 additions and 1 deletions
|
@ -1214,7 +1214,18 @@ fn tail_call_elimination() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-dev"))]
|
||||
fn int_negate_dev() {
|
||||
// Dev backend yet to have `Num.maxInt` or `Num.minInt`.
|
||||
// TODO Remove this test and add "gen-dev" feature the below
|
||||
// after implementing the both.
|
||||
assert_evals_to!("Num.neg 123", -123, i64);
|
||||
assert_evals_to!("Num.neg -123", 123, i64);
|
||||
assert_evals_to!("Num.neg 0", 0, i64);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
fn int_negate() {
|
||||
assert_evals_to!("Num.neg 123", -123, i64);
|
||||
assert_evals_to!("Num.neg Num.maxInt", -i64::MAX, i64);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue