MCPcopy Index your code
hub / github.com/plexdrive/plexdrive / TestLen

Function TestLen

chunk/stack_test.go:52–72  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

50}
51
52func TestLen(t *testing.T) {
53 stack := NewStack(1)
54
55 v := stack.Len()
56 if 0 != v {
57 t.Fatalf("Expected 0 got %v", v)
58 }
59
60 stack.Push(1)
61 v = stack.Len()
62 if 1 != v {
63 t.Fatalf("Expected 1 got %v", v)
64 }
65
66 _ = stack.Pop()
67 v = stack.Len()
68 if 0 != v {
69 t.Fatalf("Expected 0 got %v", v)
70 }
71
72}

Callers

nothing calls this directly

Calls 4

LenMethod · 0.95
PushMethod · 0.95
PopMethod · 0.95
NewStackFunction · 0.85

Tested by

no test coverage detected