Skip to content

feat: add the Errata test framework - #956

Open
david-christiansen wants to merge 5 commits into
mainfrom
test-framework-1
Open

feat: add the Errata test framework#956
david-christiansen wants to merge 5 commits into
mainfrom
test-framework-1

Conversation

@david-christiansen

Copy link
Copy Markdown
Collaborator

Errata is a test framework, designed to be something we can extract to its own repo after we get some experience with it here (so it can be used e.g. in verso-slides and lean-sqlite).

In Errata, tests are marked by the @[test] attribute. Their docstring and source range are saved for failure reporting. The value of a test can have any type with an IsTest instance. Some machinery in the Lakefile enumerates all tests, providing them to the runner.

Elaboration-time tests can also be implemented using #test_msgs and #test_guard, which are versions of #guard_msgs and #guard that run the compile-time test but save the result as a test case for reporting together with the rest of the tests.

Errata also supports saving JUnit XML, which various GitHub actions can conveniently display for us.

Errata is a test framework, designed to be something we can extract to its own
repo after we get some experience with it here (so it can be used e.g. in
verso-slides and lean-sqlite).

In Errata, tests are marked by the `@[test]` attribute. Their docstring and
source range are saved for failure reporting. The value of a test can have any
type with an `IsTest` instance. Some machinery in the Lakefile enumerates all
tests, providing them to the runner.

Elaboration-time tests can also be implemented using `#test_msgs` and
`#test_guard`, which are versions of `#guard_msgs` and `#guard` that run the
compile-time test but save the result as a test case for reporting together
with the rest of the tests.

Errata also supports saving JUnit XML, which various GitHub actions can
conveniently display for us.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant