Email list hosting service & mailing list manager

Scheme portable testing prior art Lassi Kortela (20 Aug 2020 19:00 UTC)
Re: Scheme portable testing prior art Marc Nieper-Wißkirchen (20 Aug 2020 19:09 UTC)
Re: Scheme portable testing prior art Lassi Kortela (20 Aug 2020 19:17 UTC)
Re: Scheme portable testing prior art Marc Nieper-Wißkirchen (20 Aug 2020 19:31 UTC)
Re: Scheme portable testing prior art Per Bothner (20 Aug 2020 20:58 UTC)
Re: Scheme portable testing prior art Per Bothner (20 Aug 2020 21:13 UTC)
Re: Scheme portable testing prior art Alex Shinn (21 Aug 2020 01:54 UTC)
Re: Scheme portable testing prior art Marc Nieper-Wißkirchen (21 Aug 2020 07:52 UTC)
Re: Scheme portable testing prior art Alex Shinn (21 Aug 2020 09:16 UTC)
Re: Scheme portable testing prior art Marc Nieper-Wißkirchen (21 Aug 2020 11:11 UTC)
Re: Scheme portable testing prior art Alex Shinn (21 Aug 2020 13:41 UTC)
Re: Scheme portable testing prior art John Cowan (20 Aug 2020 19:25 UTC)
Re: Scheme portable testing prior art Lassi Kortela (20 Aug 2020 19:39 UTC)
Re: Scheme portable testing prior art Marc Nieper-Wißkirchen (20 Aug 2020 20:04 UTC)
test-error, portability Lassi Kortela (20 Aug 2020 20:41 UTC)
Re: test-error, portability Marc Nieper-Wißkirchen (21 Aug 2020 06:49 UTC)
Re: test-error, portability Per Bothner (21 Aug 2020 13:21 UTC)
Re: test-error, portability Arthur A. Gleckler (21 Aug 2020 18:24 UTC)
Re: test-error, portability John Cowan (21 Aug 2020 21:54 UTC)
Re: test-error, portability Alex Shinn (22 Aug 2020 15:13 UTC)
Re: test-error, portability hga@xxxxxx (23 Aug 2020 21:24 UTC)
Re: test-error, portability John Cowan (23 Aug 2020 21:44 UTC)
Re: test-error, portability Marc Nieper-Wißkirchen (26 Aug 2020 13:45 UTC)
Re: test-error, portability Marc Nieper-Wißkirchen (26 Aug 2020 13:43 UTC)
Re: Scheme portable testing prior art John Cowan (20 Aug 2020 22:05 UTC)
Re: Scheme portable testing prior art Marc Nieper-Wißkirchen (20 Aug 2020 19:56 UTC)
Re: Scheme portable testing prior art Arthur A. Gleckler (20 Aug 2020 22:27 UTC)
Comments on Arthur's test framework Lassi Kortela (22 Aug 2020 08:56 UTC)
Re: Comments on Arthur's test framework Arthur A. Gleckler (22 Aug 2020 21:28 UTC)
Re: Comments on Arthur's test framework John Cowan (22 Aug 2020 22:34 UTC)
Re: Comments on Arthur's test framework Per Bothner (22 Aug 2020 23:45 UTC)
Re: Comments on Arthur's test framework Arthur A. Gleckler (23 Aug 2020 00:21 UTC)
Re: Comments on Arthur's test framework Per Bothner (23 Aug 2020 00:40 UTC)
Re: Comments on Arthur's test framework Arthur A. Gleckler (23 Aug 2020 01:52 UTC)
Re: Scheme portable testing prior art Alex Shinn (27 Aug 2020 05:04 UTC)
Re: Scheme portable testing prior art hga@xxxxxx (21 Aug 2020 16:52 UTC)

test-error, portability Lassi Kortela 20 Aug 2020 20:41 UTC

> Unfortunately, there are some incompatibilities: "test-error" has a
> different interface;

You're right :-/ I missed that incompatibility.

(test-error <expression>) works in all.

(test-error <name> <expression>) works in Chibi/Chicken.

(test-error <name> #t <expression>) is the equivalent in SRFI 64, the #t
is required.

#t is the anything-goes value for error type.

IMHO it would be best for portable tests if an error type filter can be
given, and one possibility is to give a predicate procedure. For example:

(test-error file-error? (open-file "/nonexistent"))

And with a test name:

(test-error "Check file not found" file-error? (open-file "/nonexistent"))

This matches SRFI 64 usage. It's good to encourage testing for
particular error types, instead of any error whatsoever (#t could still
be preserved for this case). Scheme doesn't have as fully developed
exception classification as some other languages, but we're slowly
working on that.

Chicken/Chibi test doesn't support a 3-argument form of test-error at
all. So we could make that the portable one.

> SRFI 64 has "test-equal", Chibi/Chicken has "test".

Yes. Usually means the same thing, but `test` respects the
`current-test-comparator` parameter I think.

> But it's true that the Chibi/Chicken interface can be easily mapped on
> a part of the SRFI 64 interface. So I think it makes sense to provide
> a small library implementing Chibi/Chicken's interface on top of SRFI
> 64. This way, test suites using the Chibi/Chicken interface and test
> suites using the SRFI 64 interface can be run uniformly on one
> implementation-provided SRFI 64 test runner (which is adaptable for
> the more sophisticated tests through the SRFI 64 interface but not
> through Chibi/Chicken interface).

+1. Almost any test definition framework that everyone agrees to use
will probably be a decent one. Test suites are the things we find in
other people's codebases so what really matters is to unify them.

Test runners are more complex and more personal, almost like an emacs vs
vi debate.

Users can still port any test runner to any Scheme implementation, so it
doesn't matter that much if the same runner doesn't come with all
implementations -- can be installed as an extra package. But the test
definitions will cause a lot of headaches if test cases can't easily be
read, fixed, and copied from project to project.