Skip to content

Commit 54148b5

Browse files
committed
Add fuzz tests for ParseNote and ParseTree
1 parent b710602 commit 54148b5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

sumdb/tlog/note_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,15 @@ func TestParseRecord(t *testing.T) {
115115
}
116116
}
117117
}
118+
119+
func FuzzParseTree(f *testing.F) {
120+
f.Fuzz(func(t *testing.T, text []byte) {
121+
ParseTree(text)
122+
})
123+
}
124+
125+
func FuzzParseRecord(f *testing.F) {
126+
f.Fuzz(func(t *testing.T, msg []byte) {
127+
ParseRecord(msg)
128+
})
129+
}

0 commit comments

Comments
 (0)