implement expect struct reporting

This commit is contained in:
Folkert 2022-07-28 16:47:02 +02:00
parent dbbbc32583
commit 1bfac155ca
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
3 changed files with 79 additions and 9 deletions

View file

@ -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" }
"#
),
);
}
}