public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
* Using the Unit Test Srfi from inside a library definition
@ 2015-03-30  2:39 Jeff Gonis
  2015-03-30  7:06 ` Per Bothner
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Gonis @ 2015-03-30  2:39 UTC (permalink / raw)
  To: kawa

Hi Folks,

So I am working with Kawa 2.0 and I wanted to separate the 
implementation of my tests from the functions that they are testing. I 
am working from a repl in emacs 24.4 on Ubuntu Gnome 14.10.

If I import srfi-64 and create a test in the top-level of a file, 
outside of any library definitions everything works just great.  The 
following code is a minimal example that I have pared down to illustrate
 the difference:

(define (test)
  (test-begin "temp")
  (test-end "temp"))

This will result in the test runner "running" the tests and outputting
to a log file. Great.

However if I try to define my test inside a define-library form I get
the following error message: 
/dev/stdin:79:7: improper list (circular or dotted) is not allowed here

The minimal library example is as follows:
(define-library (testlib)
  (export test-suite)
  (import (scheme base)
             (srfi 64))
  (begin
    (define (test-suite)
      (test-begin "temp")
      (test-end "temp"))))

As far as I can tell, there shouldn't be any difference here, 
except that the test-begin and end are define inside a library. I may 
have missed something incredibly simple though and if so my apologies 
for taking up your time.

Thank you for your time,
Jeff G.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-30  7:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-30  2:39 Using the Unit Test Srfi from inside a library definition Jeff Gonis
2015-03-30  7:06 ` Per Bothner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).