Skip to content

Commit

Permalink
Fix the field test for bool type (#1480)
Browse files Browse the repository at this point in the history
Just as the title says.

Signed-off-by: Ryan Leung <[email protected]>
  • Loading branch information
rleungx authored Jan 7, 2025
1 parent fe16eb5 commit 32f2ec1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion field_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func TestFieldConstructors(t *testing.T) {
{"Skip", Field{Type: zapcore.SkipType}, Skip()},
{"Binary", Field{Key: "k", Type: zapcore.BinaryType, Interface: []byte("ab12")}, Binary("k", []byte("ab12"))},
{"Bool", Field{Key: "k", Type: zapcore.BoolType, Integer: 1}, Bool("k", true)},
{"Bool", Field{Key: "k", Type: zapcore.BoolType, Integer: 1}, Bool("k", true)},
{"Bool", Field{Key: "k", Type: zapcore.BoolType, Integer: 0}, Bool("k", false)},
{"ByteString", Field{Key: "k", Type: zapcore.ByteStringType, Interface: []byte("ab12")}, ByteString("k", []byte("ab12"))},
{"Complex128", Field{Key: "k", Type: zapcore.Complex128Type, Interface: 1 + 2i}, Complex128("k", 1+2i)},
{"Complex64", Field{Key: "k", Type: zapcore.Complex64Type, Interface: complex64(1 + 2i)}, Complex64("k", 1+2i)},
Expand Down

0 comments on commit 32f2ec1

Please sign in to comment.