diff options
Diffstat (limited to 'stdlib/source/test/lux/data')
-rw-r--r-- | stdlib/source/test/lux/data/binary.lux | 26 | ||||
-rw-r--r-- | stdlib/source/test/lux/data/collection/list.lux | 4 | ||||
-rw-r--r-- | stdlib/source/test/lux/data/collection/sequence.lux | 10 | ||||
-rw-r--r-- | stdlib/source/test/lux/data/color/named.lux | 4 | ||||
-rw-r--r-- | stdlib/source/test/lux/data/format/tar.lux | 4 | ||||
-rw-r--r-- | stdlib/source/test/lux/data/name.lux | 4 | ||||
-rw-r--r-- | stdlib/source/test/lux/data/text.lux | 14 | ||||
-rw-r--r-- | stdlib/source/test/lux/data/text/escape.lux | 22 | ||||
-rw-r--r-- | stdlib/source/test/lux/data/text/unicode/block.lux | 2 |
9 files changed, 45 insertions, 45 deletions
diff --git a/stdlib/source/test/lux/data/binary.lux b/stdlib/source/test/lux/data/binary.lux index 3326d0055..b7ae6bba4 100644 --- a/stdlib/source/test/lux/data/binary.lux +++ b/stdlib/source/test/lux/data/binary.lux @@ -38,7 +38,7 @@ (if (n.< size idx) (do random.monad [byte random.nat] - (exec (try.assumed (/.write/8 idx byte output)) + (exec (try.assumed (/.write/8! idx byte output)) (recur (inc idx)))) (\ random.monad in output))))) @@ -104,14 +104,14 @@ (|> (/.create size) /.size (n.= size))) (_.for [/.index_out_of_bounds] ($_ _.and - (_.cover [/.read/8 /.write/8] - (..binary_io 0 /.read/8 /.write/8 value)) - (_.cover [/.read/16 /.write/16] - (..binary_io 1 /.read/16 /.write/16 value)) - (_.cover [/.read/32 /.write/32] - (..binary_io 2 /.read/32 /.write/32 value)) - (_.cover [/.read/64 /.write/64] - (..binary_io 3 /.read/64 /.write/64 value)))) + (_.cover [/.read/8! /.write/8!] + (..binary_io 0 /.read/8! /.write/8! value)) + (_.cover [/.read/16! /.write/16!] + (..binary_io 1 /.read/16! /.write/16! value)) + (_.cover [/.read/32! /.write/32!] + (..binary_io 2 /.read/32! /.write/32! value)) + (_.cover [/.read/64! /.write/64!] + (..binary_io 3 /.read/64! /.write/64! value)))) (_.cover [/.slice] (let [random_slice (try.assumed (/.slice offset length sample)) idxs (: (List Nat) @@ -119,7 +119,7 @@ 0 (list) _ (enum.range n.enum 0 (dec length)))) reader (function (_ binary idx) - (/.read/8 idx binary))] + (/.read/8! idx binary))] (and (n.= length (/.size random_slice)) (case [(monad.map try.monad (|>> (n.+ offset) (reader sample)) idxs) (monad.map try.monad (reader random_slice) idxs)] @@ -154,10 +154,10 @@ false) (succeed (do try.monad - [sample/0 (/.read/8 0 sample) + [sample/0 (/.read/8! 0 sample) copy (/.copy 1 0 sample 0 (/.create 2)) - copy/0 (/.read/8 0 copy) - copy/1 (/.read/8 1 copy)] + copy/0 (/.read/8! 0 copy) + copy/1 (/.read/8! 1 copy)] (in (and (n.= sample/0 copy/0) (n.= 0 copy/1))))))) ))))) diff --git a/stdlib/source/test/lux/data/collection/list.lux b/stdlib/source/test/lux/data/collection/list.lux index ee6b9e7cb..abf61aef3 100644 --- a/stdlib/source/test/lux/data/collection/list.lux +++ b/stdlib/source/test/lux/data/collection/list.lux @@ -96,8 +96,8 @@ (\ bit.equivalence = (/.empty? sample) (n.= 0 (/.size sample)))) - (_.cover [/.repeat] - (n.= size (/.size (/.repeat size [])))) + (_.cover [/.repeated] + (n.= size (/.size (/.repeated size [])))) (_.cover [/.reversed] (or (n.< 2 (/.size sample)) (let [not_same! diff --git a/stdlib/source/test/lux/data/collection/sequence.lux b/stdlib/source/test/lux/data/collection/sequence.lux index c94b19ac6..7485d857c 100644 --- a/stdlib/source/test/lux/data/collection/sequence.lux +++ b/stdlib/source/test/lux/data/collection/sequence.lux @@ -43,16 +43,16 @@ cycle_next (random.list size random.nat)] ($_ _.and (_.for [/.functor] - ($functor.spec /.repeat ..equivalence /.functor)) + ($functor.spec /.repeated ..equivalence /.functor)) (_.for [/.comonad] - ($comonad.spec /.repeat ..equivalence /.comonad)) + ($comonad.spec /.repeated ..equivalence /.comonad)) (_.cover [/.iterations /.item] (n.= (n.+ offset index) (/.item index (/.iterations inc offset)))) - (_.cover [/.repeat] + (_.cover [/.repeated] (n.= repeated - (/.item index (/.repeat repeated)))) + (/.item index (/.repeated repeated)))) (_.cover [/.take] (list\= (enum.range n.enum offset (dec (n.+ size offset))) (/.take size (/.iterations inc offset)))) @@ -103,7 +103,7 @@ offset))))) (_.cover [/.cycle] (let [cycle (list& cycle_start cycle_next)] - (list\= (list.concat (list.repeat size cycle)) + (list\= (list.concat (list.repeated size cycle)) (/.take (n.* size (list.size cycle)) (/.cycle [cycle_start cycle_next]))))) (_.cover [/.^sequence&] diff --git a/stdlib/source/test/lux/data/color/named.lux b/stdlib/source/test/lux/data/color/named.lux index 7f8c959b9..6d0130db6 100644 --- a/stdlib/source/test/lux/data/color/named.lux +++ b/stdlib/source/test/lux/data/color/named.lux @@ -21,7 +21,7 @@ (with_expansions [<colors> (as_is [letter/a [/.alice_blue /.antique_white - ## /.aqua + ... /.aqua /.aquamarine /.azure]] @@ -72,7 +72,7 @@ [/.fire_brick /.floral_white /.forest_green - ## /.fuchsia + ... /.fuchsia ]] [letter/g diff --git a/stdlib/source/test/lux/data/format/tar.lux b/stdlib/source/test/lux/data/format/tar.lux index 4ccec923b..c951382ba 100644 --- a/stdlib/source/test/lux/data/format/tar.lux +++ b/stdlib/source/test/lux/data/format/tar.lux @@ -163,7 +163,7 @@ chunk (random.ascii/lower chunk_size) chunks (\ ! map (n.% 100) random.nat) .let [content (|> chunk - (list.repeat chunks) + (list.repeated chunks) (text.join_with "") (\ utf8.codec encode))]] (`` ($_ _.and @@ -206,7 +206,7 @@ (in (case (row.list tar) (^ (list (<tag> [actual_path actual_moment actual_mode actual_ownership actual_content]))) (let [seconds (: (-> Instant Int) - (|>> instant.relative (duration.query duration.second)))] + (|>> instant.relative (duration.ticks duration.second)))] (and (text\= (/.from_path expected_path) (/.from_path actual_path)) (i.= (seconds expected_moment) diff --git a/stdlib/source/test/lux/data/name.lux b/stdlib/source/test/lux/data/name.lux index 01d5131c8..2cde215a0 100644 --- a/stdlib/source/test/lux/data/name.lux +++ b/stdlib/source/test/lux/data/name.lux @@ -29,11 +29,11 @@ Test (<| (_.covering /._) (do {! random.monad} - [## First Name + [... First Name sizeM1 (|> random.nat (\ ! map (n.% 100))) sizeS1 (|> random.nat (\ ! map (|>> (n.% 100) (n.max 1)))) (^@ name1 [module1 short1]) (..random sizeM1 sizeS1) - ## Second Name + ... Second Name sizeM2 (|> random.nat (\ ! map (n.% 100))) sizeS2 (|> random.nat (\ ! map (|>> (n.% 100) (n.max 1)))) (^@ name2 [module2 short2]) (..random sizeM2 sizeS2)] diff --git a/stdlib/source/test/lux/data/text.lux b/stdlib/source/test/lux/data/text.lux index ca7f2f69f..4ff904116 100644 --- a/stdlib/source/test/lux/data/text.lux +++ b/stdlib/source/test/lux/data/text.lux @@ -204,10 +204,10 @@ (\ /.equivalence = (/.concat (set.list characters)) (/.join_with "" (set.list characters))))) - (_.cover [/.replace_once] + (_.cover [/.replaced/1] (\ /.equivalence = (\ /.monoid compose post static) - (/.replace_once pre post (\ /.monoid compose pre static)))) + (/.replaced/1 pre post (\ /.monoid compose pre static)))) (_.cover [/.split_with] (case (/.split_with static ($_ (\ /.monoid compose) pre static post)) (#.Some [left right]) @@ -314,9 +314,9 @@ (do {! random.monad} [sizeP bounded_size sizeL bounded_size - .let [## The wider unicode charset includes control characters that - ## can make text replacement work improperly. - ## Because of that, I restrict the charset. + .let [... The wider unicode charset includes control characters that + ... can make text replacement work improperly. + ... Because of that, I restrict the charset. normal_char_gen (|> random.nat (\ ! map (|>> (n.% 128) (n.max 1))))] sep1 (random.text normal_char_gen 1) sep2 (random.text normal_char_gen 1) @@ -326,9 +326,9 @@ .let [sample1 (/.concat (list.interpose sep1 parts)) sample2 (/.concat (list.interpose sep2 parts)) (^open "/\.") /.equivalence]] - (_.cover [/.replace_all] + (_.cover [/.replaced] (/\= sample2 - (/.replace_all sep1 sep2 sample1)))) + (/.replaced sep1 sep2 sample1)))) /buffer.test /encoding.test diff --git a/stdlib/source/test/lux/data/text/escape.lux b/stdlib/source/test/lux/data/text/escape.lux index 3b320fd90..35dfaf1cf 100644 --- a/stdlib/source/test/lux/data/text/escape.lux +++ b/stdlib/source/test/lux/data/text/escape.lux @@ -76,8 +76,8 @@ (random.ascii 10))]] (in (list (code.text expected))))) -(syntax: (static_escape {un_escaped <code>.text}) - (in (list (code.text (/.escape un_escaped))))) +(syntax: (static_escaped {un_escaped <code>.text}) + (in (list (code.text (/.escaped un_escaped))))) (def: .public test Test @@ -99,24 +99,24 @@ (do random.monad [left (random.char unicode.character) right (random.char unicode.character)] - (_.cover [/.escape /.un_escape] + (_.cover [/.escaped /.un_escaped] (let [expected (format (text.of_char left) (text.of_char right))] (if (or (/.escapable? left) (/.escapable? right)) - (let [escaped (/.escape expected)] - (case (/.un_escape escaped) + (let [escaped (/.escaped expected)] + (case (/.un_escaped escaped) (#try.Success un_escaped) (and (not (text\= escaped expected)) (text\= un_escaped expected)) (#try.Failure error) false)) - (text\= expected (/.escape expected)))))) + (text\= expected (/.escaped expected)))))) (do {! random.monad} [dummy (|> (random.char unicode.character) (\ ! map text.of_char))] (_.cover [/.dangling_escape] - (case (/.un_escape (format (/.escape dummy) "\")) + (case (/.un_escaped (format (/.escaped dummy) "\")) (#try.Success _) false @@ -127,7 +127,7 @@ (random.only (|>> (set.member? ..valid_sigils) not)) (\ ! map text.of_char))] (_.cover [/.invalid_escape] - (case (/.un_escape (format "\" dummy)) + (case (/.un_escaped (format "\" dummy)) (#try.Success _) false @@ -143,7 +143,7 @@ (#try.Success _) false))))] (_.cover [/.invalid_unicode_escape] (template.let [(!invalid <code>) - [(case (/.un_escape (format "\u" <code>)) + [(case (/.un_escaped (format "\u" <code>)) (#try.Success _) false @@ -151,7 +151,7 @@ (exception.match? /.invalid_unicode_escape error))]] (and (!invalid (\ n.hex encode too_short)) (!invalid code))))) - (_.cover [/.escaped] + (_.cover [/.literal] (with_expansions [<example> (..static_sample)] - (text\= <example> (`` (/.escaped (~~ (..static_escape <example>))))))) + (text\= <example> (`` (/.literal (~~ (..static_escaped <example>))))))) ))) diff --git a/stdlib/source/test/lux/data/text/unicode/block.lux b/stdlib/source/test/lux/data/text/unicode/block.lux index 4f92f8db9..6cdc5f091 100644 --- a/stdlib/source/test/lux/data/text/unicode/block.lux +++ b/stdlib/source/test/lux/data/text/unicode/block.lux @@ -141,7 +141,7 @@ /.halfwidth_and_fullwidth_forms /.specials - ## Specialized blocks + ... Specialized blocks /.basic_latin/decimal /.basic_latin/upper /.basic_latin/lower]] |