]> Cypherpunks repositories - gostls13.git/commit
image: avoid sharing test images between tests and benchmarks
authorIan Davis <nospam@iandavis.com>
Tue, 25 Sep 2018 14:33:49 +0000 (15:33 +0100)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 25 Sep 2018 16:07:59 +0000 (16:07 +0000)
commit36a3d4f3fea7bbb22be061fbe830420990cd3ecf
tree8d38b5263c529b590c11c804bfd227dd01892d08
parentb84a58095f11ba3122b88847d1b0a73c57c1632c
image: avoid sharing test images between tests and benchmarks

CL 136796 introduced benchmarks and refactored tests to use a
common list of test images. The tests now fail when run with
count > 2 since they rely on a fresh image each run.

Fix this by changing the list of test images to a list of test
image generator functions.

Change-Id: I5884c6bccba5e29bf84ee546fa501bc258379f42
Reviewed-on: https://go-review.googlesource.com/137295
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/image/image_test.go