summaryrefslogtreecommitdiff
path: root/tests/fuzz/new-v4-from/uuid.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fuzz/new-v4-from/uuid.go')
-rw-r--r--tests/fuzz/new-v4-from/uuid.go31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/fuzz/new-v4-from/uuid.go b/tests/fuzz/new-v4-from/uuid.go
new file mode 100644
index 0000000..90cc994
--- /dev/null
+++ b/tests/fuzz/new-v4-from/uuid.go
@@ -0,0 +1,31 @@
+package uuid
+
+import (
+ "bytes"
+ "os"
+ "testing"
+ "testing/internal/testdeps"
+)
+
+
+
+func fn(f *testing.F) {
+ f.Fuzz(func(t *testing.T, payload []byte) {
+ NewV4From(bytes.NewReader(payload))
+ })
+}
+
+
+
+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())
+}