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

Function TestRemoval2_TokenEnd_EmptyInput

dead_code_audit_test.go:92–97  ·  view source on GitHub ↗

============================================================================= REMOVAL 2: `end == -1` guard removed in getType tokenEnd returns len(data) instead of -1. Verify behavior for edge cases. ============================================================================= Verifies: SYS-REQ-044

(t *testing.T)

Source from the content-addressed store, hash-verified

90
91// Verifies: SYS-REQ-044 [boundary]
92func TestRemoval2_TokenEnd_EmptyInput(t *testing.T) {
93 result := tokenEnd([]byte{})
94 if result != 0 {
95 t.Fatalf("tokenEnd([]) = %d, want 0", result)
96 }
97}
98
99// Verifies: SYS-REQ-044 [boundary]
100func TestRemoval2_TokenEnd_NoDelimiter(t *testing.T) {

Callers

nothing calls this directly

Calls 1

tokenEndFunction · 0.85

Tested by

no test coverage detected