From e5bfb962a793f928bed8bf5628fef92e258356ed Mon Sep 17 00:00:00 2001 From: "Arturo Gonzalez M." Date: Mon, 29 Jul 2024 16:09:17 +1000 Subject: [PATCH] Ensure that the UnmarshalJSON method handles boundary cases and logs detailed debugging information --- pkg/flexint/flexint_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/flexint/flexint_test.go b/pkg/flexint/flexint_test.go index 032f42a..8c708d7 100644 --- a/pkg/flexint/flexint_test.go +++ b/pkg/flexint/flexint_test.go @@ -42,7 +42,11 @@ func TestInt64_UnmarshalJSON(t *testing.T) { assert.Error(t, err) } else { require.NoError(t, err) - assert.Equal(t, tt.expected, fi) + assert.Equal(t, tt.expected, fi, "For input: %s", tt.input) + } + + if tt.expected != fi { + t.Logf("Input: %s, Expected: %d, Got: %d", tt.input, tt.expected, fi) } }) }