You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- If gas numbers change, include before/after output from the showcase gas report.
55
55
56
+
## Testing doctrine
57
+
58
+
A test is worth keeping if it protects against a plausible future regression that a reviewer could miss. Write a test when at least one is true:
59
+
60
+
1. It explores more of the input space than review will (fuzz/property tests, parameterized ranges).
61
+
2. It pins a singular boundary where arithmetic or bit logic tends to fail (0, 1, max, first invalid value).
62
+
3. It captures a non-local contract (constructor invariants, checked vs unchecked semantics, round-trip relationships).
63
+
4. It documents a user-visible revert condition with non-trivial control flow.
64
+
5. It prevents a known regression or a previously identified review finding.
65
+
6. It serves as executable documentation for a tricky public semantic (one golden test per semantic, not per function).
66
+
67
+
Do not write a test that re-implements the function under test, proves the language works as documented, or duplicates coverage from a stronger fuzz/property test. For one-liners, prefer testing through richer invariants.
68
+
56
69
## Release pipeline
57
70
58
71
Fully automated on push to main (`.github/workflows/release.yml`):
0 commit comments