From d075bf04cdbba4d9832e2a242805ca049245dfeb Mon Sep 17 00:00:00 2001 From: aoright <102943475+aoright@users.noreply.github.com> Date: Wed, 19 Aug 2026 13:47:09 +0800 Subject: [PATCH] test: add zero boundary assertions to TestSafeInt8 and TestSafeUint16 Signed-off-by: aoright <102943475+aoright@users.noreply.github.com> --- utils_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils_test.go b/utils_test.go index e1f2c332..35e60663 100644 --- a/utils_test.go +++ b/utils_test.go @@ -163,11 +163,13 @@ func TestIsASCII(t *testing.T) { } func TestSafeInt8(t *testing.T) { + assert.Equal(t, int8(0), safeInt8(0)) assert.Equal(t, int8(100), safeInt8(100)) assert.Equal(t, int8(math.MaxInt8), safeInt8(int(math.MaxInt8)+123)) } func TestSafeUint16(t *testing.T) { + assert.Equal(t, uint16(0), safeUint16(0)) assert.Equal(t, uint16(100), safeUint16(100)) assert.Equal(t, uint16(math.MaxUint16), safeUint16(int(math.MaxUint16)+123)) }