mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-11 05:34:11 +03:00
Cranelift test for getting an elem from a List Int
This commit is contained in:
parent
b5fff4c0cd
commit
46f8f2313f
@ -343,15 +343,20 @@ mod test_gen {
|
||||
assert_evals_to!("1234.0", 1234.0, f64);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn basic_int_list() {
|
||||
assert_crane_evals_to!("List.getUnsafe [ 12, 9, 6, 3 ] 1", 9, i64, |a| a);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn branch_first_float() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
when 1.23 is
|
||||
1.23 -> 12
|
||||
_ -> 34
|
||||
"#
|
||||
when 1.23 is
|
||||
1.23 -> 12
|
||||
_ -> 34
|
||||
"#
|
||||
),
|
||||
12,
|
||||
i64
|
||||
|
Loading…
Reference in New Issue
Block a user