mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
and add non-nullable unwrapped
This commit is contained in:
parent
be4e98e076
commit
a5293e2a60
2 changed files with 85 additions and 1 deletions
|
@ -788,4 +788,50 @@ mod test {
|
|||
),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn rose_tree() {
|
||||
run_expect_test(
|
||||
indoc!(
|
||||
r#"
|
||||
app "test" provides [main] to "./platform"
|
||||
|
||||
main = 0
|
||||
|
||||
RoseTree a : [Tree a (List (RoseTree a))]
|
||||
|
||||
expect
|
||||
a : RoseTree Str
|
||||
a = Tree "Astra mortemque praestare gradatim" []
|
||||
|
||||
b : RoseTree Str
|
||||
b = Tree "foo" [ Tree "bar" [] ]
|
||||
|
||||
a == b
|
||||
"#
|
||||
),
|
||||
indoc!(
|
||||
r#"
|
||||
This expectation failed:
|
||||
|
||||
7│> expect
|
||||
8│> a : RoseTree Str
|
||||
9│> a = Tree "Astra mortemque praestare gradatim" []
|
||||
10│>
|
||||
11│> b : RoseTree Str
|
||||
12│> b = Tree "foo" [ Tree "bar" [] ]
|
||||
13│>
|
||||
14│> a == b
|
||||
|
||||
When it failed, these variables had these values:
|
||||
|
||||
a : RoseTree Str
|
||||
a = Tree "Astra mortemque praestare gradatim" []
|
||||
|
||||
b : RoseTree Str
|
||||
b = Tree "foo" [Tree "bar" []]
|
||||
"#
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue