aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/data/binary.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux/data/binary.lux')
-rw-r--r--stdlib/source/test/lux/data/binary.lux38
1 files changed, 19 insertions, 19 deletions
diff --git a/stdlib/source/test/lux/data/binary.lux b/stdlib/source/test/lux/data/binary.lux
index 15df63e2e..b0eea56fa 100644
--- a/stdlib/source/test/lux/data/binary.lux
+++ b/stdlib/source/test/lux/data/binary.lux
@@ -44,7 +44,7 @@
[byte random.nat]
(exec (try.trusted (/.has_8! idx byte output))
(again (++ idx))))
- (# random.monad in output)))))
+ (at random.monad in output)))))
(def: (throws? exception try)
(All (_ e a) (-> (Exception e) (Try a) Bit))
@@ -84,13 +84,13 @@
(<| (_.covering !._)
(_.for [!.Binary])
(do [! random.monad]
- [.let [gen_size (|> random.nat (# ! each (|>> (n.% 100) (n.max 8))))]
+ [.let [gen_size (|> random.nat (at ! each (|>> (n.% 100) (n.max 8))))]
size gen_size
sample (..random size)
value random.nat
- .let [gen_idx (|> random.nat (# ! each (n.% size)))]
+ .let [gen_idx (|> random.nat (at ! each (n.% size)))]
offset gen_idx
- length (# ! each (n.% (n.- offset size)) random.nat)]
+ length (at ! each (n.% (n.- offset size)) random.nat)]
(`` (all _.and
(_.for [!.=]
($equivalence.spec (function (_ left right)
@@ -128,9 +128,9 @@
reader (function (_ binary idx)
(!.bits_8 idx binary))]
(and (n.= length (!.size random_slice))
- (# (list.equivalence n.equivalence) =
- (list#each (|>> (n.+ offset) (reader sample)) idxs)
- (list#each (reader random_slice) idxs)))))
+ (at (list.equivalence n.equivalence) =
+ (list#each (|>> (n.+ offset) (reader sample)) idxs)
+ (list#each (reader random_slice) idxs)))))
(_.coverage [!.copy!]
(and (let [it (!.copy! size 0 sample 0 (!.empty size))]
(and (not (same? sample it))
@@ -148,26 +148,26 @@
(<| (_.covering /._)
(_.for [/.Binary])
(do [! random.monad]
- [.let [gen_size (|> random.nat (# ! each (|>> (n.% 100) (n.max 8))))]
+ [.let [gen_size (|> random.nat (at ! each (|>> (n.% 100) (n.max 8))))]
size gen_size
sample (..random size)
value random.nat
- .let [gen_idx (|> random.nat (# ! each (n.% size)))]
- offset (# ! each (n.max 1) gen_idx)
- length (# ! each (n.% (n.- offset size)) random.nat)]
+ .let [gen_idx (|> random.nat (at ! each (n.% size)))]
+ offset (at ! each (n.max 1) gen_idx)
+ length (at ! each (n.% (n.- offset size)) random.nat)]
(all _.and
(_.for [/.equivalence]
($equivalence.spec /.equivalence (..random size)))
(_.for [/.monoid]
($monoid.spec /.equivalence /.monoid (..random size)))
(_.coverage [/.mix]
- (n.= (# list.mix mix n.+ 0 (..as_list sample))
+ (n.= (at list.mix mix n.+ 0 (..as_list sample))
(/.mix n.+ 0 sample)))
(_.coverage [/.empty]
- (# /.equivalence =
- (/.empty size)
- (/.empty size)))
+ (at /.equivalence =
+ (/.empty size)
+ (/.empty size)))
(_.coverage [/.size]
(|> (/.empty size) /.size (n.= size)))
(_.for [/.index_out_of_bounds]
@@ -192,7 +192,7 @@
(case [(monad.each try.monad (|>> (n.+ offset) (reader sample)) idxs)
(monad.each try.monad (reader random_slice) idxs)]
[{try.#Success binary_vals} {try.#Success slice_vals}]
- (# (list.equivalence n.equivalence) = binary_vals slice_vals)
+ (at (list.equivalence n.equivalence) = binary_vals slice_vals)
_
#0))))
@@ -203,8 +203,8 @@
0 (not verdict)
_ verdict))))
(_.coverage [/.after]
- (and (# /.equivalence = sample (/.after 0 sample))
- (# /.equivalence = (/.empty 0) (/.after size sample))
+ (and (at /.equivalence = sample (/.after 0 sample))
+ (at /.equivalence = (/.empty 0) (/.after size sample))
(n.= (n.- offset size) (/.size (/.after offset sample)))
(case (list.reversed (..as_list sample))
{.#End}
@@ -217,7 +217,7 @@
(and (case (/.copy! size 0 sample 0 (/.empty size))
{try.#Success output}
(and (not (same? sample output))
- (# /.equivalence = sample output))
+ (at /.equivalence = sample output))
{try.#Failure _}
false)