Skip to content

Commit 6443667

Browse files
committed
sumdb/tlog: fuzz ParseTilePath
1 parent 774e778 commit 6443667

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

sumdb/tlog/tile_test.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright 2019 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
package tlog
6+
7+
import (
8+
"testing"
9+
)
10+
11+
func FuzzParseTilePath(f *testing.F) {
12+
f.Add("tile/4/0/001")
13+
f.Add("tile/4/0/001.p/5")
14+
f.Add("tile/3/5/x123/x456/078")
15+
f.Add("tile/3/5/x123/x456/078.p/2")
16+
f.Add("tile/1/0/x003/x057/500")
17+
f.Add("tile/3/5/123/456/078")
18+
f.Add("tile/3/-1/123/456/078")
19+
f.Add("tile/1/data/x003/x057/500")
20+
f.Fuzz(func(t *testing.T, path string) {
21+
ParseTilePath(path)
22+
})
23+
}

0 commit comments

Comments
 (0)