diff options
author | Stuart Halloway <stu@thinkrelevance.com> | 2009-06-23 23:29:33 -0400 |
---|---|---|
committer | Stuart Halloway <stu@thinkrelevance.com> | 2009-06-23 23:29:33 -0400 |
commit | 85c4905b3ccb94dfdb2272e92de6ba1051e304e3 (patch) | |
tree | e4760e28748b1ad88786cb5dab8a8941944ee095 /src/clojure/contrib/test_clojure/logic.clj | |
parent | 6ad3cf6dc28f738ba06ada5824e2be05559ea0f9 (diff) |
gtic: updated clojure tests to new template syntax, commented out
"all-are" tests
Diffstat (limited to 'src/clojure/contrib/test_clojure/logic.clj')
-rw-r--r-- | src/clojure/contrib/test_clojure/logic.clj | 16 |
1 files changed, 8 insertions, 8 deletions
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 |