mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
implement expect box reporting
This commit is contained in:
parent
1bfac155ca
commit
e61f025fef
2 changed files with 70 additions and 10 deletions
|
@ -518,4 +518,42 @@ mod test {
|
|||
),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn box_with_strings() {
|
||||
run_expect_test(
|
||||
indoc!(
|
||||
r#"
|
||||
app "test" provides [main] to "./platform"
|
||||
|
||||
main = 0
|
||||
|
||||
expect
|
||||
a = Box.box "Astra mortemque praestare gradatim"
|
||||
b = Box.box "Profundum et fundamentum"
|
||||
|
||||
a == b
|
||||
"#
|
||||
),
|
||||
indoc!(
|
||||
r#"
|
||||
This expectation failed:
|
||||
|
||||
5│> expect
|
||||
6│> a = Box.box "Astra mortemque praestare gradatim"
|
||||
7│> b = Box.box "Profundum et fundamentum"
|
||||
8│>
|
||||
9│> a == b
|
||||
|
||||
When it failed, these variables had these values:
|
||||
|
||||
a : Box Str
|
||||
a = Box.box "Astra mortemque praestare gradatim"
|
||||
|
||||
b : Box Str
|
||||
b = Box.box "Profundum et fundamentum"
|
||||
"#
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue