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

Function TestStress_Get_BareTruncatedValue

dead_code_audit_test.go:656–668  ·  view source on GitHub ↗

Verifies: SYS-REQ-001 [boundary]

(t *testing.T)

Source from the content-addressed store, hash-verified

654
655// Verifies: SYS-REQ-001 [boundary]
656func TestStress_Get_BareTruncatedValue(t *testing.T) {
657 // A bare value with no container and no terminator — tokenEnd returns len(data)
658 val, dt, _, err := Get([]byte("12345"))
659 if err != nil {
660 t.Fatalf("unexpected error: %v", err)
661 }
662 if dt != Number {
663 t.Fatalf("expected Number, got %v", dt)
664 }
665 if string(val) != "12345" {
666 t.Fatalf("expected '12345', got %q", val)
667 }
668}
669
670// =============================================================================
671// CRITICAL PATH: Verify EachKey correctly handles the removed block-skip

Callers

nothing calls this directly

Calls 1

GetFunction · 0.85

Tested by

no test coverage detected