From 5832eeac9084ec35f72cc5ee4964a2496d31def8 Mon Sep 17 00:00:00 2001 From: Ryan Leung Date: Mon, 6 Jan 2025 16:39:08 +0800 Subject: [PATCH] fix the test of bool type Signed-off-by: Ryan Leung --- field_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/field_test.go b/field_test.go index ee3d5fe5b..e145acf99 100644 --- a/field_test.go +++ b/field_test.go @@ -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)},