This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Using the Unit Test Srfi from inside a library definition
- From: Jeff Gonis <jeffgonis at fastmail dot com>
- To: kawa at sourceware dot org
- Date: Sun, 29 Mar 2015 20:39:42 -0600
- Subject: Using the Unit Test Srfi from inside a library definition
- Authentication-results: sourceware.org; auth=none
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.