-
Notifications
You must be signed in to change notification settings - Fork 33
Ghost boolean #46
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
Ghost boolean #46
Conversation
|
Given how simple this is, I would consider writing more generic code that, for each type, returns the default value for the expression. If there is none, it fails with the current exception. |
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.
This looks good! Just change the variables used in the test to make it more consistent with the variable names.
Also, the test should be in the testSuite, and make sure that it is run in CI (you can check if the filename is tested).
| import liquidjava.specification.StateRefinement; | ||
|
|
||
| @Ghost("boolean opened") | ||
| @Ghost("boolean closed") |
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.
is there a reason for having open and closed instead of just using opened and !opened?
If you want to test two different ghost variables do not use opposite ghost variables
| closed = true; | ||
| } | ||
|
|
||
| @StateRefinement(from = "opened(this) && closed(this)") |
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.
related to the one before - it does not make sense to require open and closed at the same time
|
@rodrigomilisse are you still planning on making changes here before we merge? |
|
Also added support for |
Added basic support for boolean ghost variables. Only tested in trivial case