Update tests

not all tests pass yet. Will look at them with Ayaz.
This commit is contained in:
kilianv 2022-09-14 20:47:17 +02:00 committed by Ayaz Hafiz
parent 9a168ecba3
commit 9717747a54
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
25 changed files with 321 additions and 284 deletions

View file

@ -1385,7 +1385,7 @@ mod solve_expr {
infer_eq(
indoc!(
r#"
if True then
if Bool.true then
42
else
24
@ -3812,7 +3812,7 @@ mod solve_expr {
when x is
2 | 3 -> 0
a if a < 20 -> 1
3 | 4 if False -> 2
3 | 4 if Bool.false -> 2
_ -> 3
"#
),
@ -4054,7 +4054,7 @@ mod solve_expr {
r#"
\rec ->
{ x, y } : { x : I64, y ? Bool }*
{ x, y ? False } = rec
{ x, y ? Bool.false } = rec
{ x, y }
"#
@ -5015,7 +5015,7 @@ mod solve_expr {
infer_eq_without_problem(
indoc!(
r#"
badComics: Bool -> [CowTools _, Thagomizer _]
badComics: [True, False] -> [CowTools _, Thagomizer _]
badComics = \c ->
when c is
True -> CowTools "The Far Side"
@ -5023,7 +5023,7 @@ mod solve_expr {
badComics
"#
),
"Bool -> [CowTools Str, Thagomizer Str]",
"[False, True] -> [CowTools Str, Thagomizer Str]",
)
}
@ -5929,7 +5929,7 @@ mod solve_expr {
infer_eq_without_problem(
indoc!(
r#"
if True then List.first [] else Str.toI64 ""
if Bool.true then List.first [] else Str.toI64 ""
"#
),
"Result I64 [InvalidNumStr, ListWasEmpty]*",
@ -6220,7 +6220,7 @@ mod solve_expr {
r#"
app "test" provides [foo] to "./platform"
foo : Bool -> Str
foo : [True, False] -> Str
foo = \ob ->
# ^^
when ob is
@ -6232,8 +6232,8 @@ mod solve_expr {
"#
),
@r###"
ob : Bool
ob : Bool
ob : [False, True]
ob : [False, True]
True : [False, True]
False : [False, True]
"###
@ -6912,7 +6912,7 @@ mod solve_expr {
indoc!(
r#"
f : _ -> _
f = \_ -> if False then "" else f ""
f = \_ -> if Bool.false then "" else f ""
f
"#
@ -6928,7 +6928,7 @@ mod solve_expr {
r#"
f : _ -> Str
f = \s -> g s
g = \s -> if True then s else f s
g = \s -> if Bool.true then s else f s
g
"#
@ -7430,7 +7430,7 @@ mod solve_expr {
# ^^
(f A (@C {}) (@D {}))
# ^
if True
if Bool.true
then it (@E {})
# ^^
else it (@F {})
@ -7741,8 +7741,8 @@ mod solve_expr {
infer_queries!(
indoc!(
r#"
x = True
y = False
x = Bool.true
y = Bool.false
a = "foo"
b = "bar"
@ -7756,8 +7756,8 @@ mod solve_expr {
"#
),
@r###"
foo : {} -[[foo(5) [True]* [False]* Str Str]]-> Str
bar : {} -[[bar(6) [True]* [False]* Str Str]]-> Str
foo : {} -[[foo(5) Bool Bool Str Str]]-> Str
bar : {} -[[bar(6) Bool Bool Str Str]]-> Str
"###
);
}