mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 16:44:33 +00:00
add mono test
This commit is contained in:
parent
f43c10373f
commit
b7f26baf95
2 changed files with 70 additions and 0 deletions
|
@ -1084,6 +1084,33 @@ fn specialize_lowlevel() {
|
|||
)
|
||||
}
|
||||
|
||||
#[mono_test]
|
||||
fn empty_list_of_function_type() {
|
||||
// see https://github.com/rtfeldman/roc/issues/1732
|
||||
indoc!(
|
||||
r#"
|
||||
app "test" provides [ main ] to "./platform"
|
||||
|
||||
main =
|
||||
myList : List (Str -> Str)
|
||||
myList = []
|
||||
|
||||
myClosure : Str -> Str
|
||||
myClosure = \_ -> "bar"
|
||||
|
||||
choose =
|
||||
if False then
|
||||
myList
|
||||
else
|
||||
[ myClosure ]
|
||||
|
||||
when List.get choose 0 is
|
||||
Ok f -> f "foo"
|
||||
Err _ -> "bad!"
|
||||
"#
|
||||
)
|
||||
}
|
||||
|
||||
// #[ignore]
|
||||
// #[mono_test]
|
||||
// fn static_str_closure() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue