diff options
Diffstat (limited to 'src/clojure/contrib/datalog/tests/test.clj')
-rw-r--r-- | src/clojure/contrib/datalog/tests/test.clj | 46 |
1 files changed, 27 insertions, 19 deletions
diff --git a/src/clojure/contrib/datalog/tests/test.clj b/src/clojure/contrib/datalog/tests/test.clj index 101ce098..c649e6b2 100644 --- a/src/clojure/contrib/datalog/tests/test.clj +++ b/src/clojure/contrib/datalog/tests/test.clj @@ -13,25 +13,33 @@ ;; straszheimjeffrey (gmail) ;; Created 11 Feburary 2009 -(ns clojure.contrib.datalog.tests.test.clj - (:use clojure.contrib.test-is)) - -(def tests [:test-util - :test-database - :test-literals - :test-rules - :test-magic - :test-softstrat]) - -(defn test-name - [test] - (symbol (str "clojure.contrib.datalog.tests." (name test)))) - -(doseq [test tests] - (require (test-name test))) - -(apply run-tests (map test-name tests)) - +(ns clojure.contrib.datalog.tests.test + (:use [clojure.contrib.test-is :only (run-tests)]) + (:gen-class)) + +(def test-names [:test-util + :test-database + :test-literals + :test-rules + :test-magic + :test-softstrat]) + +(def test-namespaces + (map #(symbol (str "clojure.contrib.datalog.tests." (name %))) + test-names)) + +(defn run + "Runs all defined tests" + [] + (println "Loading tests...") + (apply require :reload-all test-namespaces) + (apply run-tests test-namespaces)) + +(defn -main + "Run all defined tests from the command line" + [& args] + (run) + (System/exit 0)) ;; End of file |