define-check: only add location if not already on stack#87
define-check: only add location if not already on stack#87bennn merged 2 commits intoracket:masterfrom
Conversation
|
The PR & issues about I'm thinking, as a general rule, the |
|
Many of my tests failed to report the right source location, due to a change that occurred between 6.10 and 6.11. This pr fixes my issue. |
|
I think this is the right thing to do and think you've got the right rule here:
I likely won't have time to review this (or do anything else with RackUnit) this week or weekend but I'm planning on getting to it by the end of the month. If before then you'd like to make a PR that makes all "automatic" check infos added by |
b9115bd to
7dc7c61
Compare
|
I changed the docs (and code) to say that
|
|
Updated,
|
Change all the basic checks to only add info if not already present Implemented with a new API function: with-default-check-info*
Change
define-checkto only add a location for the check if thecurrent-check-infostack does not have a location on it.(I think this is what
check-trueand others used to do. I'm not sure if they did the same for other check-info items too.)With this PR,
this program fails with a good error message:
Without this PR,
the above program needs to be rewritten something like this to get a good error message:
In case we'd rather close this PR without merging, I looked in the main distribution for uses of
with-check-infothat updated the location. The only ones I found were in therackunit-abbrevsandtyped-racket-testcollections. I can change those to do thecall/updated-locationdance.