mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-09 13:33:39 +00:00
testing: support b.SetBytes(); implement sub-benchmarks.
This commit is contained in:
@@ -48,3 +48,8 @@ func TestBenchmark(t *testing.T) {
|
||||
t.Errorf("Expected speedup >= 0.3, got %f", speedup)
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkSub(b *testing.B) {
|
||||
b.Run("Fast", func(b *testing.B) { BenchmarkFastNonASCII(b) })
|
||||
b.Run("Slow", func(b *testing.B) { BenchmarkSlowNonASCII(b) })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user