MCPcopy Index your code
hub / github.com/buger/jsonparser / TestBytesParseInt

Function TestBytesParseInt

bytes_test.go:105–117  ·  view source on GitHub ↗

Verifies: SYS-REQ-015 [boundary] MCDC SYS-REQ-015: N/A

(t *testing.T)

Source from the content-addressed store, hash-verified

103// Verifies: SYS-REQ-015 [boundary]
104// MCDC SYS-REQ-015: N/A
105func TestBytesParseInt(t *testing.T) {
106 for _, test := range parseIntTests {
107 out, ok, overflow := parseInt([]byte(test.in))
108 if overflow != test.isOverflow {
109 t.Errorf("Test '%s' error return did not overflow expectation (obtained %t, expected %t)", test.in, overflow, test.isOverflow)
110 }
111 if ok != !test.isErr {
112 t.Errorf("Test '%s' error return did not match expectation (obtained %t, expected %t)", test.in, !ok, test.isErr)
113 } else if ok && out != test.out {
114 t.Errorf("Test '%s' did not return the expected value (obtained %d, expected %d)", test.in, out, test.out)
115 }
116 }
117}
118
119// Verifies: SYS-REQ-015 [example]
120// MCDC SYS-REQ-015: N/A

Callers

nothing calls this directly

Calls 1

parseIntFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…