compat.chibi-test- Running Chibi-scheme test suite
Quite a few srfis come with test suites that’s to be run with Chibi Scheme test framework. This module enables Gauche to run the test code as is.
Run code …, while translating Chibi test framework to Gauche’s.
A typical usage is to write a wrapper that includes the original test code (suppose it’s called test-suite.scm):
(use gauche.test) (test-start "running test-suite.scm") (chibi-test (include "test-suite.scm")) (test-end)
Chibi’s test directives are translated to Gauche’s test directives (see Unit testing, for Gauche’s test framework).
The main thing is that Chibi allows expressions and definitions to
be intermingled within a body, while Gauche only allows all definitions
before expressions within a body.
We expand such body into nested
Chibi test macros (e.g.
test-assert) are defined as local macros
chibi-test expansion, which expand into
Note that we ignore
use forms inside
chibi-test; we might
want to use different modules that work better in Gauche. Necessary
modules need to be
use’d before you call
You may want to check out test/srfi.scm in Gauche source tree for the use case.