generated from saxbophone/CPP20-Cross-Platform-Template
-
Notifications
You must be signed in to change notification settings - Fork 1
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
"Big calculations" sanity-tests #89
Labels
testing
Related to unit tests
Comments
We better choose our choices of calculations real carefully here, with exponentiation we are likely to run afoul of some limit somewhere for the maximum literal length, as these things reach thousands of digits very very quickly... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently most thorough arithmetic testing relies upon randomly-generated inputs. This is fine for thorough and varied coverage, however gigantic values (that exceed
uintmax_t
on test system) are not used.I'd like to write some additional separate unit tests that use the custom literals to test certain hardcoded sums on huge numbers, something like exponentiation would be a good idea, but most arithmetic operations should be tested in this way. An online calculator offering full precision in its results should be used to generate the expected return values —something like Wolfram Alpha wouldn't be a bad choice.
The text was updated successfully, but these errors were encountered: