diff options
author | EuAndreh <eu@euandre.org> | 2025-01-22 12:44:34 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2025-01-22 12:44:34 -0300 |
commit | bd0fe6afd674bbca7be4ab87e5befd96ed3f5a88 (patch) | |
tree | 7ce6a9845f13a6b47c24b0ffdb22dc5cb1044f24 /tests/fuzz/api/stm.go | |
parent | WIP: Turn cmd/santa-example into functional test (diff) | |
download | stm-bd0fe6afd674bbca7be4ab87e5befd96ed3f5a88.tar.gz stm-bd0fe6afd674bbca7be4ab87e5befd96ed3f5a88.tar.xz |
Setup stub fuzz and benchmark test files
Diffstat (limited to 'tests/fuzz/api/stm.go')
-rw-r--r-- | tests/fuzz/api/stm.go | 34 |
1 files changed, 34 insertions, 0 deletions
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()) +} |