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

Function TestFixedSet_Reset

internal/utils/sets/set_fixed_test.go:37–46  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

35}
36
37func TestFixedSet_Reset(t *testing.T) {
38 var a = assert.NewAssertion(t)
39
40 var set = setutils.NewFixedSet(3)
41 set.Push(1)
42 set.Push(2)
43 set.Push(3)
44 set.Reset()
45 a.IsTrue(set.Size() == 0)
46}
47
48func BenchmarkFixedSet_Has(b *testing.B) {
49 var count = 1_000_000

Callers

nothing calls this directly

Calls 3

ResetMethod · 0.65
PushMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected