aboutsummaryrefslogtreecommitdiff
path: root/src/time/time_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/time/time_test.go')
-rw-r--r--src/time/time_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/time/time_test.go b/src/time/time_test.go
index 059c71bb8a..8ab79d3801 100644
--- a/src/time/time_test.go
+++ b/src/time/time_test.go
@@ -1487,6 +1487,13 @@ func BenchmarkISOWeek(b *testing.B) {
}
}
+func BenchmarkGoString(b *testing.B) {
+ t := Now()
+ for i := 0; i < b.N; i++ {
+ _ = t.GoString()
+ }
+}
+
func TestMarshalBinaryZeroTime(t *testing.T) {
t0 := Time{}
enc, err := t0.MarshalBinary()