diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/clojure/contrib/test_clojure/data_structures.clj | 3 | ||||
-rw-r--r-- | test/clojure/contrib/test_clojure/test_utils.clj | 39 |
2 files changed, 19 insertions, 23 deletions
diff --git a/test/clojure/contrib/test_clojure/data_structures.clj b/test/clojure/contrib/test_clojure/data_structures.clj index 7ca8f4e6..8faa7680 100644 --- a/test/clojure/contrib/test_clojure/data_structures.clj +++ b/test/clojure/contrib/test_clojure/data_structures.clj @@ -8,8 +8,7 @@ ;; (ns clojure.contrib.test-clojure.data-structures - (:use clojure.contrib.test-is - [clojure.contrib.test-clojure.test-utils :only (all-are)])) + (:use clojure.contrib.test-is)) ;; *** Helper functions *** diff --git a/test/clojure/contrib/test_clojure/test_utils.clj b/test/clojure/contrib/test_clojure/test_utils.clj index fc858f2d..25ba6bd9 100644 --- a/test/clojure/contrib/test_clojure/test_utils.clj +++ b/test/clojure/contrib/test_clojure/test_utils.clj @@ -6,28 +6,25 @@ ;; terms of this license. You must not remove this notice, or any other, ;; from this software. -(ns clojure.contrib.test-clojure.test-utils - (:use [clojure.contrib.combinatorics :only (combinations)])) +(ns clojure.contrib.test-clojure.test-utils) - -(defn exception - "Use this function to ensure that execution of a program doesn't + (defn exception + "Use this function to ensure that execution of a program doesn't reach certain point." - [] - (throw (new Exception "Exception which should never occur"))) - + [] + (throw (new Exception "Exception which should never occur"))) -(defmacro all-are - "Test all-with-all. - (all-are (= _1 _2) - a b c) - => - (do - (is (= a b)) - (is (= a c)) - (is (= b c)))" - [expr & args] - (concat - (list 'clojure.contrib.template/do-template (list 'clojure.contrib.test-is/is expr)) - (apply concat (combinations args 2)))) +;; (defmacro all-are +;; "Test all-with-all. +;; (all-are (= _1 _2) +;; a b c) +;; => +;; (do +;; (is (= a b)) +;; (is (= a c)) +;; (is (= b c)))" +;; [expr & args] +;; (concat +;; (list 'clojure.contrib.template/do-template (list 'clojure.contrib.test-is/is expr)) +;; (apply concat (combinations args 2))))) |