Depend on small interfaces so fakes replace network and database calls. Golden files capture expected output for encoders. Go 1.18+ supports native fuzzing with FuzzXxx functions, valuable for decoders parsing untrusted chain data.
← Go theorytheory 0/50 · 0%
Toolchain · hard
46. Testing Advanced: fakes, golden files, fuzzing
Confidence beyond unit tests.
Check your understanding
1. Native Go fuzz functions are named…
2. Fakes are easiest when code depends on…