diff options
author | Stuart Halloway <stu@thinkrelevance.com> | 2009-09-28 17:56:31 -0400 |
---|---|---|
committer | Stuart Halloway <stu@thinkrelevance.com> | 2009-09-28 17:56:31 -0400 |
commit | 04a22729691863a5b7e7b1b3c6c1157a02aff3b2 (patch) | |
tree | f546ed7228bb1cb506eb53a510ea98ab11df3182 /src/clojure/contrib | |
parent | 39618b6d881fb0c3b52de4929aa34134bb32ffdb (diff) |
compile str-utils2 and other build fixes, refs #22
Diffstat (limited to 'src/clojure/contrib')
-rw-r--r-- | src/clojure/contrib/apply_macro.clj | 2 | ||||
-rw-r--r-- | src/clojure/contrib/gen_html_docs.clj | 1 | ||||
-rw-r--r-- | src/clojure/contrib/load_all.clj | 35 | ||||
-rw-r--r-- | src/clojure/contrib/math/tests.clj | 18 | ||||
-rw-r--r-- | src/clojure/contrib/test_contrib.clj | 6 |
5 files changed, 15 insertions, 47 deletions
diff --git a/src/clojure/contrib/apply_macro.clj b/src/clojure/contrib/apply_macro.clj index eeb15e9d..19a926d3 100644 --- a/src/clojure/contrib/apply_macro.clj +++ b/src/clojure/contrib/apply_macro.clj @@ -18,7 +18,7 @@ ;; go blind. -(ns apply-macro) +(ns clojure.contrib.apply-macro) ;; Copied from clojure.core/spread, which is private. (defn- spread diff --git a/src/clojure/contrib/gen_html_docs.clj b/src/clojure/contrib/gen_html_docs.clj index 8b043010..364d4279 100644 --- a/src/clojure/contrib/gen_html_docs.clj +++ b/src/clojure/contrib/gen_html_docs.clj @@ -480,7 +480,6 @@ emits the generated HTML to the path named by path." 'clojure.contrib.command-line 'clojure.contrib.complex-numbers 'clojure.contrib.cond - 'clojure.contrib.condt 'clojure.contrib.def 'clojure.contrib.duck-streams 'clojure.contrib.enum diff --git a/src/clojure/contrib/load_all.clj b/src/clojure/contrib/load_all.clj index ff617a36..7a38230a 100644 --- a/src/clojure/contrib/load_all.clj +++ b/src/clojure/contrib/load_all.clj @@ -36,7 +36,6 @@ combinatorics command-line complex-numbers cond -condt def duck-streams error-kit @@ -76,47 +75,15 @@ server-socket set shell-out sql -stacktrace str-utils +str-utils2 stream-utils swing-utils -template -test-is -test-is.tests -test-clojure -test-clojure.agents -test-clojure.atoms -test-clojure.clojure-main -test-clojure.clojure-set -test-clojure.clojure-xml -test-clojure.clojure-zip -test-clojure.compilation -test-clojure.control -test-clojure.data-structures -test-clojure.evaluation -test-clojure.for -test-clojure.java-interop -test-clojure.logic -test-clojure.macros -test-clojure.metadata -test-clojure.multimethods -test-clojure.ns-libs -test-clojure.numbers -test-clojure.other-functions -test-clojure.parallel -test-clojure.predicates -test-clojure.printer -test-clojure.reader -test-clojure.refs -test-clojure.sequences -test-clojure.special -test-clojure.vars test-contrib test-contrib.shell-out test-contrib.str-utils trace types -walk zip-filter ]) diff --git a/src/clojure/contrib/math/tests.clj b/src/clojure/contrib/math/tests.clj index 62816b3f..0d434007 100644 --- a/src/clojure/contrib/math/tests.clj +++ b/src/clojure/contrib/math/tests.clj @@ -3,7 +3,7 @@ clojure.contrib.math))
(deftest test-expt
- (are (= _1 _2)
+ (are [x y] (= x y) (expt 2 3) 8
(expt (expt 2 32) 2) (expt 2 64)
(expt 4/3 2) 16/9
@@ -13,7 +13,7 @@ (expt 5.3 4) (Math/pow 5.3 4)))
(deftest test-abs
- (are (= _1 _2)
+ (are [x y] (= x y) (abs -2) 2
(abs 0) 0
(abs 5) 5
@@ -27,7 +27,7 @@ (abs -2.8) 2.8))
(deftest test-gcd
- (are (= _1 _2)
+ (are [x y] (= x y) (gcd 4 3) 1
(gcd 24 12) 12
(gcd 24 27) 3
@@ -39,7 +39,7 @@ (is (thrown? IllegalArgumentException (gcd 7.0 0))))
(deftest test-lcm
- (are (= _1 _2)
+ (are [x y] (= x y) (lcm 2 3) 6
(lcm 3 2) 6
(lcm -2 3) 6
@@ -54,7 +54,7 @@ (is (thrown? IllegalArgumentException (lcm 7.0 0))))
(deftest test-floor
- (are (= _1 _2)
+ (are [x y] (= x y) (floor 6) 6
(floor -6) -6
(floor 123456789123456789) 123456789123456789
@@ -67,7 +67,7 @@ (floor -4.3) -5.0))
(deftest test-ceil
- (are (= _1 _2)
+ (are [x y] (= x y) (ceil 6) 6
(ceil -6) -6
(ceil 123456789123456789) 123456789123456789
@@ -80,7 +80,7 @@ (ceil -4.3) -4.0))
(deftest test-round
- (are (= _1 _2)
+ (are [x y] (= x y) (round 6) 6
(round -6) -6
(round 123456789123456789) 123456789123456789
@@ -105,14 +105,14 @@ (round -4.5) -4))
(deftest test-sqrt
- (are (= _1 _2)
+ (are [x y] (= x y) (sqrt 9) 3
(sqrt 16/9) 4/3
(sqrt 0.25M) 0.5M
(sqrt 2) (Math/sqrt 2)))
(deftest test-exact-integer-sqrt
- (are (= _1 _2)
+ (are [x y] (= x y) (exact-integer-sqrt 15) [3 6]
(exact-integer-sqrt (inc (expt 2 64))) [(expt 2 32) 1]
(exact-integer-sqrt 1000000000000) [1000000 0]))
diff --git a/src/clojure/contrib/test_contrib.clj b/src/clojure/contrib/test_contrib.clj index e9f58db7..724445e0 100644 --- a/src/clojure/contrib/test_contrib.clj +++ b/src/clojure/contrib/test_contrib.clj @@ -24,8 +24,10 @@ :seq-utils-test]) (def test-namespaces - (map #(symbol (str "clojure.contrib.test-contrib." (name %))) - test-names)) + (concat + ['clojure.contrib.math.tests 'clojure.contrib.core.tests] + (map #(symbol (str "clojure.contrib.test-contrib." (name %))) + test-names))) (defn run "Runs all defined tests" |