MCPcopy Create free account
hub / github.com/crossoverJie/gscript / TestStack_Get

Function TestStack_Get

stack/stack_test.go:35–49  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

33}
34
35func TestStack_Get(t *testing.T) {
36 s := &Stack{}
37 s.Push("1")
38 s.Push("2")
39 s.Push("3")
40 for i := s.Size() - 1; i >= 0; i-- {
41 fmt.Println(s.Get(i))
42 }
43 fmt.Println()
44 s.Pop()
45 for i := s.Size() - 1; i >= 0; i-- {
46 fmt.Println(s.Get(i))
47 }
48
49}

Callers

nothing calls this directly

Calls 4

PushMethod · 0.95
SizeMethod · 0.95
GetMethod · 0.95
PopMethod · 0.95

Tested by

no test coverage detected