scsh-users
[Top] [All Lists]

Re: Modules

To: RT Happe <rthappe@mathematik.uni-freiburg.de>
Subject: Re: Modules
From: pax! <pax@dedalo.ws>
Date: Mon, 9 Dec 2002 02:32:21 +0100
Cc: <scsh-news@zurich.ai.mit.edu>
>>>>> "RT" == RT Happe <rthappe@mathematik.uni-freiburg.de> writes:

 RT> On Sun, 8 Dec 2002, stktrc wrote:
 >> But would it be possible to dynamically instantiate test cases?
 >> 
 >> For example, in Java you could have a test interface.  The main
 >> program would then instantiate a class implementing the test
 >> interface from each file in a file system directory (I believe
 >> this falls under reflection).  This way the specific test cases
 >> are not hard-wired into the main program.
 >> 

That's more or less what I'm trying to do. I wanted to define tests as
separate structures then search and load them dinamycally when the
test process start. I don't want to add new tests by hand to the
config file each time I define them, but having this process
automagically done.

 RT> Well, I think you can open or define structures directly from
 RT> code, if you import the bindings of DEFINE-STRUCTURE etc.  I
 RT> never needed to do so myself and therefore cannot give detailed
 RT> instructions, but Richard Kelsey's post in scsh.net > docu >
 RT> how-to addresses related issues, cf.
 RT> http://www.scsh.net/post/evamules.html

I've done this as part of my self-study on s48 modules. It works fine
if you open the defpackage structure and define a new structure inside
the code. But I doesn't work if you load other files wich have
structures defined inside them, because the new file can't see the
define-structure macro.

 RT> However, I doubt that modules make for good testing fixtures.  At
 RT> least, these would require a much finer granularity than the
 RT> modules in the scsh system have.  And I believe there are more

Well, I think it depends if you want blackbox or whitebox style
tests. I believe that modules have the proper granularity for blackbox
style tests.

 RT> straightforward implementations by classical schemely means.  I
 RT> would have a look at the existing Scheme unit testing frameworks
 RT> and steal suitable ideas, or port a good one to Scheme 48 / Scsh.
 RT> (Indeed, I planned to do so myself ... next year.)

In fact in have *cough* inpired *cough* myself in a testing framework
written in scheme for guile, called greg. If someone can point me to
another testing framework in scheme, I'll be pleased to study it. I
can't wait to next year, need it _now_ :)

Saludos

-- 
+-----------------
| Francisco Vides Fernández <pvides@dedalo.ws>
| Director técnico.
| Teléfono fijo:   952 60 29 59
| Teléfono móvil:  661 67 32 73
| Fax:             952 60 29 59
| Dédalo Ingenieros http://www.dedalo.ws/
| PGP: http://pgp.rediris.es:11371/pks/lookup?op=index&search=0x605ecbab
+------



<Prev in Thread] Current Thread [Next in Thread>