aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/data
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux/data')
-rw-r--r--stdlib/source/test/lux/data/collection.lux4
-rw-r--r--stdlib/source/test/lux/data/collection/sequence.lux (renamed from stdlib/source/test/lux/data/collection/row.lux)10
-rw-r--r--stdlib/source/test/lux/data/format/json.lux18
-rw-r--r--stdlib/source/test/lux/data/format/tar.lux102
4 files changed, 67 insertions, 67 deletions
diff --git a/stdlib/source/test/lux/data/collection.lux b/stdlib/source/test/lux/data/collection.lux
index e4caad8c8..94f884ba9 100644
--- a/stdlib/source/test/lux/data/collection.lux
+++ b/stdlib/source/test/lux/data/collection.lux
@@ -6,7 +6,7 @@
["[1][0]" array]
["[1][0]" bits]
["[1][0]" list]
- ["[1][0]" row]
+ ["[1][0]" sequence]
["[1][0]" stream]
["[1][0]" stack]
["[1][0]" dictionary
@@ -58,7 +58,7 @@
/array.test
/bits.test
/list.test
- /row.test
+ /sequence.test
/stream.test
/stack.test
..dictionary
diff --git a/stdlib/source/test/lux/data/collection/row.lux b/stdlib/source/test/lux/data/collection/sequence.lux
index 8728a6df9..6ecbab8ee 100644
--- a/stdlib/source/test/lux/data/collection/row.lux
+++ b/stdlib/source/test/lux/data/collection/sequence.lux
@@ -32,9 +32,9 @@
[size (# ! each (n.% 100) random.nat)]
($_ _.and
(_.for [/.equivalence]
- ($equivalence.spec (/.equivalence n.equivalence) (random.row size random.nat)))
+ ($equivalence.spec (/.equivalence n.equivalence) (random.sequence size random.nat)))
(_.for [/.monoid]
- ($monoid.spec (/.equivalence n.equivalence) /.monoid (random.row size random.nat)))
+ ($monoid.spec (/.equivalence n.equivalence) /.monoid (random.sequence size random.nat)))
(_.for [/.mix]
($mix.spec /#in /.equivalence /.mix))
(_.for [/.functor]
@@ -132,7 +132,7 @@
(def: .public test
Test
(<| (_.covering /._)
- (_.for [/.Row])
+ (_.for [/.Sequence])
(do [! random.monad]
[size (# ! each (|>> (n.% 100) ++) random.nat)]
($_ _.and
@@ -151,9 +151,9 @@
[value/0 random.nat
value/1 random.nat
value/2 random.nat]
- (_.cover [/.row]
+ (_.cover [/.sequence]
(/#= (/.of_list (list value/0 value/1 value/2))
- (/.row value/0 value/1 value/2))))
+ (/.sequence value/0 value/1 value/2))))
(_.cover [/.member?]
(and (list.every? (/.member? n.equivalence sample)
(/.list sample))
diff --git a/stdlib/source/test/lux/data/format/json.lux b/stdlib/source/test/lux/data/format/json.lux
index 440ab1f07..9eb86e1c5 100644
--- a/stdlib/source/test/lux/data/format/json.lux
+++ b/stdlib/source/test/lux/data/format/json.lux
@@ -16,7 +16,7 @@
["[0]" text
["%" format {"+" format}]]
[collection
- ["[0]" row]
+ ["[0]" sequence]
["[0]" dictionary]
["[0]" set]
["[0]" list ("[1]#[0]" functor)]]]
@@ -42,7 +42,7 @@
random.bit
random.safe_frac
(random.unicode size)
- (random.row size again)
+ (random.sequence size again)
(random.dictionary text.hash size (random.unicode size) again)
)))))
@@ -147,16 +147,16 @@
[/.Boolean /.boolean_field /.#Boolean random.bit bit.equivalence]
[/.Number /.number_field /.#Number random.safe_frac frac.equivalence]
[/.String /.string_field /.#String (random.ascii/alpha 1) text.equivalence]
- [/.Array /.array_field /.#Array (random.row 3 ..random) (row.equivalence /.equivalence)]
+ [/.Array /.array_field /.#Array (random.sequence 3 ..random) (sequence.equivalence /.equivalence)]
[/.Object /.object_field /.#Object (random.dictionary text.hash 3 (random.ascii/alpha 1) ..random) (dictionary.equivalence /.equivalence)]
))
(with_expansions [<boolean> (boolean)
<number> (number)
<string> (string)
- <array_row> (row.row {/.#Null}
- {/.#Boolean <boolean>}
- {/.#Number <number>}
- {/.#String <string>})
+ <array_sequence> (sequence.sequence {/.#Null}
+ {/.#Boolean <boolean>}
+ {/.#Number <number>}
+ {/.#String <string>})
<key0> (string)
<key1> (string)
<key2> (string)
@@ -173,7 +173,7 @@
[/.#Number <number>]
[/.#String <string>]
))
- (#= {/.#Array <array_row>} (/.json [() <boolean> <number> <string>]))
+ (#= {/.#Array <array_sequence>} (/.json [() <boolean> <number> <string>]))
(let [object (/.json {<key0> ()
<key1> <boolean>
<key2> <number>
@@ -193,7 +193,7 @@
(#= {/.#Boolean <boolean>} value1)
(#= {/.#Number <number>} value2)
(#= {/.#String <string>} value3)
- (#= {/.#Array <array_row>} value4)
+ (#= {/.#Array <array_sequence>} value4)
(#= {/.#Number <number>} value6))))))
)))
))))
diff --git a/stdlib/source/test/lux/data/format/tar.lux b/stdlib/source/test/lux/data/format/tar.lux
index e01670420..37be384ef 100644
--- a/stdlib/source/test/lux/data/format/tar.lux
+++ b/stdlib/source/test/lux/data/format/tar.lux
@@ -21,7 +21,7 @@
["[1]" set]
["[1]/[0]" block]]]
[collection
- ["[0]" row]
+ ["[0]" sequence]
["[0]" list ("[1]#[0]" mix)]]
["[0]" format "_"
["[1]" binary]]]
@@ -171,10 +171,10 @@
[(_.cover [<type>]
(|> (do try.monad
[expected_path (/.path expected_path)
- tar (|> (row.row {<tag> expected_path})
+ tar (|> (sequence.sequence {<tag> expected_path})
(format.result /.writer)
(<b>.result /.parser))]
- (in (case (row.list tar)
+ (in (case (sequence.list tar)
(^ (list {<tag> actual_path}))
(text#= (/.from_path expected_path)
(/.from_path actual_path))
@@ -193,17 +193,17 @@
(|> (do try.monad
[expected_path (/.path expected_path)
expected_content (/.content content)
- tar (|> (row.row {<tag> [expected_path
- expected_moment
- /.none
- [/.#user [/.#name /.anonymous
- /.#id /.no_id]
- /.#group [/.#name /.anonymous
- /.#id /.no_id]]
- expected_content]})
+ tar (|> (sequence.sequence {<tag> [expected_path
+ expected_moment
+ /.none
+ [/.#user [/.#name /.anonymous
+ /.#id /.no_id]
+ /.#group [/.#name /.anonymous
+ /.#id /.no_id]]
+ expected_content]})
(format.result /.writer)
(<b>.result /.parser))]
- (in (case (row.list tar)
+ (in (case (sequence.list tar)
(^ (list {<tag> [actual_path actual_moment actual_mode actual_ownership actual_content]}))
(let [seconds (: (-> Instant Int)
(|>> instant.relative (duration.ticks duration.second)))]
@@ -251,17 +251,17 @@
(|> (do try.monad
[path (/.path path)
content (/.content (binary.empty 0))
- tar (|> (row.row {/.#Normal [path
- (instant.of_millis +0)
- expected_mode
- [/.#user [/.#name /.anonymous
- /.#id /.no_id]
- /.#group [/.#name /.anonymous
- /.#id /.no_id]]
- content]})
+ tar (|> (sequence.sequence {/.#Normal [path
+ (instant.of_millis +0)
+ expected_mode
+ [/.#user [/.#name /.anonymous
+ /.#id /.no_id]
+ /.#group [/.#name /.anonymous
+ /.#id /.no_id]]
+ content]})
(format.result /.writer)
(<b>.result /.parser))]
- (in (case (row.list tar)
+ (in (case (sequence.list tar)
(^ (list {/.#Normal [_ _ actual_mode _ _]}))
(n.= (/.mode expected_mode)
(/.mode actual_mode))
@@ -274,17 +274,17 @@
(|> (do try.monad
[path (/.path path)
content (/.content (binary.empty 0))
- tar (|> (row.row {/.#Normal [path
- (instant.of_millis +0)
- <expected_mode>
- [/.#user [/.#name /.anonymous
- /.#id /.no_id]
- /.#group [/.#name /.anonymous
- /.#id /.no_id]]
- content]})
+ tar (|> (sequence.sequence {/.#Normal [path
+ (instant.of_millis +0)
+ <expected_mode>
+ [/.#user [/.#name /.anonymous
+ /.#id /.no_id]
+ /.#group [/.#name /.anonymous
+ /.#id /.no_id]]
+ content]})
(format.result /.writer)
(<b>.result /.parser))]
- (in (case (row.list tar)
+ (in (case (sequence.list tar)
(^ (list {/.#Normal [_ _ actual_mode _ _]}))
(n.= (/.mode <expected_mode>)
(/.mode actual_mode))
@@ -341,17 +341,17 @@
[path (/.path path)
content (/.content (binary.empty 0))
expected (/.name expected)
- tar (|> (row.row {/.#Normal [path
- (instant.of_millis +0)
- /.none
- [/.#user [/.#name expected
- /.#id /.no_id]
- /.#group [/.#name /.anonymous
- /.#id /.no_id]]
- content]})
+ tar (|> (sequence.sequence {/.#Normal [path
+ (instant.of_millis +0)
+ /.none
+ [/.#user [/.#name expected
+ /.#id /.no_id]
+ /.#group [/.#name /.anonymous
+ /.#id /.no_id]]
+ content]})
(format.result /.writer)
(<b>.result /.parser))]
- (in (case (row.list tar)
+ (in (case (sequence.list tar)
(^ (list {/.#Normal [_ _ _ actual_ownership _]}))
(and (text#= (/.from_name expected)
(/.from_name (value@ [/.#user /.#name] actual_ownership)))
@@ -365,17 +365,17 @@
(|> (do try.monad
[path (/.path path)
content (/.content (binary.empty 0))
- tar (|> (row.row {/.#Normal [path
- (instant.of_millis +0)
- /.none
- [/.#user [/.#name /.anonymous
- /.#id /.no_id]
- /.#group [/.#name /.anonymous
- /.#id /.no_id]]
- content]})
+ tar (|> (sequence.sequence {/.#Normal [path
+ (instant.of_millis +0)
+ /.none
+ [/.#user [/.#name /.anonymous
+ /.#id /.no_id]
+ /.#group [/.#name /.anonymous
+ /.#id /.no_id]]
+ content]})
(format.result /.writer)
(<b>.result /.parser))]
- (in (case (row.list tar)
+ (in (case (sequence.list tar)
(^ (list {/.#Normal [_ _ _ actual_ownership _]}))
(and (text#= (/.from_name /.anonymous)
(/.from_name (value@ [/.#user /.#name] actual_ownership)))
@@ -399,13 +399,13 @@
[_ (in [])]
($_ _.and
(_.cover [/.writer /.parser]
- (|> row.empty
+ (|> sequence.empty
(format.result /.writer)
(<b>.result /.parser)
- (# try.monad each row.empty?)
+ (# try.monad each sequence.empty?)
(try.else false)))
(_.cover [/.invalid_end_of_archive]
- (let [dump (format.result /.writer row.empty)]
+ (let [dump (format.result /.writer sequence.empty)]
(case (<b>.result /.parser (binary#composite dump dump))
{try.#Success _}
false