plt/racket — pull request #588 by shekari (2014-03-15 22:48:16+00:00)
Title: Make tc-l test cases give better error messages.

This change uses cross phase persistent structs to pass information from the code doing the typechecking to the code running the unit tests. Currently there is just the error message, but later we can add things to add to the check info as necessary.

Change in the error messages. Important changes are lack of extraneous noise.
OLD:
--------------------
Typechecker tests > tc-literal tests > 2457 (LITERAL -5)
2457 (LITERAL -5)
FAILURE
name: check-not-exn
location:
pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt:2457:3
params: #
message: "Exception raised"
exception-me"test: failed: (U 1 Byte-Larger-Than-One) != Negative-Fixnum"
exception: #(struct:exn:fail "test: failed: (U 1 Byte-Larger-Than-One) != Negative-Fixnum"
#)
Check failure
--------------------
879 success(es) 1 failure(s) 0 error(s) 880 test(s) run

New:
Typechecker tests > tc-literal tests > 2493 (LITERAL -5)
2493 (LITERAL -5)
FAILURE
location: /typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt:2493:3
(U 1 Byte-Larger-Than-One) != Negative-Fixnum
--------------------
879 success(es) 1 failure(s) 0 error(s) 880 test(s) run

If these look good I'll also switch over the non literal checks.