rcourtman
|
5bbcc00dec
|
Add unit tests for parseUint64Flexible function
32 test cases covering all code paths:
- nil, uint64, int, int64, float64 type handling
- json.Number parsing (delegates to string branch)
- String parsing: empty, decimal, hex (0x/0X), float notation, scientific
- Negative value handling (returns 0 for numeric types)
- Error cases: invalid strings, unsupported types
|
2025-12-01 09:11:02 +00:00 |
|
rcourtman
|
ae3ffc0355
|
Add unit tests for coerceUint64 and FlexInt.UnmarshalJSON
45 test cases covering:
- FlexInt: integer/float/string parsing, truncation behavior, error cases
- coerceUint64: nil, float64 (including NaN/Inf), int/int32/int64,
uint32/uint64, json.Number, string parsing (whitespace, null, quotes,
commas, scientific notation), unsupported types
Coverage: 20.5% -> 22.6%
|
2025-11-30 02:17:52 +00:00 |
|