aboutsummaryrefslogtreecommitdiff
path: root/src/internal/fuzz/encoding_test.go
diff options
context:
space:
mode:
authorKatie Hockman <katie@golang.org>2021-02-22 13:25:07 -0500
committerKatie Hockman <katie@golang.org>2021-02-22 18:50:34 +0000
commit5aacd47c002c39b481c4c7a0663e851758da372a (patch)
tree0a170937ae576a24cf6d0f6669a48a1d3a935bde /src/internal/fuzz/encoding_test.go
parent73a8c63503b70bf1f0d69cdbcac35cefa8fcef6e (diff)
downloadgo-5aacd47c002c39b481c4c7a0663e851758da372a.tar.xz
[dev.fuzz] internal/fuzz: updating version incoding
Based on feedback from rsc@, update the version encoding to more clearly indicate that this is about fuzzing with Go. Change-Id: Id95dec8283608779b157bf662e7147f9a9c8dba8 Reviewed-on: https://go-review.googlesource.com/c/go/+/295110 Trust: Katie Hockman <katie@golang.org> Run-TryBot: Katie Hockman <katie@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
Diffstat (limited to 'src/internal/fuzz/encoding_test.go')
-rw-r--r--src/internal/fuzz/encoding_test.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/internal/fuzz/encoding_test.go b/src/internal/fuzz/encoding_test.go
index 98d3e21c1f..cbf4999f8d 100644
--- a/src/internal/fuzz/encoding_test.go
+++ b/src/internal/fuzz/encoding_test.go
@@ -19,59 +19,59 @@ func TestUnmarshalMarshal(t *testing.T) {
ok: false, // missing version
},
{
- in: `version 1
+ in: `go test fuzz v1
string("a"bcad")`,
ok: false, // malformed
},
{
- in: `version 1
+ in: `go test fuzz v1
int()`,
ok: false, // empty value
},
{
- in: `version 1
+ in: `go test fuzz v1
uint(-32)`,
ok: false, // invalid negative uint
},
{
- in: `version 1
+ in: `go test fuzz v1
int8(1234456)`,
ok: false, // int8 too large
},
{
- in: `version 1
+ in: `go test fuzz v1
int(20*5)`,
ok: false, // expression in int value
},
{
- in: `version 1
+ in: `go test fuzz v1
int(--5)`,
ok: false, // expression in int value
},
{
- in: `version 1
+ in: `go test fuzz v1
bool(0)`,
ok: false, // malformed bool
},
{
- in: `version 1
+ in: `go test fuzz v1
byte('aa)`,
ok: false, // malformed byte
},
{
- in: `version 1
+ in: `go test fuzz v1
byte('☃')`,
ok: false, // byte out of range
},
{
- in: `version 1
+ in: `go test fuzz v1
string("extra")
[]byte("spacing")
`,
ok: true,
},
{
- in: `version 1
+ in: `go test fuzz v1
int(-23)
int8(-2)
int64(2342425)