-
-
Notifications
You must be signed in to change notification settings - Fork 35
Treat exceptions thrown by arguments to check as test failures, without changing function behavior #109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
What are the errors
about? |
Good question. I think something's wrong with the Travis configuration but I haven't tried to figure it out. The last two commits to master have the same CI failures, for example: If the rackunit tests pass locally, I'm ok with merging this PR |
The rackunit tests do not pass locally. The I have two ideas for how to fix this, but I'm not sure which one to choose:
|
15bc560
to
5fdd831
Compare
Ok, (a) it is. Tests pass for me. LGTM |
Good to merge? |
I don't totally understand how well this avoids the concerns raised in #107. @AlexKnauth can you explain a little? |
This PR evaluates args to a Example program:
On
but with this PR, RackUnit catches the exception:
checks as functionsUsing
|
Does the exception printing just call And, while we're fixing things in rackunit, can we make something like this be a check failure:
and this be a success?
Robby |
The values variant is addressed in #73, I think. |
@samth Re: the concerns raised in #107 I see one main concern voiced by both @bennn and @rmculpepper:
I believe this PR addresses that by leaving |
…ut changing function behavior
5fdd831
to
4a14901
Compare
Is that enough to address the concerns? |
This looks ok to me. |
Is it okay to merge this weekend if there are no additional concerns raised? |
Sine we "treat exceptions thrown by arguments to check as test failures", and test failures contain "params" clause, it makes sense for the reported message to contain the clause as well. The clause is also useful in itself. Use procedure-rename to avoid names like #<procedure:.../path/to/file.rkt:x:y> which is brittle and especially too sensitive to changes.
Sine we "treat exceptions thrown by arguments to check as test failures", and test failures contain "params" clause, it makes sense for the reported message to contain the clause as well. The clause is also useful in itself. Use procedure-rename to avoid names like #<procedure:.../path/to/file.rkt:x:y> which is brittle and especially too sensitive to changes.
This PR corrects the wrong fix in racket#123. It restores the functionality that racket#109 is meant to implement while correctly reporting test results.
Just like #107, this PR has the goal of catching errors thrown by arguments and turning them into check failures. However unlike #107, this one does not change the behavior of checks when used as function-ids.