Add a test for polymorphic dbgs

This commit is contained in:
Ayaz Hafiz 2022-12-14 16:54:28 -06:00
parent bd06714fd2
commit a4f124687d
No known key found for this signature in database
GPG Key ID: 0E2A37416A25EF58
2 changed files with 15 additions and 4 deletions

View File

@ -568,7 +568,7 @@ mod cli_run {
r#"
This expectation failed:
14 expect x != x
18 expect x != x
^^^^^^
When it failed, these variables had these values:
@ -576,8 +576,11 @@ mod cli_run {
x : Num *
x = 42
[<ignored for tests> 15:9] 42
[<ignored for tests> 16:9] "Fjoer en ferdjer frieten oan dyn geve lea"
[<ignored for tests> 19:9] 42
[<ignored for tests> 20:9] "Fjoer en ferdjer frieten oan dyn geve lea"
[<ignored for tests> 13:9] "abc"
[<ignored for tests> 13:9] 10
[<ignored for tests> 13:9] A (B C)
Program finished!
"#
),

View File

@ -9,9 +9,17 @@ expect
a == b
polyDbg = \x ->
dbg x
x
main =
x = 42
expect x != x
dbg x
dbg "Fjoer en ferdjer frieten oan dyn geve lea"
"Program finished!\n"
r = {x : polyDbg "abc", y: polyDbg 10u8, z : polyDbg (A (B C))}
when r is
_ -> "Program finished!\n"