Created
January 5, 2016 10:13
-
-
Save dgryski/660e9bfaffe0150fbf0a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package foo | |
import ( | |
"io/ioutil" | |
"path/filepath" | |
"testing" | |
) | |
func TestFuzzCorpus(t *testing.T) { | |
corpus, err := filepath.Glob("workdir/corpus") | |
if err != nil { | |
t.Errorf("unable to glob: %v", err) | |
} | |
for _, f := range corpus { | |
data, err := ioutil.ReadFile(corpusFile) | |
if err != nil { | |
t.Errorf("error opening %s: %v", corpusFile, err) | |
continue | |
} | |
Fuzz(data) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment