diff options
author | Eduardo Julian | 2018-05-01 22:13:07 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-05-01 22:13:07 -0400 |
commit | 9906f649d26adfed5126065082fb4a7d5e4696bb (patch) | |
tree | 1a0fa34a6fdb90479cc679580384321c58830a68 /stdlib/test | |
parent | bdf674249b993b1135d59420033a92ba39278fea (diff) |
- Re-organized "lux/data/coll/tree/*" modules.
Diffstat (limited to 'stdlib/test')
-rw-r--r-- | stdlib/test/test/lux/data/coll/tree/rose/zipper.lux (renamed from stdlib/test/test/lux/data/coll/tree/zipper.lux) | 32 | ||||
-rw-r--r-- | stdlib/test/tests.lux | 6 |
2 files changed, 19 insertions, 19 deletions
diff --git a/stdlib/test/test/lux/data/coll/tree/zipper.lux b/stdlib/test/test/lux/data/coll/tree/rose/zipper.lux index 7b182a918..ff52e706d 100644 --- a/stdlib/test/test/lux/data/coll/tree/zipper.lux +++ b/stdlib/test/test/lux/data/coll/tree/rose/zipper.lux @@ -3,9 +3,9 @@ (lux [io] (control [monad #+ do Monad] pipe) - (data (coll [list "L/" Fold<List> Functor<List>] - (tree ["&" zipper] - [rose])) + (data (coll [list "list/" Fold<List> Functor<List>] + (tree [rose] + (rose ["&" zipper]))) [text] text/format [number] @@ -37,7 +37,7 @@ pre-val r.nat post-val r.nat #let [(^open "tree/") (rose.Eq<Tree> number.Eq<Nat>) - (^open "L/") (list.Eq<List> number.Eq<Nat>)]] + (^open "list/") (list.Eq<List> number.Eq<Nat>)]] ($_ seq (test "Trees can be converted to/from zippers." (|> sample @@ -98,20 +98,20 @@ (|> sample &.zip (&.set new-val) &.value (n/= new-val))) (test "Zipper traversal follows the outline of the tree depth-first." - (L/= (rose.flatten sample) - (loop [zipper (&.zip sample)] - (if (&.end? zipper) - (list (&.value zipper)) - (#.Cons (&.value zipper) - (recur (&.next zipper))))))) + (list/= (rose.flatten sample) + (loop [zipper (&.zip sample)] + (if (&.end? zipper) + (list (&.value zipper)) + (#.Cons (&.value zipper) + (recur (&.next zipper))))))) (test "Backwards zipper traversal yield reverse tree flatten." - (L/= (list.reverse (rose.flatten sample)) - (loop [zipper (to-end (&.zip sample))] - (if (&.root? zipper) - (list (&.value zipper)) - (#.Cons (&.value zipper) - (recur (&.prev zipper))))))) + (list/= (list.reverse (rose.flatten sample)) + (loop [zipper (to-end (&.zip sample))] + (if (&.root? zipper) + (list (&.value zipper)) + (#.Cons (&.value zipper) + (recur (&.prev zipper))))))) (test "Can remove nodes (except root nodes)." (let [zipper (&.zip sample)] diff --git a/stdlib/test/tests.lux b/stdlib/test/tests.lux index a25d419bc..71317af18 100644 --- a/stdlib/test/tests.lux +++ b/stdlib/test/tests.lux @@ -53,8 +53,8 @@ ["_." set/ordered] ["_." queue] (queue ["_." priority]) - (tree ["tree_." rose] - ["tree_." zipper])) + (tree ["_." rose] + (rose ["_." zipper]))) (text ["_." format] ["_." lexer] ["_." regex])) @@ -90,7 +90,7 @@ (format [context] [html] [css]) - (coll (tree ["tree_." parser]))) + (coll (tree ["_." rose/parser]))) [macro] (macro (poly [json])) (type [unit] |