-
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 under 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
53c5c82
commit 22a1de8
Showing
2 changed files
with
841 additions
and
5 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
Oops, something went wrong.