summaryrefslogtreecommitdiff
path: root/tests/fuzz/new-v7-from/uuid.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fuzz/new-v7-from/uuid.go')
-rw-r--r--tests/fuzz/new-v7-from/uuid.go33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/fuzz/new-v7-from/uuid.go b/tests/fuzz/new-v7-from/uuid.go
new file mode 100644
index 0000000..8686ebf
--- /dev/null
+++ b/tests/fuzz/new-v7-from/uuid.go
@@ -0,0 +1,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())
+}