testing: --run now allows filtering of subtests

Also fix typo in error message in sub_test.go from upstream,
and move a few members from B to common where they belonged.

Note that testdata/testing.go seems to be pushing the edge of what
the emulated cortex-m3 target can handle; using regexp in that test
causes it to fail on that target with an out of memory error.

TODO: once tinygo supports runtime.Goexit, consider just using upstream's testing directory...
This commit is contained in:
Dan Kegel
2022-01-16 20:04:34 -08:00
committed by Ron Evans
parent 610a20c4d5
commit dd6adcacb6
5 changed files with 117 additions and 56 deletions
-3
View File
@@ -77,9 +77,6 @@ type InternalBenchmark struct {
// affecting benchmark results.
type B struct {
common
hasSub bool // TODO: should be in common, and atomic
start time.Time // TODO: should be in common
duration time.Duration // TODO: should be in common
context *benchContext
N int
benchFunc func(b *B)