summaryrefslogtreecommitdiff
path: root/tests/fuzz/new-from/guuid.go
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-10-19 18:11:33 -0300
committerEuAndreh <eu@euandre.org>2024-10-20 03:27:09 -0300
commit149d33fa6adb9be835d1c1404346d82124dda454 (patch)
treed9c12a2d10ef32098cfb4485801446501797d0c4 /tests/fuzz/new-from/guuid.go
parentsrc/guuid.go: Remove NewBytes() (diff)
downloaduuid-149d33fa6adb9be835d1c1404346d82124dda454.tar.gz
uuid-149d33fa6adb9be835d1c1404346d82124dda454.tar.xz
Setup conventional functional tests, fuzz targets and benchmarks
Diffstat (limited to 'tests/fuzz/new-from/guuid.go')
-rw-r--r--tests/fuzz/new-from/guuid.go31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/fuzz/new-from/guuid.go b/tests/fuzz/new-from/guuid.go
new file mode 100644
index 0000000..a786c66
--- /dev/null
+++ b/tests/fuzz/new-from/guuid.go
@@ -0,0 +1,31 @@
+package guuid
+
+import (
+ "bytes"
+ "os"
+ "testing"
+ "testing/internal/testdeps"
+)
+
+
+
+func fn(f *testing.F) {
+ f.Fuzz(func(t *testing.T, payload []byte) {
+ NewFrom(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())
+}