Skip to content

Conversation

@babakks
Copy link

@babakks babakks commented Feb 14, 2025

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.

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]>
@babakks
Copy link
Author

babakks commented Feb 14, 2025

@frankban Can you please review this PR?

Copy link
Owner

@frankban frankban left a 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) {
Copy link
Owner

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?

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.

2 participants