Hi Greg,
Thank you for the very detailed explanation. I was also very much not
my intention to belittle racket-mode and I will evoke my "yes indeed my
knowledge was quite incomplete." I have learned many very useful things
from this thread (C-u C-c C-c is a reminder that stopping by the manual
> Are you using emacs racket-mode? I have experience this issue only in that
> mode since it does not (to my knowledge) implement all the error anchoring
> features of DrRacket.
It might just be that you have DrRacket set to user a higher
errortrace level than racket-mode?
That is, in DrR, Lang
> If you want your tests to catch exceptions you need to wrap them in
> exception handlers, which you could write a macro to do for you; as Eric
> noted though you need to be careful to preserve source locations.
>
This gave me an idea, so I've been reading *rackunit* docs finally. I'm
about
I'll also throw my hat in the ring with handy/test-more, which I'm in the
process of breaking out into a separate module but have not yet found the
tuits to finish.
It takes a different approach than rackunit: Tests always have output
regardless of whether they succeed or fail. Running a differe
If you want your tests to catch exceptions you need to wrap them in
exception handlers, which you could write a macro to do for you; as Eric
noted though you need to be careful to preserve source locations.
These kinds of issues (error messages and managing source locations when
using macros) l
> #lang racket/base
> (define f (λ _ (error 'FAIL)))
> (module+ test
> (require rackunit)
> (define OK (string->unreadable-symbol "OK"))
> (define-syntax-rule (check-OK-form expr)
> (let ([val expr])
> (with-check-info (['input 'expr] ['expected OK] ['actual val])
> (check
>
> > Are you using emacs racket-mode?
>
> I am, almost exclusively. Exception and check failure locations can be a
> pain, but they work in general.
>
What Eric said :) But when in doubt I always compare behavior with DrRacket
and raco, and racket-mode stands tall here and does at least what
On Tue, Apr 2, 2019 at 1:04 PM Tom Gillespie wrote:
>
> Are you using emacs racket-mode?
I am, almost exclusively. Exception and check failure locations can be a
pain, but they work in general.
> On Tue, Apr 2, 2019 at 3:41 PM zeRusski wrote:
>>
>> If I have many test chunks spread around my co
Are you using emacs racket-mode? I have experience this issue only in that
mode since it does not (to my knowledge) implement all the error anchoring
features of DrRacket. If you run in DrRacket the errors and contract
violations should be highlighted as in the screengrab below. Best,
Tom
On Tue,
I am a big fan of having tests alongside code so (module+ test ...) is
magic. The only annoyance I've been running into lately is error reporting.
If I have many test chunks spread around my code and some code change
throws an exception or a contract violation it is impossible to tell which
tes
10 matches
Mail list logo