Hi, simply change to the namespace in question:
in <classpath>/foo/foo.clj: ---8<--- (ns foo) (defn- private-foo-func [x y] (+ x y)) ---8<--- in test-foo.clj: ---8<--- ; Make sure foo namespace is loaded ; correctly before we go on. (require 'foo) (in-ns 'foo) ; Make sure, we don't interfere with ; foo's vars. (require '[clojure.contrib.test-is :as test]) (test/deftest test-private-foo-func (test/is (= (private-foo-func 1 2) 3))) (test/run-tests) ---8<--- In Clojure: ---8<--- user=> (require 'foo) nil user=> (foo/private-foo-func 1 2) java.lang.IllegalStateException: var: #=(var foo/private-foo-func) is not public (NO_SOURCE_FILE:2) user=> (load-file "test-foo.clj") Testing #<Namespace: foo> Ran 1 tests with 1 assertions. 0 failures, 0 exceptions. nil user=> ---8<--- I don't know whether this is the recommended way of doing things, but it works.... Sincerely Meikel --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---
