mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
Gen test for char pattern matching
This commit is contained in:
parent
9d91b9bc5a
commit
7064d1c060
1 changed files with 18 additions and 0 deletions
|
@ -4067,3 +4067,21 @@ fn int_let_generalization() {
|
||||||
RocStr
|
RocStr
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||||
|
fn pattern_match_char() {
|
||||||
|
assert_evals_to!(
|
||||||
|
indoc!(
|
||||||
|
r#"
|
||||||
|
c = 'A'
|
||||||
|
|
||||||
|
when c is
|
||||||
|
'A' -> "okay"
|
||||||
|
_ -> "FAIL"
|
||||||
|
"#
|
||||||
|
),
|
||||||
|
RocStr::from("okay"),
|
||||||
|
RocStr
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue