Remove mono test in favor of gen tests

This commit is contained in:
Ayaz Hafiz 2022-08-09 14:58:43 -07:00
parent 1a09f3e0e6
commit 4bfac11624
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 45 additions and 19 deletions

View file

@ -3705,3 +3705,48 @@ fn runtime_error_when_degenerate_pattern_reached() {
true // allow errors
);
}
#[test]
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
fn recursive_lambda_set_issue_3444() {
assert_evals_to!(
indoc!(
r#"
combine = \a, b -> (\x -> b (a x))
const = \x -> (\_y -> x)
list = [const "a", const "b", const "c"]
res : Str -> Str
res = List.walk list (const "z") (\c1, c2 -> combine c1 c2)
res "hello"
"#
),
RocStr::from("c"),
RocStr
);
}
#[test]
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
fn recursive_lambda_set_toplevel_issue_3444() {
assert_evals_to!(
indoc!(
r#"
app "test" provides [main] to "./platform"
combine = \a, b -> (\x -> b (a x))
const = \x -> (\_y -> x)
list = [const "a", const "b", const "c"]
res : Str -> Str
res = List.walk list (const "z") (\c1, c2 -> combine c1 c2)
main = res "hello"
"#
),
RocStr::from("c"),
RocStr
);
}

View file

@ -1922,22 +1922,3 @@ fn issue_3669() {
"#
)
}
#[mono_test]
fn issue_3444() {
indoc!(
r#"
app "test" provides [main] to "./platform"
combine = \a, b -> (\x -> x |> a |> b )
const = \x -> (\_y -> x)
list = []
res : Str -> Str
res = List.walk list (const "z") (\c1, c2 -> combine c1 c2)
main = res "hello"
"#
)
}