mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-31 00:57:24 +00:00
Update tests
This commit is contained in:
parent
1a9668e83a
commit
b8de09d048
61 changed files with 757 additions and 720 deletions
|
@ -1,3 +1,3 @@
|
|||
when x is
|
||||
Foo.and -> 1
|
||||
Foo.val -> 1
|
||||
_ -> 4
|
|
@ -9,7 +9,7 @@
|
|||
patterns: [
|
||||
@14-21 SpaceBefore(
|
||||
Malformed(
|
||||
"Foo.and",
|
||||
"Foo.val",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
when x is
|
||||
Foo.and -> 1
|
||||
Foo.val -> 1
|
||||
_ -> 4
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
expect
|
||||
html : Html {}
|
||||
html =
|
||||
Element "a" 43 [HtmlAttr "href" "https://www.roc-lang.org/"] [Text "Roc"]
|
||||
|
||||
actual : { nodes : List RenderedNode, siblingIds : List U64 }
|
||||
actual =
|
||||
indexNodes { nodes: [], siblingIds: [] } html
|
||||
|
||||
expected : { nodes : List RenderedNode, siblingIds : List U64 }
|
||||
expected = {
|
||||
nodes: [
|
||||
RenderedText "Roc",
|
||||
RenderedElement "a" { emptyRenderedAttrs & htmlAttrs: Dict.fromList [("href", "https://www.roc-lang.org/")] } [0],
|
||||
],
|
||||
siblingIds: [1],
|
||||
}
|
||||
|
||||
(actual.nodes == expected.nodes)
|
||||
and (actual.siblingIds == expected.siblingIds)
|
|
@ -1,4 +1,4 @@
|
|||
my_var =
|
||||
some_var # c
|
||||
|| other_thing # ^D
|
||||
or other_thing # ^D
|
||||
final_expr
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue