Hello, I'm having trouble unit testing clojure code. To be sure I'm just testing clojure.test, I'm trying to test clojure.contrib.json.read.
test.clj states: ;; RUNNING TESTS ;; ;; Run tests with the function "(run-tests namespaces...)": (run-tests 'your.namespace 'some.other.namespace) However, this doesn't work: > (run-tests 'clojure.contrib.json.read) nil What does seem to work is this: > (test-ns 'clojure.contrib.json.read) {:test 17, :pass 27, :fail 0, :error 0} However, I need MUCH more verbose output: which functions passed? which ones failed (expected/actual)??? test.clj states this should work perfectly: ;; You can type an "is" expression directly at the REPL, which will ;; print a message if it fails. ;; ;; user> (is (= 5 (+ 2 2))) ;; ;; FAIL in (:1) ;; expected: (= 5 (+ 2 2)) ;; actual: (not (= 5 4)) ;; false but it doesn't work this way at all: > (is (= 5 (+ 2 2))) false Just false? How do I enable the nice report? NOTE: the code above doesn't have any failed functions, but a simple test function I created only did this: (test-ns 'test) {:test 2, :pass 1, :fail 1, :error 0} *missing == FAIL in ... I've also tried test_is.clj but I only ever get 'nil' as a result. I also tried with I'm sure I've missed it. test.clj contains defmethod report ... that has the FAIL println in it. I do not know why it is not getting called. All suggestions are warmly welcomed. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---