-
Notifications
You must be signed in to change notification settings - Fork 451
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
feat: test_extern command #2970
Conversation
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.
Very neat
|
I think this should be using a Also this is equally useful for |
Two improvements [suggested](#2970 (comment)) by @digama0 after the initial PR was merged. * Allow testing `implemented_by` attributes as well. * Use `DecidableEq` rather than `BEq` for stricter testing.
This adds a
test_extern
command.Usage:
This:
@[extern]
attribute.t == t'
, wheret
is the term provided, andt'
is the reference implementation (specifically,t
with the head symbol unfolded).true
, and complains if this fails.Note that the type of the term must have a
BEq
instance for this to work: there's a self-explanatory error message if it isn't available.