mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Move uitests to their own crate
This commit is contained in:
parent
630a8e32d4
commit
2f43aad8d0
65 changed files with 507 additions and 9 deletions
14
crates/compiler/uitest/tests/pattern/as/does_not_narrow.txt
Normal file
14
crates/compiler/uitest/tests/pattern/as/does_not_narrow.txt
Normal 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]
|
10
crates/compiler/uitest/tests/pattern/as/list.txt
Normal file
10
crates/compiler/uitest/tests/pattern/as/list.txt
Normal 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
|
|
@ -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
|
|
@ -0,0 +1,6 @@
|
|||
app "test" provides [main] to "./platform"
|
||||
|
||||
Pair x _ = Pair 0 1
|
||||
|
||||
main = x
|
||||
# ^ Num w_a
|
Loading…
Add table
Add a link
Reference in a new issue