]> Cypherpunks repositories - gostls13.git/commit
testing: compile regexp only once
authorRob Pike <r@golang.org>
Wed, 16 Mar 2011 17:32:21 +0000 (10:32 -0700)
committerRob Pike <r@golang.org>
Wed, 16 Mar 2011 17:32:21 +0000 (10:32 -0700)
commitb8e4fbb79c03259545c78974f3422e35497137bb
treebaeef8ab9dab4f5a86ccb08bf64c703aad106594
parentd3c61fc21466103693af76432664942c6661b6e2
testing: compile regexp only once
The -test.run and -test.bench flags were compilng the regexp for ever test
function, which was mucking up memory profiles.   Add a simple wrapper
to save the compiled state so that the regexp is compiled only once for
each flag.

R=rsc
CC=golang-dev
https://golang.org/cl/4274063
src/cmd/gotest/gotest