This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Testcases for append! in greg style.


On 24 Mar 2000 11:08:12 -0500, jimb@red-bean.com wrote:
> Have you looked at test-suite/lib.scm?  It's pretty heavily commented.
>
> (test-suite lib) has the following features, that I don't *think* greg
> has:
>
> - the ability to mark independent groups of tests, so that if one
> test hits an error, we don't just abandon the whole file

An error in a Greg test doesn't cause a file to be abandoned and therefore
doesn't need an extra facility to say that tests shouldn't be abandoned -
though you do have the ability to omit a group of tests based on the result of
an earlier test.

> - the ability to group a bunch of tests and specify a common prefix
> to use in their names.  Every test needs to have a distinct name, or
> else you can't figure out what code failed; this is a natural and
> convenient way to help do that.

Greg tells you which test in which file and in which 'tool' (a concept
borrowed from DejaGNU) failed but I can see that additional named groups
within a file might be a useful facility to add if you don't want to use
unique test names within the file.

> - the ability to test whether a piece of code signals an error, not
> simply whether some expression is true or false

Greg handles this for you automatically.

> - a layer between the tests themselves and the code that prints out
> the results ("reporters"), so you could catalog them or record them
> in other ways.  For example, the code at the bottom which prints out
> the total number of passes, fails, etc. isn't a special case wired
> into the PASS and FAIL primitives --- it's just another consumer of
> the data stream that those primitives create.  You can write your
> own.  (test-suite lib) currently provides:
> - "count" reporters, which record total passes, total fails, etc.
> - "log" reporters, which store results in a file in a
> machine-readable syntax
> - "user" reporters, which print results in a human-readable form.

Greg does not have this extra reporting layer - the reporting is built-in.
While it makes no difference from most users point of view almost everyone is
going to want to use standard reporting), I consider this a flaw in Greg
which
should probably be addressed.

> - a reasonable-sized body of Guile tests written in it already.

Nope - lots of tests for other things written using Greg, but not for Guile itsself.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]