-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: fixed original minus underflow test (#2472)
Motivated by AztecProtocol/barretenberg#669. This PR updates the safe_uint tests, and adds more documentation to the tests as well as the subtract and operator- class methods. In more detail: - it fixes TestMinusOperatorUnderflowFails (now named TestMinusUnderflowGeneral1) to check for a failing constraint through `EXPECT_FALSE(composer.check_circuit())` instead of executing without checking anything. - it adds new tests to test edge cases and different failure branches where overflow/underflow occur in the operator+, operator*, subtract(), and operator- methods. - it adds detailed comments to the subtract() and operator- functions, and the corresponding tests. - it moves the subtract, operator-, divide, and operator/ implementations from the header file to the source file. --------- Co-authored-by: maramihali <[email protected]>
- Loading branch information
1 parent
0327b54
commit 0cf4bdc
Showing
3 changed files
with
330 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.