From 85c4905b3ccb94dfdb2272e92de6ba1051e304e3 Mon Sep 17 00:00:00 2001 From: Stuart Halloway Date: Tue, 23 Jun 2009 23:29:33 -0400 Subject: gtic: updated clojure tests to new template syntax, commented out "all-are" tests --- src/clojure/contrib/test_clojure/logic.clj | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/clojure/contrib/test_clojure/logic.clj') diff --git a/src/clojure/contrib/test_clojure/logic.clj b/src/clojure/contrib/test_clojure/logic.clj index 40a94c37..6c46b711 100644 --- a/src/clojure/contrib/test_clojure/logic.clj +++ b/src/clojure/contrib/test_clojure/logic.clj @@ -17,7 +17,7 @@ (deftest test-if ; true/false/nil - (are (= _1 _2) + (are [x y] (= x y) (if true :t) :t (if true :t :f) :t (if true :t (exception)) :t @@ -31,7 +31,7 @@ (if nil (exception) :f) :f ) ; zero/empty is true - (are (= (if _ :t :f) :t) + (are [x] (= (if x :t :f) :t) (byte 0) (short 0) (int 0) @@ -53,7 +53,7 @@ (into-array []) ) ; anything except nil/false is true - (are (= (if _ :t :f) :t) + (are [x] (= (if x :t :f) :t) (byte 2) (short 2) (int 2) @@ -80,7 +80,7 @@ (deftest test-nil-punning - (are (= (if _1 :no :yes) _2) + (are [x y] (= (if x :no :yes) y) (first []) :yes (next [1]) :yes (rest [1]) :no @@ -111,7 +111,7 @@ (deftest test-and - (are (= _1 _2) + (are [x y] (= x y) (and) true (and true) true (and nil) nil @@ -130,7 +130,7 @@ (deftest test-or - (are (= _1 _2) + (are [x y] (= x y) (or) nil (or true) true (or nil) nil @@ -151,10 +151,10 @@ (deftest test-not (is (thrown? IllegalArgumentException (not))) - (are (= (not _) true) + (are [x] (= (not x) true) nil false ) - (are (= (not _) false) + (are [x] (= (not x) false) true ; numbers -- cgit v1.2.3-18-g5258