From 5824d2c5b09889c3b0314694c4069c234bd992cf Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 22 Jul 2017 13:59:19 -0400 Subject: - Small refactorings and bug fixes. --- stdlib/test/test/lux/data/coll/dict.lux | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'stdlib/test') diff --git a/stdlib/test/test/lux/data/coll/dict.lux b/stdlib/test/test/lux/data/coll/dict.lux index 7d90e428d..a6934a78b 100644 --- a/stdlib/test/test/lux/data/coll/dict.lux +++ b/stdlib/test/test/lux/data/coll/dict.lux @@ -3,20 +3,20 @@ (lux [io] (control monad [eq]) - (data [text "Text/" Monoid] + (data [text] text/format [number] (coll ["&" dict] - [list "List/" Fold Functor])) - ["R" math/random]) + [list "L/" Fold Functor])) + ["r" math/random]) lux/test) (context: "Dictionaries." - [#let [capped-nat (:: R;Monad map (n.% +100) R;nat)] + [#let [capped-nat (:: r;Monad map (n.% +100) r;nat)] size capped-nat - dict (R;dict number;Hash size R;nat capped-nat) - non-key (|> R;nat (R;filter (function [key] (not (&;contains? key dict))))) - test-val (|> R;nat (R;filter (function [val] (not (list;member? number;Eq (&;values dict) val)))))] + dict (r;dict number;Hash size r;nat capped-nat) + non-key (|> r;nat (r;filter (function [key] (not (&;contains? key dict))))) + test-val (|> r;nat (r;filter (function [val] (not (list;member? number;Eq (&;values dict) val)))))] ($_ seq (test "Size function should correctly represent Dict size." (n.= size (&;size dict))) @@ -27,7 +27,7 @@ (not (&;empty? dict)))) (test "The functions 'entries', 'keys' and 'values' should be synchronized." - (:: (list;Eq (eq;conj number;Eq number;Eq)) = + (:: (list;Eq (eq;seq number;Eq number;Eq)) = (&;entries dict) (list;zip2 (&;keys dict) (&;values dict)))) @@ -96,7 +96,7 @@ (test "If you merge, and the second dict has overlapping keys, it should overwrite yours." (let [dict' (|> dict &;entries - (List/map (function [[k v]] [k (n.inc v)])) + (L/map (function [[k v]] [k (n.inc v)])) (&;from-list number;Hash)) (^open) (&;Eq number;Eq)] (= dict' (&;merge dict' dict)))) -- cgit v1.2.3