-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Future fuzz tests could test round trip properties Change-Id: If195b82998ebedaeca68a7723c2558369e68f716 GitHub-Last-Rev: 6fff4e6 GitHub-Pull-Request: #18 Reviewed-on: https://go-review.googlesource.com/c/mod/+/470155 Run-TryBot: Matthew Hickford <hickford@google.com> Auto-Submit: Bryan Mills <bcmills@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Matthew Hickford <hickford@google.com> Run-TryBot: Bryan Mills <bcmills@google.com>
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright 2019 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package tlog | ||
|
||
import ( | ||
"testing" | ||
) | ||
|
||
// FuzzParseTilePath tests that ParseTilePath never crashes | ||
func FuzzParseTilePath(f *testing.F) { | ||
f.Add("tile/4/0/001") | ||
f.Add("tile/4/0/001.p/5") | ||
f.Add("tile/3/5/x123/x456/078") | ||
f.Add("tile/3/5/x123/x456/078.p/2") | ||
f.Add("tile/1/0/x003/x057/500") | ||
f.Add("tile/3/5/123/456/078") | ||
f.Add("tile/3/-1/123/456/078") | ||
f.Add("tile/1/data/x003/x057/500") | ||
f.Fuzz(func(t *testing.T, path string) { | ||
ParseTilePath(path) | ||
}) | ||
} |