From 7c53a09d0ba1e443dd60dfdc4b8d8b134fcd120c Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 9 Jul 2018 23:01:12 -0400 Subject: - Fixes: Part 2. --- stdlib/test/test/lux/math/modular.lux | 2 +- stdlib/test/test/lux/type/implicit.lux | 4 +++- stdlib/test/test/lux/world/blob.lux | 12 ++++++------ 3 files changed, 10 insertions(+), 8 deletions(-) (limited to 'stdlib/test') diff --git a/stdlib/test/test/lux/math/modular.lux b/stdlib/test/test/lux/math/modular.lux index 7102e684d..dcfdb4e11 100644 --- a/stdlib/test/test/lux/math/modular.lux +++ b/stdlib/test/test/lux/math/modular.lux @@ -11,7 +11,7 @@ lux/test) (def: %3 (/.modulus 3)) -(type: Mod3 (~ (type-of %3))) +(`` (type: Mod3 (~~ (type-of %3)))) (def: modulusR (r.Random Int) diff --git a/stdlib/test/test/lux/type/implicit.lux b/stdlib/test/test/lux/type/implicit.lux index 33c0bd6c5..30f20b073 100644 --- a/stdlib/test/test/lux/type/implicit.lux +++ b/stdlib/test/test/lux/type/implicit.lux @@ -1,7 +1,9 @@ (.module: lux (lux [io] - (control [monad #+ do Monad]) + (control [equivalence] + [functor] + [monad #+ do Monad]) (data [number] [bool "bool/" Equivalence] (coll [list])) diff --git a/stdlib/test/test/lux/world/blob.lux b/stdlib/test/test/lux/world/blob.lux index 8e69e4176..908a4050f 100644 --- a/stdlib/test/test/lux/world/blob.lux +++ b/stdlib/test/test/lux/world/blob.lux @@ -28,7 +28,7 @@ (if (n/< size idx) (do r.Monad [byte r.nat] - (exec (e.assume (/.write-8 idx byte output)) + (exec (e.assume (/.write/8 idx byte output)) (recur (inc idx)))) (:: r.Monad wrap output))))) @@ -59,18 +59,18 @@ (test "Can get size of blob." (|> random-blob /.size (n/= blob-size))) (test "Can read/write 8-bit values." - (bits-io +1 /.read-8 /.write-8 value)) + (bits-io +1 /.read/8 /.write/8 value)) (test "Can read/write 16-bit values." - (bits-io +2 /.read-16 /.write-16 value)) + (bits-io +2 /.read/16 /.write/16 value)) (test "Can read/write 32-bit values." - (bits-io +4 /.read-32 /.write-32 value)) + (bits-io +4 /.read/32 /.write/32 value)) (test "Can read/write 64-bit values." - (bits-io +8 /.read-64 /.write-64 value)) + (bits-io +8 /.read/64 /.write/64 value)) (test "Can slice blobs." (let [slice-size (|> to (n/- from) inc) random-slice (e.assume (/.slice from to random-blob)) idxs (list.n/range +0 (dec slice-size)) - reader (function (_ blob idx) (/.read-8 idx blob))] + reader (function (_ blob idx) (/.read/8 idx blob))] (and (n/= slice-size (/.size random-slice)) (case [(monad.map e.Monad (reader random-slice) idxs) (monad.map e.Monad (|>> (n/+ from) (reader random-blob)) idxs)] -- cgit v1.2.3