mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 06:55:15 +00:00
Add a test for polymorphic dbgs
This commit is contained in:
parent
bd06714fd2
commit
a4f124687d
2 changed files with 15 additions and 4 deletions
|
@ -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!
|
||||
"#
|
||||
),
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue