Push/pop
Create an empty stack (stack1) and push 3 different values. Check that the stack is not
empty. Pop the data, checking the numbers returned, and then confirm that it is empty.
Check for exceptions. |
stack stack1
stack1.push() (three times)
stack1.is_empty()
stack1.pop() (three times)
stack1.is_empty()
|
x, y, z
false
z, y, x
true
no exceptions
|