summaryrefslogtreecommitdiff
path: root/tests/fuzz/from-string
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/from-string
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/from-string')
-rw-r--r--tests/fuzz/from-string/guuid.go30
l---------tests/fuzz/from-string/main.go1
2 files changed, 31 insertions, 0 deletions
diff --git a/tests/fuzz/from-string/guuid.go b/tests/fuzz/from-string/guuid.go
new file mode 100644
index 0000000..8971cbb
--- /dev/null
+++ b/tests/fuzz/from-string/guuid.go
@@ -0,0 +1,30 @@
+package guuid
+
+import (
+ "os"
+ "testing"
+ "testing/internal/testdeps"
+)
+
+
+
+func fn(f *testing.F) {
+ f.Fuzz(func(t *testing.T, str string) {
+ FromString(str)
+ })
+}
+
+
+
+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())
+}
diff --git a/tests/fuzz/from-string/main.go b/tests/fuzz/from-string/main.go
new file mode 120000
index 0000000..f67563d
--- /dev/null
+++ b/tests/fuzz/from-string/main.go
@@ -0,0 +1 @@
+../../main.go \ No newline at end of file