[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Python-style doctests in Guile (implemented, please comment)
From: |
Arne Babenhauserheide |
Subject: |
Re: Python-style doctests in Guile (implemented, please comment) |
Date: |
Mon, 31 Jul 2017 19:44:35 +0200 |
Chaos Eternal <address@hidden> writes:
> Great job!
>
> I have a new idea using s-exps to define tests:
> simple way:
> (define-syntax define-examples
> (syntax-rules () ((_ e ...) (quote (e ...)))))
>
> then we can simply (read the-file) then (match e ((define-examples e ...))
> (do-test e))
So you’d write something like the following?
(define (foo)
(define-examples
((foo) 'foo))
'foo)
It has the same limitations as I see for define-with-tests (see my other
answer), do you see advantages over the define-with-tests approach?
Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein
ohne es zu merken
signature.asc
Description: PGP signature