diff options
author | EuAndreh <eu@euandre.org> | 2024-11-03 10:15:49 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2024-11-19 19:10:45 -0300 |
commit | 6c4eb1aa31b670d32910d4881b0801eac8265057 (patch) | |
tree | 85fc6f0615fb503317da6782d073fa127bc71e60 /tests/fuzz/generated-parser-check | |
parent | Add byte position to nodes of a syntax tree (diff) | |
download | cotia-6c4eb1aa31b670d32910d4881b0801eac8265057.tar.gz cotia-6c4eb1aa31b670d32910d4881b0801eac8265057.tar.xz |
Setup Makefile project structure with empty src/urubu.go source
Diffstat (limited to 'tests/fuzz/generated-parser-check')
l--------- | tests/fuzz/generated-parser-check/main.go | 1 | ||||
-rw-r--r-- | tests/fuzz/generated-parser-check/urubu.go | 35 |
2 files changed, 36 insertions, 0 deletions
diff --git a/tests/fuzz/generated-parser-check/main.go b/tests/fuzz/generated-parser-check/main.go new file mode 120000 index 0000000..f67563d --- /dev/null +++ b/tests/fuzz/generated-parser-check/main.go @@ -0,0 +1 @@ +../../main.go
\ No newline at end of file diff --git a/tests/fuzz/generated-parser-check/urubu.go b/tests/fuzz/generated-parser-check/urubu.go new file mode 100644 index 0000000..7ba1c2f --- /dev/null +++ b/tests/fuzz/generated-parser-check/urubu.go @@ -0,0 +1,35 @@ +package urubu + +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()) +} |