|
21 | 21 | package zap
|
22 | 22 |
|
23 | 23 | import (
|
| 24 | + "math" |
24 | 25 | "net"
|
25 | 26 | "sync"
|
26 | 27 | "testing"
|
@@ -107,6 +108,10 @@ func TestFieldConstructors(t *testing.T) {
|
107 | 108 | {"String", Field{Key: "k", Type: zapcore.StringType, String: "foo"}, String("k", "foo")},
|
108 | 109 | {"Time", Field{Key: "k", Type: zapcore.TimeType, Integer: 0, Interface: time.UTC}, Time("k", time.Unix(0, 0).In(time.UTC))},
|
109 | 110 | {"Time", Field{Key: "k", Type: zapcore.TimeType, Integer: 1000, Interface: time.UTC}, Time("k", time.Unix(0, 1000).In(time.UTC))},
|
| 111 | + {"Time", Field{Key: "k", Type: zapcore.TimeType, Integer: math.MinInt64, Interface: time.UTC}, Time("k", time.Unix(0, math.MinInt64).In(time.UTC))}, |
| 112 | + {"Time", Field{Key: "k", Type: zapcore.TimeType, Integer: math.MaxInt64, Interface: time.UTC}, Time("k", time.Unix(0, math.MaxInt64).In(time.UTC))}, |
| 113 | + {"Time", Field{Key: "k", Type: zapcore.TimeFullType, Interface: time.Time{}}, Time("k", time.Time{})}, |
| 114 | + {"Time", Field{Key: "k", Type: zapcore.TimeFullType, Interface: time.Unix(math.MaxInt64, 0)}, Time("k", time.Unix(math.MaxInt64, 0))}, |
110 | 115 | {"Uint", Field{Key: "k", Type: zapcore.Uint64Type, Integer: 1}, Uint("k", 1)},
|
111 | 116 | {"Uint64", Field{Key: "k", Type: zapcore.Uint64Type, Integer: 1}, Uint64("k", 1)},
|
112 | 117 | {"Uint32", Field{Key: "k", Type: zapcore.Uint32Type, Integer: 1}, Uint32("k", 1)},
|
|
0 commit comments