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:
Folkert de Vries 2023-01-19 20:49:06 +01:00 committed by GitHub
commit 810e05cd9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 180 additions and 10 deletions

View file

@ -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);