Skip to content

Commit 32f2ec1

Browse files
authored
Fix the field test for bool type (#1480)
Just as the title says. Signed-off-by: Ryan Leung <[email protected]>
1 parent fe16eb5 commit 32f2ec1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

field_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func TestFieldConstructors(t *testing.T) {
9898
{"Skip", Field{Type: zapcore.SkipType}, Skip()},
9999
{"Binary", Field{Key: "k", Type: zapcore.BinaryType, Interface: []byte("ab12")}, Binary("k", []byte("ab12"))},
100100
{"Bool", Field{Key: "k", Type: zapcore.BoolType, Integer: 1}, Bool("k", true)},
101-
{"Bool", Field{Key: "k", Type: zapcore.BoolType, Integer: 1}, Bool("k", true)},
101+
{"Bool", Field{Key: "k", Type: zapcore.BoolType, Integer: 0}, Bool("k", false)},
102102
{"ByteString", Field{Key: "k", Type: zapcore.ByteStringType, Interface: []byte("ab12")}, ByteString("k", []byte("ab12"))},
103103
{"Complex128", Field{Key: "k", Type: zapcore.Complex128Type, Interface: 1 + 2i}, Complex128("k", 1+2i)},
104104
{"Complex64", Field{Key: "k", Type: zapcore.Complex64Type, Interface: complex64(1 + 2i)}, Complex64("k", 1+2i)},

0 commit comments

Comments
 (0)