summaryrefslogtreecommitdiff
path: root/tests/fuzz
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fuzz')
l---------tests/fuzz/new-v4-from/main.go (renamed from tests/fuzz/new-from/main.go)0
-rw-r--r--tests/fuzz/new-v4-from/uuid.go (renamed from tests/fuzz/new-from/uuid.go)2
l---------tests/fuzz/new-v7-from/main.go1
-rw-r--r--tests/fuzz/new-v7-from/uuid.go33
4 files changed, 35 insertions, 1 deletions
diff --git a/tests/fuzz/new-from/main.go b/tests/fuzz/new-v4-from/main.go
index f67563d..f67563d 120000
--- a/tests/fuzz/new-from/main.go
+++ b/tests/fuzz/new-v4-from/main.go
diff --git a/tests/fuzz/new-from/uuid.go b/tests/fuzz/new-v4-from/uuid.go
index 298687b..90cc994 100644
--- a/tests/fuzz/new-from/uuid.go
+++ b/tests/fuzz/new-v4-from/uuid.go
@@ -11,7 +11,7 @@ import (
func fn(f *testing.F) {
f.Fuzz(func(t *testing.T, payload []byte) {
- NewFrom(bytes.NewReader(payload))
+ NewV4From(bytes.NewReader(payload))
})
}
diff --git a/tests/fuzz/new-v7-from/main.go b/tests/fuzz/new-v7-from/main.go
new file mode 120000
index 0000000..f67563d
--- /dev/null
+++ b/tests/fuzz/new-v7-from/main.go
@@ -0,0 +1 @@
+../../main.go \ No newline at end of file
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())
+}