Skip to content
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

Tests should stop using hardcoded values #81

Closed
3esmit opened this issue Dec 2, 2024 · 0 comments · Fixed by #83
Closed

Tests should stop using hardcoded values #81

3esmit opened this issue Dec 2, 2024 · 0 comments · Fixed by #83

Comments

@3esmit
Copy link
Contributor

3esmit commented Dec 2, 2024

All tests use hardcoded values to assert:
e.g.:

totalMaxMP: 202_465_753_424_657_534_240,

A function which calculates the the values should be implemented in the tests, and used everywhere.

The test of validity of calculations should be done separated, so hardcoding values only once.

Advantages:

  • Clean reading of values
  • Stronger assumptions
  • Fuzz tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
1 participant