diff options
author | Frantisek Sodomka <fsodomka@gmail.com> | 2009-03-20 11:07:10 +0000 |
---|---|---|
committer | Frantisek Sodomka <fsodomka@gmail.com> | 2009-03-20 11:07:10 +0000 |
commit | 3b4bd7bc6e2fbeb9b7ba698b0dfdd8f5719a4481 (patch) | |
tree | e95870f5d284c6d379d0aa153d29d4160ce21e24 /src/clojure/contrib/test_contrib.clj | |
parent | 0a694e70f36ce6986ec8b21846426ff17d3aabc2 (diff) |
test-contrib and datalog tests behave the same as test-clojure
Diffstat (limited to 'src/clojure/contrib/test_contrib.clj')
-rw-r--r-- | src/clojure/contrib/test_contrib.clj | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/clojure/contrib/test_contrib.clj b/src/clojure/contrib/test_contrib.clj index ef9d0b3b..8e35e4b9 100644 --- a/src/clojure/contrib/test_contrib.clj +++ b/src/clojure/contrib/test_contrib.clj @@ -13,15 +13,24 @@ ;; stuart.halloway (gmail) (ns clojure.contrib.test-contrib - (:use clojure.contrib.test-is)) + (:use [clojure.contrib.test-is :only (run-tests)]) + (:gen-class)) -(def tests [:complex-numbers :monads :str-utils :shell-out :test-graph :test-dataflow]) +(def test-names [:complex-numbers :monads :str-utils :shell-out :test-graph :test-dataflow]) -(defn test-name - [test] - (symbol (str "clojure.contrib.test-contrib." (name test)))) +(def test-namespaces + (map #(symbol (str "clojure.contrib.test-contrib." (name %))) + test-names)) -(doseq [test tests] - (require (test-name test))) +(defn run + "Runs all defined tests" + [] + (println "Loading tests...") + (apply require :reload-all test-namespaces) + (apply run-tests test-namespaces)) -(apply run-tests (map test-name tests)) +(defn -main + "Run all defined tests from the command line" + [& args] + (run) + (System/exit 0)) |