From ab1795aeb8f00b61c331ac77fdc1011ec14c5253 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Tue, 17 Sep 2024 08:01:05 -0300 Subject: Initial version: first implementation --- tests/fuzz/api-check/main.go | 1 + tests/fuzz/api-check/q.go | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 120000 tests/fuzz/api-check/main.go create mode 100644 tests/fuzz/api-check/q.go (limited to 'tests/fuzz/api-check') diff --git a/tests/fuzz/api-check/main.go b/tests/fuzz/api-check/main.go new file mode 120000 index 0000000..f67563d --- /dev/null +++ b/tests/fuzz/api-check/main.go @@ -0,0 +1 @@ +../../main.go \ No newline at end of file diff --git a/tests/fuzz/api-check/q.go b/tests/fuzz/api-check/q.go new file mode 100644 index 0000000..f8b2ab4 --- /dev/null +++ b/tests/fuzz/api-check/q.go @@ -0,0 +1,35 @@ +package q + +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()) +} -- cgit v1.2.3