From bd0fe6afd674bbca7be4ab87e5befd96ed3f5a88 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 22 Jan 2025 12:44:34 -0300 Subject: Setup stub fuzz and benchmark test files --- tests/fuzz/api/main.go | 1 + tests/fuzz/api/stm.go | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 120000 tests/fuzz/api/main.go create mode 100644 tests/fuzz/api/stm.go (limited to 'tests/fuzz/api') 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 diff --git a/tests/fuzz/api/stm.go b/tests/fuzz/api/stm.go new file mode 100644 index 0000000..70b585c --- /dev/null +++ b/tests/fuzz/api/stm.go @@ -0,0 +1,34 @@ +package stm + +import ( + "os" + "testing" + "testing/internal/testdeps" +) + + + +func api(f *testing.F) { + f.Fuzz(func(t *testing.T, n int) { + 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