Gen test for char pattern matching

This commit is contained in:
Ayaz Hafiz 2022-10-03 16:04:29 -05:00
parent 9d91b9bc5a
commit 7064d1c060
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -4067,3 +4067,21 @@ fn int_let_generalization() {
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
);
}