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

Function TestCodeMCDC_CalcAllocateSpaceEmptyKey

mcdc_code_supplement_test.go:140–145  ·  view source on GitHub ↗

Verifies: SYS-REQ-009 [mcdc]

(t *testing.T)

Source from the content-addressed store, hash-verified

138
139// Verifies: SYS-REQ-009 [mcdc]
140func TestCodeMCDC_CalcAllocateSpaceEmptyKey(t *testing.T) {
141 keys := []string{"a", "", "b"}
142 if got := calcAllocateSpace(keys, []byte(`42`), false, false); got <= 0 {
143 t.Fatalf("expected positive allocation, got %d", got)
144 }
145}

Callers

nothing calls this directly

Calls 1

calcAllocateSpaceFunction · 0.85

Tested by

no test coverage detected