File tree 2 files changed +16
-0
lines changed
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -464,6 +464,14 @@ for _, tt := range tests {
464
464
}
465
465
endsnippet
466
466
467
+ # fuzz function
468
+ snippet fuzz " func FuzzXYZ(f *testing.F) { ... }"
469
+ func Fuzz${1: Function } (f *testing.F) {
470
+ f.Fuzz(func(t *testing.T, ${2} ) {
471
+ ${0: ${VISUAL} }
472
+ })
473
+ }
474
+ endsnippet
467
475
468
476
snippet hf " http.HandlerFunc"
469
477
func ${1: handler } (w http.ResponseWriter, r *http.Request) {
Original file line number Diff line number Diff line change @@ -340,6 +340,14 @@ abbr var test = {...}{...} for {t.Run(){...}}
340
340
}
341
341
})
342
342
}
343
+ # fuzz function
344
+ snippet fuzz
345
+ abbr func FuzzXYZ(f *testing.F) { ... }
346
+ func Fuzz${1: Function } (f *testing.F) {
347
+ f.Fuzz(func(t *testing.T, ${2: ff } ) {
348
+ ${0}
349
+ })
350
+ }
343
351
# test server
344
352
snippet tsrv
345
353
abbr ts := httptest.NewServer(...)
You can’t perform that action at this time.
0 commit comments