Details
-
Type:
Defect
-
Status:
Closed
-
Resolution: Duplicate
-
Affects Version/s: None
-
Fix Version/s: Backlog
-
Component/s: None
-
Labels:None
Description
When instance? is called from two separate namespaces to test an instance of a user defined type, one of them fails
In the attached project, the following (identical) tests run correctly:
lein test instance-test.test.core
lein test instance-test.test.core2
but this fails:
lein test
For ease of reference, the attached project contains the following:
(ns instance-test.core)
(deftype MyType [a])
(defn make-my-type
[]
(MyType. nil))
(ns instance-test.test.core
(:use [instance-test.core] :reload-all)
(:use [clojure.test])
(:import instance-test.core.MyType))
(deftest test1
(is (instance? instance-test.core.MyType (make-my-type))))
(ns instance-test.test.core2
(:use [instance-test.core] :reload-all)
(:use [clojure.test])
(:import instance-test.core.MyType))
(deftest test1
(is (instance? instance-test.core.MyType (make-my-type))))
Converted from http://www.assembla.com/spaces/clojure/tickets/424
Attachments:
instance-test.tar.gz - https://www.assembla.com/spaces/clojure/documents/dZGCvGPH4r37YjeJe5cbCb/download/dZGCvGPH4r37YjeJe5cbCb