mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
Merge pull request #4922 from thehabbos007/asa/numgt
gen_dev: fix signed/unsigned `less than` and add signed/unsigned `greater than`
This commit is contained in:
commit
810e05cd9a
5 changed files with 180 additions and 10 deletions
|
@ -1382,7 +1382,7 @@ fn gte_u8() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn lt_u64() {
|
||||
assert_evals_to!("1u64 < 2u64", true, bool);
|
||||
assert_evals_to!("1u64 < 1u64", false, bool);
|
||||
|
@ -1402,7 +1402,7 @@ fn lte_u64() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn gt_u64() {
|
||||
assert_evals_to!("2u64 > 1u64", true, bool);
|
||||
assert_evals_to!("2u64 > 2u64", false, bool);
|
||||
|
@ -1422,7 +1422,7 @@ fn gte_u64() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn lt_i64() {
|
||||
assert_evals_to!("1 < 2", true, bool);
|
||||
assert_evals_to!("1 < 1", false, bool);
|
||||
|
@ -1440,7 +1440,7 @@ fn lte_i64() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
||||
fn gt_i64() {
|
||||
assert_evals_to!("2 > 1", true, bool);
|
||||
assert_evals_to!("2 > 2", false, bool);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue