MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / TestNewPartialRanges

Function TestNewPartialRanges

internal/caches/partial_ranges_test.go:14–28  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

12)
13
14func TestNewPartialRanges(t *testing.T) {
15 var r = caches.NewPartialRanges(0)
16 r.Add(1, 100)
17 r.Add(50, 300)
18
19 r.Add(30, 80)
20 r.Add(30, 100)
21 r.Add(30, 400)
22 r.Add(1000, 10000)
23 r.Add(200, 1000)
24 r.Add(200, 10040)
25
26 logs.PrintAsJSON(r.Ranges, t)
27 t.Log("max:", r.Max())
28}
29
30func TestNewPartialRanges1(t *testing.T) {
31 var a = assert.NewAssertion(t)

Callers

nothing calls this directly

Calls 4

NewPartialRangesFunction · 0.92
LogMethod · 0.80
MaxMethod · 0.80
AddMethod · 0.65

Tested by

no test coverage detected