From 02f78b1ff29982bea8c93fe6252593ba3942f38b Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 12 Dec 2016 22:33:22 -0400 Subject: - Renamed "==" function to "is". --- stdlib/test/test/lux.lux | 10 +++++----- stdlib/test/test/lux/data/ident.lux | 4 ++-- stdlib/test/test/lux/data/number.lux | 9 ++++----- stdlib/test/test/lux/data/struct/array.lux | 6 +++--- stdlib/test/test/lux/data/struct/stack.lux | 4 ++-- stdlib/test/test/lux/data/struct/vector.lux | 2 +- stdlib/test/test/lux/data/struct/zipper.lux | 30 ++++++++++++++--------------- 7 files changed, 32 insertions(+), 33 deletions(-) (limited to 'stdlib/test') diff --git a/stdlib/test/test/lux.lux b/stdlib/test/test/lux.lux index a9f638c73..24954fa2f 100644 --- a/stdlib/test/test/lux.lux +++ b/stdlib/test/test/lux.lux @@ -20,11 +20,11 @@ y (R;text size)] ($_ seq (assert "Every value is identical to itself, and the 'id' function doesn't change values in any way." - (and (== x x) - (== x (id x)))) + (and (is x x) + (is x (id x)))) (assert "Values created separately can't be identical." - (not (== x y))) + (not (is x y))) )) (do-template [category rand-gen inc dec even? odd? = < >] @@ -165,9 +165,9 @@ false))) (assert "Can have defaults for Maybe values." - (and (== "yolo" (default "yolo" + (and (is "yolo" (default "yolo" #;None)) - (== "lol" (default "yolo" + (is "lol" (default "yolo" (#;Some "lol"))))) )) diff --git a/stdlib/test/test/lux/data/ident.lux b/stdlib/test/test/lux/data/ident.lux index e0c066f04..6c435686f 100644 --- a/stdlib/test/test/lux/data/ident.lux +++ b/stdlib/test/test/lux/data/ident.lux @@ -30,8 +30,8 @@ (^open "&/") &;Codec]] ($_ seq (assert "Can get the module & name parts of an ident." - (and (== module1 (&;module ident1)) - (== name1 (&;name ident1)))) + (and (is module1 (&;module ident1)) + (is name1 (&;name ident1)))) (assert "Can compare idents for equality." (and (&/= ident1 ident1) diff --git a/stdlib/test/test/lux/data/number.lux b/stdlib/test/test/lux/data/number.lux index d5b74888b..5b9adcf98 100644 --- a/stdlib/test/test/lux/data/number.lux +++ b/stdlib/test/test/lux/data/number.lux @@ -116,13 +116,12 @@ (:: = x x') (#;Left _) - (exec (log! (format (%n x) " == " (:: encode x))) - false)))))] + false))))] ["Nat" R;nat Number Codec] - ## ["Int" R;int Number Codec] - ## ["Real" R;real Number Codec] - ## ["Frac" R;frac Number Codec] + ["Int" R;int Number Codec] + ["Real" R;real Number Codec] + ["Frac" R;frac Number Codec] ) (do-template [ ] diff --git a/stdlib/test/test/lux/data/struct/array.lux b/stdlib/test/test/lux/data/struct/array.lux index 6decd910f..1b81ecf47 100644 --- a/stdlib/test/test/lux/data/struct/array.lux +++ b/stdlib/test/test/lux/data/struct/array.lux @@ -32,11 +32,11 @@ (n.= size (&;size original))) (assert "Cloning an array should yield and identical array, but not the same one." (and (:: (&;Eq number;Eq) = original clone) - (not (== original clone)))) + (not (is original clone)))) (assert "Full-range manual copies should give the same result as cloning." (exec (&;copy size +0 original +0 copy) (and (:: (&;Eq number;Eq) = original copy) - (not (== original copy))))) + (not (is original copy))))) (assert "Array folding should go over all values." (exec (:: &;Fold fold (lambda [x idx] @@ -104,7 +104,7 @@ (assert "Functor shouldn't alter original array." (let [copy (map id array)] (and (= array copy) - (not (== array copy))))) + (not (is array copy))))) (assert "Functor should go over all available array elements." (let [there (map n.inc array) back-again (map n.dec there)] diff --git a/stdlib/test/test/lux/data/struct/stack.lux b/stdlib/test/test/lux/data/struct/stack.lux index 427c5c04d..375c19b4b 100644 --- a/stdlib/test/test/lux/data/struct/stack.lux +++ b/stdlib/test/test/lux/data/struct/stack.lux @@ -40,9 +40,9 @@ )) (assert "Pushing onto a stack always increases it by 1, adding a new value at the top." - (and (== sample + (and (is sample (&;pop (&;push new-top sample))) (n.= (n.inc (&;size sample)) (&;size (&;push new-top sample))) (|> (&;push new-top sample) &;peek (default (undefined)) - (== new-top)))) + (is new-top)))) )) diff --git a/stdlib/test/test/lux/data/struct/vector.lux b/stdlib/test/test/lux/data/struct/vector.lux index fe1350ce0..76e4f7580 100644 --- a/stdlib/test/test/lux/data/struct/vector.lux +++ b/stdlib/test/test/lux/data/struct/vector.lux @@ -43,7 +43,7 @@ (&;put idx non-member) (&;at idx) (default (undefined)) - (== non-member))) + (is non-member))) (assert "Can update elements of vectors." (|> sample diff --git a/stdlib/test/test/lux/data/struct/zipper.lux b/stdlib/test/test/lux/data/struct/zipper.lux index 6e1a168c2..a1045f44f 100644 --- a/stdlib/test/test/lux/data/struct/zipper.lux +++ b/stdlib/test/test/lux/data/struct/zipper.lux @@ -55,9 +55,9 @@ (if (&;branch? zipper) (let [child (|> zipper &;down)] (and (not (Tree/= sample (&;to-tree child))) - (|> child &;parent (default (undefined)) (== zipper)) - (|> child &;up (== zipper)) - (|> child &;root (== zipper)))) + (|> child &;parent (default (undefined)) (is zipper)) + (|> child &;up (is zipper)) + (|> child &;root (is zipper)))) (and (&;leaf? zipper) (|> zipper (&;prepend-child new-val) &;branch?))))) @@ -68,12 +68,12 @@ zipper (|> zipper (&;prepend-child pre-val) (&;append-child post-val))] - (and (|> zipper &;down &;value (== pre-val)) - (|> zipper &;down &;right &;value (== mid-val)) - (|> zipper &;down &;right &;right &;value (== post-val)) - (|> zipper &;down &;rightmost &;leftmost &;value (== pre-val)) - (|> zipper &;down &;right &;left &;value (== mid-val)) - (|> zipper &;down &;rightmost &;value (== post-val)))) + (and (|> zipper &;down &;value (is pre-val)) + (|> zipper &;down &;right &;value (is mid-val)) + (|> zipper &;down &;right &;right &;value (is post-val)) + (|> zipper &;down &;rightmost &;leftmost &;value (is pre-val)) + (|> zipper &;down &;right &;left &;value (is mid-val)) + (|> zipper &;down &;rightmost &;value (is post-val)))) true))) (assert "Can insert children around a node (unless it's root)." @@ -87,12 +87,12 @@ (&;insert-right post-val) (default (undefined)) &;up)] - (and (|> zipper &;down &;value (== pre-val)) - (|> zipper &;down &;right &;value (== mid-val)) - (|> zipper &;down &;right &;right &;value (== post-val)) - (|> zipper &;down &;rightmost &;leftmost &;value (== pre-val)) - (|> zipper &;down &;right &;left &;value (== mid-val)) - (|> zipper &;down &;rightmost &;value (== post-val)))) + (and (|> zipper &;down &;value (is pre-val)) + (|> zipper &;down &;right &;value (is mid-val)) + (|> zipper &;down &;right &;right &;value (is post-val)) + (|> zipper &;down &;rightmost &;leftmost &;value (is pre-val)) + (|> zipper &;down &;right &;left &;value (is mid-val)) + (|> zipper &;down &;rightmost &;value (is post-val)))) (and (|> zipper (&;insert-left pre-val) (case> (#;Some _) false #;None true)) (|> zipper (&;insert-right post-val) (case> (#;Some _) false -- cgit v1.2.3