aboutsummaryrefslogtreecommitdiff
path: root/stdlib/test
diff options
context:
space:
mode:
authorEduardo Julian2017-01-04 19:23:27 -0400
committerEduardo Julian2017-01-04 19:23:27 -0400
commitdf88c658e85f072679085b16a95120ab5cdfc078 (patch)
tree3189529180690b6073149bc58fab0d6cbb2ea75e /stdlib/test
parentcc5f798e1ab7e636d38a6f85c30c146ca7963b07 (diff)
- Updated the documentation of most modules left.
- Minor refactorings.
Diffstat (limited to 'stdlib/test')
-rw-r--r--stdlib/test/test/lux/concurrency/actor.lux2
-rw-r--r--stdlib/test/test/lux/data/struct/queue.lux18
2 files changed, 10 insertions, 10 deletions
diff --git a/stdlib/test/test/lux/concurrency/actor.lux b/stdlib/test/test/lux/concurrency/actor.lux
index abf8828d7..7136ab30d 100644
--- a/stdlib/test/test/lux/concurrency/actor.lux
+++ b/stdlib/test/test/lux/concurrency/actor.lux
@@ -27,7 +27,7 @@
(wrap [])))
(test: "Actors"
- (let [counter-proc (: (&;Proc Int (Promise Int))
+ (let [counter-proc (: (&;Behavior Int (Promise Int))
[(lambda [self output state]
(let [state' (i.inc state)]
(exec (io;run (promise;resolve state' output))
diff --git a/stdlib/test/test/lux/data/struct/queue.lux b/stdlib/test/test/lux/data/struct/queue.lux
index 98379e30a..095d066f6 100644
--- a/stdlib/test/test/lux/data/struct/queue.lux
+++ b/stdlib/test/test/lux/data/struct/queue.lux
@@ -17,7 +17,7 @@
[size (:: @ map (n.% +100) R;nat)
sample (R;queue size R;nat)
non-member (|> R;nat
- (R;filter (. not (&;enqueued? number;Eq<Nat> sample))))]
+ (R;filter (. not (&;member? number;Eq<Nat> sample))))]
($_ seq
(assert "I can query the size of a queue (and empty queues have size 0)."
(if (n.= +0 size)
@@ -25,10 +25,10 @@
(n.= size (&;size sample))))
(assert "Enqueueing and dequeing affects the size of queues."
- (and (n.= (n.inc size) (&;size (&;enqueue non-member sample)))
+ (and (n.= (n.inc size) (&;size (&;push non-member sample)))
(or (&;empty? sample)
- (n.= (n.dec size) (&;size (&;dequeue sample))))
- (n.= size (&;size (&;dequeue (&;enqueue non-member sample))))))
+ (n.= (n.dec size) (&;size (&;pop sample))))
+ (n.= size (&;size (&;pop (&;push non-member sample))))))
(assert "Transforming to/from list can't change the queue."
(let [(^open "&/") (&;Eq<Queue> number;Eq<Nat>)]
@@ -42,14 +42,14 @@
(#;Some _) true))
(assert "I can query whether an element belongs to a queue."
- (and (not (&;enqueued? number;Eq<Nat> sample non-member))
- (&;enqueued? number;Eq<Nat> (&;enqueue non-member sample)
- non-member)
+ (and (not (&;member? number;Eq<Nat> sample non-member))
+ (&;member? number;Eq<Nat> (&;push non-member sample)
+ non-member)
(case (&;peek sample)
#;None
(&;empty? sample)
(#;Some first)
- (and (&;enqueued? number;Eq<Nat> sample first)
- (not (&;enqueued? number;Eq<Nat> (&;dequeue sample) first))))))
+ (and (&;member? number;Eq<Nat> sample first)
+ (not (&;member? number;Eq<Nat> (&;pop sample) first))))))
))