]> Cypherpunks repositories - gostls13.git/commit
test/chan: avoid wrap-around in memstats comparison
authorCarl Shapiro <cshapiro@google.com>
Sat, 21 Sep 2013 00:27:56 +0000 (17:27 -0700)
committerCarl Shapiro <cshapiro@google.com>
Sat, 21 Sep 2013 00:27:56 +0000 (17:27 -0700)
commit1c45f98fa38d9600ee1c60c2bfba3c0dced86087
treed101a77797ff8f07230c85c9f1736aac0a24d978
parent0826c04e1454b41dac18365b08b4d59b2a82f543
test/chan: avoid wrap-around in memstats comparison

The select2.go test assumed that the memory allocated between
its two samplings of runtime.ReadMemStats is strictly
increasing.  To avoid failing the tests when this is not true,
a greater-than check is introduced before computing the
difference in allocated memory.

R=golang-dev, r, cshapiro
CC=golang-dev
https://golang.org/cl/13701046
test/chan/select2.go