summaryrefslogtreecommitdiff
path: root/tests/fuzz
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-10-07 16:45:08 -0300
committerEuAndreh <eu@euandre.org>2024-10-20 05:40:21 -0300
commit34c76cb4d35cdee30cf05af7a6025e52f5132c2c (patch)
treee5053e996040d0f78536375f8df8a6383f6c3717 /tests/fuzz
parentMakefile: Use generic pattern for db artifacts in $(side-assets) (diff)
downloadcracha-34c76cb4d35cdee30cf05af7a6025e52f5132c2c.tar.gz
cracha-34c76cb4d35cdee30cf05af7a6025e52f5132c2c.tar.xz
Initial project version
Diffstat (limited to 'tests/fuzz')
-rw-r--r--tests/fuzz/api/gracha.go35
l---------tests/fuzz/api/main.go1
2 files changed, 36 insertions, 0 deletions
diff --git a/tests/fuzz/api/gracha.go b/tests/fuzz/api/gracha.go
new file mode 100644
index 0000000..6f2981a
--- /dev/null
+++ b/tests/fuzz/api/gracha.go
@@ -0,0 +1,35 @@
+package gracha
+
+import (
+ "os"
+ "testing"
+ "testing/internal/testdeps"
+)
+
+
+
+func api(f *testing.F) {
+ f.Fuzz(func(t *testing.T, n int) {
+ // FIXME
+ if n > 1 {
+ if n < 2 {
+ t.Errorf("Failed n: %v\n", n)
+ }
+ }
+ })
+}
+
+
+
+func MainTest() {
+ fuzzTargets := []testing.InternalFuzzTarget{
+ { "api", api },
+ }
+
+ 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/api/main.go b/tests/fuzz/api/main.go
new file mode 120000
index 0000000..f67563d
--- /dev/null
+++ b/tests/fuzz/api/main.go
@@ -0,0 +1 @@
+../../main.go \ No newline at end of file