Go theorytheory 0/50 · 0%
Toolchain · hard

46. Testing Advanced: fakes, golden files, fuzzing

Confidence beyond unit tests.

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.

Check your understanding

  1. 1. Native Go fuzz functions are named…

  2. 2. Fakes are easiest when code depends on…