working happy path

This commit is contained in:
Folkert 2023-07-26 17:37:06 +02:00
parent d3ac7d616d
commit 644def72f1
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
7 changed files with 103 additions and 59 deletions

View file

@ -975,7 +975,7 @@ fn overflow_frees_list() {
}
#[test]
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
#[should_panic(expected = "Roc failed with message: ")]
fn undefined_variable() {
assert_evals_to!(
@ -992,6 +992,24 @@ fn undefined_variable() {
);
}
#[test]
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
#[should_panic(expected = "Roc failed with message: ")]
fn a_crash() {
assert_evals_to!(
indoc!(
r#"
if Bool.true then
crash "a crash"
else
0u64
"#
),
3,
i64
);
}
#[test]
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
#[should_panic(expected = "Roc failed with message: ")]