-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apd: add property based testing to assert that BigInt == big.Int
This commit uses Golang's `testing/quick` package to exercise each of the methods in the shared `BigInt` and `big.Int` interface and assert that each implementation behaves identically for all inputs. This testing caught a few minor issues around graceful handling of nil receivers in unused methods. I confirmed that it would have been able to find a more serious correctness issue with `BigInt.Sign` that I did not catch until attempting to integrate the library with CockroachDB.
- Loading branch information
1 parent
cad88a2
commit e91e9ce
Showing
3 changed files
with
849 additions
and
10 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.