Verifies: SYS-REQ-059 [boundary] ParseInt one beyond int64 range shall return OverflowIntegerError.
(t *testing.T)
| 529 | // Verifies: SYS-REQ-059 [boundary] |
| 530 | // ParseInt one beyond int64 range shall return OverflowIntegerError. |
| 531 | func TestParseIntOverflowBoundary(t *testing.T) { |
| 532 | // max + 1: 9223372036854775808 |
| 533 | _, err := ParseInt([]byte("9223372036854775808")) |
| 534 | if !errors.Is(err, OverflowIntegerError) { |
| 535 | t.Fatalf("ParseInt(int64 max+1) error = %v, want %v", err, OverflowIntegerError) |
| 536 | } |
| 537 | |
| 538 | // min - 1: -9223372036854775809 |
| 539 | _, err = ParseInt([]byte("-9223372036854775809")) |
| 540 | if !errors.Is(err, OverflowIntegerError) { |
| 541 | t.Fatalf("ParseInt(int64 min-1) error = %v, want %v", err, OverflowIntegerError) |
| 542 | } |
| 543 | } |
| 544 | |
| 545 | // Verifies: SYS-REQ-064 [boundary] |
| 546 | // ParseInt on empty input shall return MalformedValueError. |
nothing calls this directly
no test coverage detected
searching dependent graphs…