1
0
mirror of https://github.com/golang/go synced 2024-11-20 03:04:40 -07:00
go/src/testing
Matt T. Proud 0ccabe2e0b testing/quick: generate more map and slice states
This change adds support in testing/quick to generate maps and slices
in additional states:

  (1.) nil maps

  (2.) nil slices

  (3.) empty slice occupancy: `len(s) == 0 && s != nil`

  (4.) partial slice occupancy: `len(s) < cap(s) && s != nil`

  (5.) full slice occupancy: `len(s) == cap(s) && s != nil`

Prior to this, only #5 was ever generated, thereby not sufficiently
exercising all of the fuzzable code path outcomes.

This change depends on https://go-review.googlesource.com/#/c/17499/.

Change-Id: I9343c475cefbd72ffc5237281826465c25872206
Reviewed-on: https://go-review.googlesource.com/16470
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-02-26 20:04:04 +00:00
..
iotest
quick testing/quick: generate more map and slice states 2016-02-26 20:04:04 +00:00
allocs_test.go
allocs.go
benchmark_test.go
benchmark.go testing: document that T and B are safe for concurrent calls 2015-12-01 22:01:26 +00:00
cover.go
example.go testing: make the output of -v more uniform and aligned when using fixed-width fonts 2015-05-08 18:38:25 +00:00
export_test.go
testing_test.go
testing.go testing: move comment inside T.Parallel 2016-01-06 17:59:55 +00:00