diff options
author | Stuart Sierra <mail@stuartsierra.com> | 2008-12-22 02:41:09 +0000 |
---|---|---|
committer | Stuart Sierra <mail@stuartsierra.com> | 2008-12-22 02:41:09 +0000 |
commit | 934348ca04c6118c4b579da96742cebf12ae3b76 (patch) | |
tree | da961893cdd85133f6d9008ba5088e4b15f1771e /src/clojure/contrib | |
parent | adcc0392208e375b4c9afc83bd431a5fbab9916f (diff) |
test_clojure: fix evaluation.clj so it compiles, add back to test_clojure.clj
* Note:"Collections" at evaluation.clj line 194 fails,
I think because the compiler is optimized to use
ArrayMaps for small maps.
Diffstat (limited to 'src/clojure/contrib')
-rw-r--r-- | src/clojure/contrib/test_clojure.clj | 2 | ||||
-rw-r--r-- | src/clojure/contrib/test_clojure/evaluation.clj | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/clojure/contrib/test_clojure.clj b/src/clojure/contrib/test_clojure.clj index 055a25b0..98d0e7af 100644 --- a/src/clojure/contrib/test_clojure.clj +++ b/src/clojure/contrib/test_clojure.clj @@ -17,7 +17,7 @@ (:use clojure.contrib.test-is)) ; 2008/12/19 SDH temporarily removed evaluation.clj, which isn't passing -(def tests [:for :reader :printer :numbers]) +(def tests [:for :reader :printer :numbers :evaluation]) (defn test-name [test] diff --git a/src/clojure/contrib/test_clojure/evaluation.clj b/src/clojure/contrib/test_clojure/evaluation.clj index e379234e..74da1ed2 100644 --- a/src/clojure/contrib/test_clojure/evaluation.clj +++ b/src/clojure/contrib/test_clojure/evaluation.clj @@ -136,7 +136,7 @@ (test-that "If a symbol is package-qualified, it is an error if there is no Class named by the symbol" - (throws Compiler$CompilerException (eval 'java.lang.FooBar))) + (is (thrown? Compiler$CompilerException (eval 'java.lang.FooBar)))) (test-that "If a symbol is not qualified, the following applies, in this order: @@ -161,12 +161,12 @@ ; First (doall (for [form '(def if do let quote var fn loop recur throw try monitor-enter monitor-exit)] - (throws Compiler$CompilerException (eval form)))) + (is (thrown? Compiler$CompilerException (eval form))))) (let [if "foo"] - (throws Compiler$CompilerException (eval 'if))) + (is (thrown? Compiler$CompilerException (eval 'if))) ; Second - (is (= (eval 'Boolean) (class-for-name "java.lang.Boolean"))) + (is (= (eval 'Boolean) (class-for-name "java.lang.Boolean")))) (let [Boolean "foo"] (is (= (eval 'Boolean) (class-for-name "java.lang.Boolean")))) @@ -175,10 +175,10 @@ ; Fourth (in-test-ns (is (= (eval 'foo) "abc"))) - (throws Compiler$CompilerException (eval 'bar)) ; not in this namespace + (is (thrown? Compiler$CompilerException (eval 'bar))) ; not in this namespace ; Fifth - (throws Compiler$CompilerException (eval 'foobar)))) + (is (thrown? Compiler$CompilerException (eval 'foobar))))) ;;; Metadata tests ;;; |