MCPcopy Create free account
hub / github.com/austingebauer/go-leetcode / TestMinStack_1

Function TestMinStack_1

min_stack_155/solution_test.go:8–17  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

6)
7
8func TestMinStack_1(t *testing.T) {
9 minStack := Constructor()
10 minStack.Push(-2)
11 minStack.Push(0)
12 minStack.Push(-3)
13 assert.Equal(t, -3, minStack.GetMin())
14 minStack.Pop()
15 assert.Equal(t, 0, minStack.Top())
16 assert.Equal(t, -2, minStack.GetMin())
17}

Callers

nothing calls this directly

Calls 5

GetMinMethod · 0.80
TopMethod · 0.80
ConstructorFunction · 0.70
PushMethod · 0.45
PopMethod · 0.45

Tested by

no test coverage detected