]> Cypherpunks repositories - gostls13.git/commit
test/run: make errorcheck tests faster
authorRuss Cox <rsc@golang.org>
Wed, 12 Mar 2014 03:58:24 +0000 (23:58 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 12 Mar 2014 03:58:24 +0000 (23:58 -0400)
commitd5887c5aaca74080c4b167e11559305c7154901c
tree8bf4f585fb7bff6f238f469323f11c2cad3e11cd
parentab844022eeedc6c16d0cdb7fb6fee01dd9e6307a
test/run: make errorcheck tests faster

Some of the errorcheck tests have many many identical regexps.
Use a map to avoid storing the compiled form many many times
in memory. Change the filterRe to a simple string to avoid
the expense of those regexps as well.

Cuts the time for run.go on index2.go by almost 50x.

Noticed during debugging of issue 7344.

LGTM=bradfitz
R=bradfitz, josharian
CC=golang-codereviews
https://golang.org/cl/74380043
test/run.go