summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Burwell <ben@benburwell.com>2019-09-20 17:05:13 -0400
committerBen Burwell <ben@benburwell.com>2019-09-20 17:05:13 -0400
commit0c0fce30d964b9de5d44ea2841dd44c81f75c5dc (patch)
treeca06256204d77edc8458957ac00b77da88bceddc
parente1f8ea2a889494859a61a9259110e40c70002d55 (diff)
fuzz -> custom
-rw-r--r--custom_test.go (renamed from fuzz_test.go)20
1 files changed, 10 insertions, 10 deletions
diff --git a/fuzz_test.go b/custom_test.go
index 71fdcb1..a8bdfe6 100644
--- a/fuzz_test.go
+++ b/custom_test.go
@@ -10,29 +10,29 @@ import (
)
var (
- runFuzz bool
- fuzzInput string
+ runCustom bool
+ customCases string
)
func TestMain(m *testing.M) {
- flag.BoolVar(&runFuzz, "fuzz", false, "run the fuzz tests")
- flag.StringVar(&fuzzInput, "fuzz.input", "", "input file for fuzz test")
+ flag.BoolVar(&runCustom, "custom", false, "run custom tests")
+ flag.StringVar(&customCases, "custom.cases", "", "input file for custom test cases")
flag.Parse()
os.Exit(m.Run())
}
-func TestFuzz(t *testing.T) {
- if !runFuzz {
- t.Skip("skipping fuzz test")
+func TestCustom(t *testing.T) {
+ if !runCustom {
+ t.Skip("skipping custom testing")
}
- f, err := os.Open(fuzzInput)
+ f, err := os.Open(customCases)
if err != nil {
- t.Fatalf("could not open fuzz input: %v", err)
+ t.Fatalf("could not open custom test input: %v", err)
}
defer f.Close()
data, err := ioutil.ReadAll(f)
if err != nil {
- t.Fatalf("could not read fuzz input: %v", err)
+ t.Fatalf("could not read custom test input: %v", err)
}
buf := bytes.NewBuffer(data)
for {