A small suggestion:
I used roughly this macro (credit Jonah Kagan) recently to help me write
some tests for parsing code that agnostic to which source position is
generated in the parse:
[(test/match actual expected pred)
(let ([actual-val actual])
(with-check-info* (list (make-check-actual actual-val)
(thunk (check-true (match actual-val
[(test/match actual expected)
(test/match actual expected true)]))
Shriram remarked that he was surprised some sort of check-match wasn't in
rackunit already. Is it worth adding something like this?
I'm doing things like:
(test/match (parse "5 'foo'") (s-block _ (list (s-num _ 5) (s-str _
Where the structs s-block, s-num, and s-str all expect a srcloc as their
first argument, but I don't care about it for these tests.
The actual use is at:
That file would be much, much uglier without this macro.
Racket Developers list: