-
Notifications
You must be signed in to change notification settings - Fork 483
Restructure certifier test modules; add unit testing capability #7051
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
srcTests :: [ String ] | ||
srcTests = | ||
[ "inc" | ||
-- TODO: This is currently failing to certify. This will be fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ramsay-t is there an issue which tracks this todo?
integrationTests = | ||
testGroup "certifier integration tests" | ||
[ | ||
-- testGroup "example serialisation certification" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ramsay-t is there an issue which tracks this commented out test?
testTrivialSuccess1 :: TestTree | ||
testTrivialSuccess1 = | ||
testSuccess | ||
"Trivial success" | ||
FloatDelay | ||
(mkConstant () (1 :: Integer)) | ||
(mkConstant () (1 :: Integer)) | ||
|
||
testTrivialFailure1 :: TestTree | ||
testTrivialFailure1 = | ||
testFailure | ||
"Trivial failure" | ||
FloatDelay | ||
(mkConstant () (1 :: Integer)) | ||
(mkConstant () (2 :: Integer)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ramsay-t It should be very easy to add unit tests now, similar to these two. You provide two terms and the specific optimisation tag.
If you want to test larger traces, that should also be very easy by just constructing the trace manually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test names - "integration", "simplifier" and "unit" - aren't quite self-explanatory or accurate.
- "Integration" could mean integration with the executable, or integration with the plugin, or others.
- "Integration" and "Unit" are standard terminology in a testing hierarchy, but "Simplifier" isn't
- The "integration" tests also run the simplifier, except via the executable.
- CSE isn't actually part of the simplifier.
Suggested names: "Executable", "Optimizer", "AST".
Good idea @zliu41. Applied your suggestions. |
Fixes https://github.com/IntersectMBO/plutus-private/issues/1501