MCPcopy Create free account
hub / github.com/buger/jsonparser / TestGetIntOverflow

Function TestGetIntOverflow

deep_spec_test.go:737–742  ·  view source on GitHub ↗

Verifies: SYS-REQ-076 [boundary] GetInt on overflow value shall return overflow error.

(t *testing.T)

Source from the content-addressed store, hash-verified

735// Verifies: SYS-REQ-076 [boundary]
736// GetInt on overflow value shall return overflow error.
737func TestGetIntOverflow(t *testing.T) {
738 _, err := GetInt([]byte(`{"a":9223372036854775808}`), "a")
739 if !errors.Is(err, OverflowIntegerError) {
740 t.Fatalf("GetInt(overflow) error = %v, want %v", err, OverflowIntegerError)
741 }
742}
743
744// Verifies: SYS-REQ-077 [boundary]
745// GetInt on non-number value shall return type-mismatch error.

Callers

nothing calls this directly

Calls 1

GetIntFunction · 0.85

Tested by

no test coverage detected