aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-08-09 10:23:58 +0200
committerDmitry Vyukov <dvyukov@google.com>2017-08-09 10:24:34 +0200
commit0adfdffa8252c911afb71d348cafc5f35e4b3068 (patch)
tree2a045c6d9f356744a803ca313bdaaaf00ffafc72
parentd8b0de2df3c9646b9b4d160f1ea6b678381d23be (diff)
pkg/log: fix tests with -count>0
-rw-r--r--pkg/log/log_test.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/log/log_test.go b/pkg/log/log_test.go
index cb40aceab..3cbbfc655 100644
--- a/pkg/log/log_test.go
+++ b/pkg/log/log_test.go
@@ -7,6 +7,10 @@ import (
"testing"
)
+func init() {
+ EnableLogCaching(4, 20)
+}
+
func TestCaching(t *testing.T) {
tests := []struct{ str, want string }{
{"", ""},
@@ -20,7 +24,6 @@ func TestCaching(t *testing.T) {
{"hhhhhhhh", "ggggggg\nhhhhhhhh\n"},
{"jjjjjjjjjjjjjjjjjjjjjjjjj", "jjjjjjjjjjjjjjjjjjjjjjjjj\n"},
}
- EnableLogCaching(4, 20)
prependTime = false
for _, test := range tests {
Logf(1, test.str)