mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
implement non-recursive tags
This commit is contained in:
parent
64be250a15
commit
2514e7d845
4 changed files with 285 additions and 46 deletions
|
@ -556,4 +556,42 @@ mod test {
|
|||
),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn result_with_strings() {
|
||||
run_expect_test(
|
||||
indoc!(
|
||||
r#"
|
||||
app "test" provides [main] to "./platform"
|
||||
|
||||
main = 0
|
||||
|
||||
expect
|
||||
a = Ok "Astra mortemque praestare gradatim"
|
||||
b = Err "Profundum et fundamentum"
|
||||
|
||||
a == b
|
||||
"#
|
||||
),
|
||||
indoc!(
|
||||
r#"
|
||||
This expectation failed:
|
||||
|
||||
5│> expect
|
||||
6│> a = Ok "Astra mortemque praestare gradatim"
|
||||
7│> b = Err "Profundum et fundamentum"
|
||||
8│>
|
||||
9│> a == b
|
||||
|
||||
When it failed, these variables had these values:
|
||||
|
||||
a : [Ok Str]a
|
||||
a = Ok "Astra mortemque praestare gradatim"
|
||||
|
||||
b : [Err Str]a
|
||||
b = Err "Profundum et fundamentum"
|
||||
"#
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue