-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add arithmetic compasion checkers #178
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Babak K. Shandiz <[email protected]>
Signed-off-by: Babak K. Shandiz <[email protected]>
Signed-off-by: Babak K. Shandiz <[email protected]>
Signed-off-by: Babak K. Shandiz <[email protected]>
Signed-off-by: Babak K. Shandiz <[email protected]>
Signed-off-by: Babak K. Shandiz <[email protected]>
Signed-off-by: Babak K. Shandiz <[email protected]>
Signed-off-by: Babak K. Shandiz <[email protected]>
@frankban Can you please review this PR? |
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.
Looks good with a question. Thanks!
} | ||
} | ||
|
||
func TestBinaryArithmeticCheckerValidation(t *testing.T) { |
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.
Do we need all these tests? Isn't one test for the value and one for the reference sufficient? Also, can this be just part of the checker tests?
This PR adds the following checkers:
IsLessThan
IsLessThanOrEqual
IsGreaterThan
IsGreaterThanOrEqual
These new checkers are based on a new generic binary arithmetic operator checker, named
binaryArithmeticChecker
, which converts operands to*big.Float
values for simple comparison.