1
0
mirror of https://github.com/golang/go synced 2024-10-05 18:21:21 -06:00
go/src/encoding
Matt T. Proud 616e45eaa1 encoding/pem: make TestFuzz testing/quick safe
This adapts pem.TestFuzz to sanitize the generated Block fields,
because the encoder and wireformat do not differentiate between nil
and empty slices and maps, while reflect.DeepEqual rightfully does.
In the commit mentioned below, we adapt quick.Value in
testing/quick to generate these value states, which had heretofore
been impossible with the standard library fuzz test facility.

This commit is a piecemeal extraction from ...

  https://go-review.googlesource.com/#/c/16470

..., which rsc requested to be separated from the nil slice and map
generations.

Change-Id: Iec751a2b0082af6e672a09dc9b7f4b4fb309e8a8
Reviewed-on: https://go-review.googlesource.com/17499
Reviewed-by: Russ Cox <rsc@golang.org>
2015-12-08 19:27:20 +00:00
..
ascii85
asn1 encoding/asn1: export tag and class constants 2015-12-03 22:09:09 +00:00
base32
base64 encoding/base64: add package-level example 2015-12-01 23:12:09 +00:00
binary encoding/binary: document that Read returns io.EOF iff zero bytes are read 2015-09-30 22:10:44 +00:00
csv encoding/csv: indicate package of EOF in docs 2015-10-14 00:46:21 +00:00
gob encoding/gob: document behavior of zero-valued arrays, slices, and maps 2015-12-07 20:41:31 +00:00
hex
json encoding/json: document Indent's preservation of trailing spaces 2015-12-08 19:26:26 +00:00
pem encoding/pem: make TestFuzz testing/quick safe 2015-12-08 19:27:20 +00:00
xml encoding/xml: document new chardata tag 2015-12-03 14:47:57 +00:00
encoding.go