Skip to content

Commit

Permalink
Ensure that the UnmarshalJSON method handles boundary cases and logs …
Browse files Browse the repository at this point in the history
…detailed debugging information
  • Loading branch information
arturogonzalezm committed Jul 29, 2024
1 parent 2ec60c2 commit e5bfb96
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/flexint/flexint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
})
}
Expand Down

0 comments on commit e5bfb96

Please sign in to comment.