add assert to make sure a failed typed stack pop doesn't remove the item from the stack

Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
This commit is contained in:
David Lawrence 2015-12-17 17:40:44 -08:00
parent 9307692b52
commit 638b06b36a
1 changed files with 1 additions and 0 deletions

View File

@ -50,6 +50,7 @@ func TestPopStringWrongType(t *testing.T) {
_, err := s.PopString()
assert.Error(t, err)
assert.IsType(t, ErrBadTypeCast{}, err)
assert.Len(t, s.s, 1)
}
func TestPopStringEmpty(t *testing.T) {