From 638b06b36ad1db56d661b234f151ab1462e1f9e5 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Thu, 17 Dec 2015 17:40:44 -0800 Subject: [PATCH] add assert to make sure a failed typed stack pop doesn't remove the item from the stack Signed-off-by: David Lawrence (github: endophage) --- tuf/utils/stack_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/tuf/utils/stack_test.go b/tuf/utils/stack_test.go index 3309c877b7..944a26a816 100644 --- a/tuf/utils/stack_test.go +++ b/tuf/utils/stack_test.go @@ -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) {