Re: defrecord issue in unit tests

2010-08-31 Thread garf
--Doh!
Thanks, David, that worked

On Aug 30, 8:29 am, David Nolen dnolen.li...@gmail.com wrote:
 On Mon, Aug 30, 2010 at 6:37 AM, garf gary.overg...@gmail.com wrote:
  I am getting the following error when I switched from defstruct to
  defrecord
  **Unable to resolve classname: Rule-record (RecordInitTest.clj:8)**
  I only have this problem when definition  usage is split between two
  files, i.e.

 defrecord creates a Java class, you need to import it.

 David

-- 
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


defrecord issue in unit tests

2010-08-30 Thread garf
I am getting the following error when I switched from defstruct to
defrecord
**Unable to resolve classname: Rule-record (RecordInitTest.clj:8)**
I only have this problem when definition  usage is split between two
files, i.e.
let first file contain:
  (ns RecordInitQuest)

  (defrecord Rule-record
  [ rname rule-seq   ])

and second file that gives the error above when using unit tests
  (ns RecordInitTest)

  (use 'clojure.test)
  (use 'RecordInitQuest)

 (deftest ruleform-def-test
   (def rule1 (Rule-record.
   rule-name
   more text)))
--if I am just in the REPL and enter this, there is no problem, but in
my real files  real unit test file, it gives the error mesage above.
Mostly I have been using Eclipse, but if I try a similar setup in
eMacs, then I get a similar error:
Unknown location:
  error: java.io.FileNotFoundException: Could not locate
RuleForm2__init.class or RuleForm2.clj on classpath:
--which is strange because it is all in the same directory
-thanks in advance for any insights

-- 
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