Mercurial > lasercutter
diff src/clojure/contrib/test_contrib/datalog/tests/test.clj @ 10:ef7dbbd6452c
added clojure source goodness
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 21 Aug 2010 06:25:44 -0400 |
parents | |
children |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/clojure/contrib/test_contrib/datalog/tests/test.clj Sat Aug 21 06:25:44 2010 -0400 1.3 @@ -0,0 +1,45 @@ 1.4 +;; Copyright (c) Jeffrey Straszheim. All rights reserved. The use and 1.5 +;; distribution terms for this software are covered by the Eclipse Public 1.6 +;; License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which can 1.7 +;; be found in the file epl-v10.html at the root of this distribution. By 1.8 +;; using this software in any fashion, you are agreeing to be bound by the 1.9 +;; terms of this license. You must not remove this notice, or any other, 1.10 +;; from this software. 1.11 +;; 1.12 +;; test.clj 1.13 +;; 1.14 +;; A Clojure implementation of Datalog -- Tests 1.15 +;; 1.16 +;; straszheimjeffrey (gmail) 1.17 +;; Created 11 Feburary 2009 1.18 + 1.19 +(ns clojure.contrib.datalog.tests.test 1.20 + (:use [clojure.test :only (run-tests)]) 1.21 + (:gen-class)) 1.22 + 1.23 +(def test-names [:test-util 1.24 + :test-database 1.25 + :test-literals 1.26 + :test-rules 1.27 + :test-magic 1.28 + :test-softstrat]) 1.29 + 1.30 +(def test-namespaces 1.31 + (map #(symbol (str "clojure.contrib.datalog.tests." (name %))) 1.32 + test-names)) 1.33 + 1.34 +(defn run 1.35 + "Runs all defined tests" 1.36 + [] 1.37 + (println "Loading tests...") 1.38 + (apply require :reload-all test-namespaces) 1.39 + (apply run-tests test-namespaces)) 1.40 + 1.41 +(defn -main 1.42 + "Run all defined tests from the command line" 1.43 + [& args] 1.44 + (run) 1.45 + (System/exit 0)) 1.46 + 1.47 + 1.48 +;; End of file