Move uitests to their own crate

This commit is contained in:
Ayaz Hafiz 2023-04-02 09:11:31 -05:00
parent 630a8e32d4
commit 2f43aad8d0
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
65 changed files with 507 additions and 9 deletions

View file

@ -0,0 +1,14 @@
app "test" provides [main] to "./platform"
input : [A Str, B Str]
input = A "foo"
drop : a -> {}
drop = \_ -> {}
main = when input is
# ^^^^^ [A Str, B Str]
A _ as a -> drop a
# ^ [A Str, B Str]
B _ as b -> drop b
# ^ [A Str, B Str]

View file

@ -0,0 +1,10 @@
app "test" provides [main] to "./platform"
input : List Str
input = [ "foo", "bar" ]
main = when input is
# ^^^^^ List Str
[ _first, .. as rest ] -> 1 + List.len rest
# ^^^^ List Str
[] -> 0

View file

@ -0,0 +1,7 @@
app "test" provides [main] to "./platform"
main = when A "foo" is
A _ as a -> a
# ^ [A Str]w_a
b -> b
# ^ [A Str]w_a

View file

@ -0,0 +1,6 @@
app "test" provides [main] to "./platform"
Pair x _ = Pair 0 1
main = x
# ^ Num w_a