On 23/02/18 15:13, 'Paulo Matos' via Racket Users wrote:
> That's true, thanks for pointing it out. I only just noticed you could
> generate test-suites and test-cases at runtime with make-testcase and
> make-testsuite. Therefore I will actually be doing this without a macro.
> However, it's always very useful to attempt this macro katas. :)
I will take that back. There is a make-test-suite but not a
make-test-case. Since test-case is syntax, I don't think there's a way
to programmatically create a list of test-cases, put them in a test
suite and later run them.
(define (make-suite n)
(format "Testsuite of ~a tests" n)
(for/list ([i (in-range n)])
(test-case (format "test ~a" i)
(check = i i)))))
(define s (make-suite 100))
But this doesn't actually work. I think I really need to stick to the
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.