mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-29 23:11:35 +00:00
update tag tests
This commit is contained in:
parent
60b7f2cf94
commit
4b5432328b
1 changed files with 4 additions and 23 deletions
|
|
@ -87,25 +87,6 @@ fn applied_tag_just() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
|
|
||||||
fn applied_tag_just_ir() {
|
|
||||||
assert_evals_to!(
|
|
||||||
indoc!(
|
|
||||||
r#"
|
|
||||||
Maybe a : [Just a, Nothing]
|
|
||||||
|
|
||||||
y : Maybe I64
|
|
||||||
y = Just 0x4
|
|
||||||
|
|
||||||
y
|
|
||||||
"#
|
|
||||||
),
|
|
||||||
(0x4, 0),
|
|
||||||
(i64, u8)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||||
fn applied_tag_just_enum() {
|
fn applied_tag_just_enum() {
|
||||||
|
|
@ -522,12 +503,12 @@ fn if_guard_vanilla() {
|
||||||
indoc!(
|
indoc!(
|
||||||
r#"
|
r#"
|
||||||
when "fooz" is
|
when "fooz" is
|
||||||
s if s == "foo" -> 0
|
s if s == "foo" -> []
|
||||||
s -> List.len (Str.toUtf8 s)
|
s -> Str.toUtf8 s
|
||||||
"#
|
"#
|
||||||
),
|
),
|
||||||
4,
|
RocList::from_slice(b"fooz"),
|
||||||
i64
|
RocList<u8>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue