summaryrefslogtreecommitdiff
path: root/tests/fuzz/new-v7-from/uuid.go
blob: 8686ebfb2f07fe2daf8a64cff09073f3637e8aaf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package uuid

import (
	"bytes"
	"os"
	"testing"
	"testing/internal/testdeps"
)



func fn(f *testing.F) {
	f.Fuzz(func(t *testing.T, payload []byte, nanosecs uint64) {
		NewV7From(bytes.NewReader(payload), func() uint64 {
			return nanosecs
		})
	})
}



func MainTest() {
	fuzzTargets := []testing.InternalFuzzTarget{
		{ "fn", fn },
	}

	deps := testdeps.TestDeps{}
	tests      := []testing.InternalTest     {}
	benchmarks := []testing.InternalBenchmark{}
	examples   := []testing.InternalExample  {}
	m := testing.MainStart(deps, tests, benchmarks, fuzzTargets, examples)
	os.Exit(m.Run())
}