plt/racket — pull request #171 by jpolitz (2012-11-20 06:31:20+00:00)
Title: check-match for rackunit

Thread

http://www.mail-archive.com/dev@racket-lang.org/msg07427.html

Files

check.rkt:
Added the actual check-match macro.

test.rkt:
Just a provide statement

check-test.rkt:
7 additional tests for check-match, and a macro to help create tests for it

check.scrbl:
Documentation and examples for check-match

Notes

1. I tested with

> raco test collects/tests/rackunit

It prints out a lot of stuff because there are existing tests hardcoded to fail in there. But, I wrote seven tests and it claims that 127 tests (rather than 120 before) succeed now, so that seems promising.

2. I don't know how to get the use of @racket[match] in the docs to link over to the actual match page. I'm a Scribble noob.

3. I'm also a syntaxy-macros noob, it might be possible to get the useful error information through check-match itself in a more appropriate/less crappy way.