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