diff options
Diffstat (limited to 'stdlib/source/test/lux/data/collection/tree/finger.lux')
-rw-r--r-- | stdlib/source/test/lux/data/collection/tree/finger.lux | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/stdlib/source/test/lux/data/collection/tree/finger.lux b/stdlib/source/test/lux/data/collection/tree/finger.lux index c34449027..f92d75440 100644 --- a/stdlib/source/test/lux/data/collection/tree/finger.lux +++ b/stdlib/source/test/lux/data/collection/tree/finger.lux @@ -33,8 +33,8 @@ (_.for [/.Tree]) (do {! random.monad} [tag_left (random.ascii/alpha_num 1) - tag_right (random.filter (|>> (text\= tag_left) not) - (random.ascii/alpha_num 1)) + tag_right (random.only (|>> (text\= tag_left) not) + (random.ascii/alpha_num 1)) expected_left random.nat expected_right random.nat] ($_ _.and @@ -91,16 +91,16 @@ (list.zip/2 tags/T values/T))] (and (\ tags_equivalence = (list& tags/H tags/T) (/.tags tree)) (\ values_equivalence = (list& values/H values/T) (/.values tree)))))) - (_.cover [/.search] + (_.cover [/.one] (let [can_find_correct_one! (|> (\ ..builder leaf tag_left expected_left) - (/.search (text.contains? tag_left)) + (/.one (text.contains? tag_left)) (maybe\map (n.= expected_left)) (maybe.default false)) cannot_find_incorrect_one! (|> (\ ..builder leaf tag_right expected_right) - (/.search (text.contains? tag_left)) + (/.one (text.contains? tag_left)) (maybe\map (n.= expected_left)) (maybe.default false) not) @@ -109,7 +109,7 @@ (|> (\ ..builder branch (\ ..builder leaf tag_left expected_left) (\ ..builder leaf tag_right expected_right)) - (/.search (text.contains? tag_left)) + (/.one (text.contains? tag_left)) (maybe\map (n.= expected_left)) (maybe.default false)) @@ -117,33 +117,33 @@ (|> (\ ..builder branch (\ ..builder leaf tag_left expected_left) (\ ..builder leaf tag_right expected_right)) - (/.search (text.contains? tag_right)) + (/.one (text.contains? tag_right)) (maybe\map (n.= expected_right)) (maybe.default false))] (and can_find_correct_one! cannot_find_incorrect_one! can_find_left! can_find_right!))) - (_.cover [/.found?] + (_.cover [/.exists?] (let [can_find_correct_one! - (/.found? (text.contains? tag_left) - (\ ..builder leaf tag_left expected_left)) + (/.exists? (text.contains? tag_left) + (\ ..builder leaf tag_left expected_left)) cannot_find_incorrect_one! - (not (/.found? (text.contains? tag_left) - (\ ..builder leaf tag_right expected_right))) + (not (/.exists? (text.contains? tag_left) + (\ ..builder leaf tag_right expected_right))) can_find_left! - (/.found? (text.contains? tag_left) - (\ ..builder branch - (\ ..builder leaf tag_left expected_left) - (\ ..builder leaf tag_right expected_right))) + (/.exists? (text.contains? tag_left) + (\ ..builder branch + (\ ..builder leaf tag_left expected_left) + (\ ..builder leaf tag_right expected_right))) can_find_right! - (/.found? (text.contains? tag_right) - (\ ..builder branch - (\ ..builder leaf tag_left expected_left) - (\ ..builder leaf tag_right expected_right)))] + (/.exists? (text.contains? tag_right) + (\ ..builder branch + (\ ..builder leaf tag_left expected_left) + (\ ..builder leaf tag_right expected_right)))] (and can_find_correct_one! cannot_find_incorrect_one! can_find_left! |