]> Cypherpunks repositories - gostls13.git/commit
testing: implement 'Unordered Output' in Examples.
authorBrady Catherman <brady@gmail.com>
Fri, 5 Feb 2016 21:16:31 +0000 (14:16 -0700)
committerAndrew Gerrand <adg@golang.org>
Wed, 9 Mar 2016 04:34:41 +0000 (04:34 +0000)
commit9323de3da79d240b8223f74bd8ddd0d55dab8070
tree4b08ed7e11eaaff51fec3f262dbbdaf6b3969cdc
parenta9c48f3b031c2dc3a3a0aa47987137e1fdf76024
testing: implement 'Unordered Output' in Examples.

Adds a type of output to Examples that allows tests to have unordered
output. This is intended to help clarify when the output of a command
will produce a fixed return, but that return might not be in an constant
order.

Examples where this is useful would be documenting the rand.Perm()
call, or perhaps the (os.File).Readdir(), both of which can not guarantee
order, but can guarantee the elements of the output.

Fixes #10149

Change-Id: Iaf0cf1580b686afebd79718ed67ea744f5ed9fc5
Reviewed-on: https://go-review.googlesource.com/19280
Reviewed-by: Andrew Gerrand <adg@golang.org>
src/cmd/go/alldocs.go
src/cmd/go/test.go
src/go/doc/example.go
src/math/rand/example_test.go
src/testing/example.go