[WIP] add redex-rackunit-adapter-lib #199
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a new redex library that integrates better with rackunit. It's still very much a WIPthe purpose of this PR 1) get feedback on other ways to integration rackunit, 2) to decide if any of the features here should be moved into redex proper, 3) to decide if this should be added here or as a stand alone package.
The changes this makes are as follows
All test-* forms have been updated to:
test-begin
,test-case
, andtest-suite
.(error-display-handler)
to get a clickable button that will jump to the failed test (this is called indirectly via rackunit).and
In addition the following test forms are added:
test-judgment-does-not-hold
: tests that a judgment does not holdtest--/>
: tests that a term does not reducetest-->>P
: a combination oftest-->>
andtest-predicate
, which testsif all reachable terms hold for some property P
test-->>P*
: liketest-->>P
, but the predicate is give the list of all termsExamples of test failures for new forms:
test-judgment-does-not-hold
test--/>
test-->>P
test-->>P*
A TODO list:
[ ] Write docs
[ ] write tests
[ ] use internal test-judgment-holds that redex uses to improve error messages
[ ] extend test-judgment-holds to have the same interface as redex proper
[ ] extend test-judgment-does-not-hold to have the same interface as redex proper
[ ] extend test--> to have the same interface as redex proper
[ ] extend test-->> to have the same interface as redex proper
[ ] extend test-->>∃ to have the same interface as redex proper
[ ] add test-->>E
[ ] add test-predicate
[ ] add redex-check
[ ] change test-equal to no show the
#:equiv
when non is provided[ ] add
test-->P
andtest-->P*
[ ] update error message to instead of giving stuff like
(#<reduction-relation> 1 #<procedure:natural?>)
, to give(R1 1 natural?)