summaryrefslogtreecommitdiff
path: root/stack_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'stack_test.go')
-rw-r--r--stack_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/stack_test.go b/stack_test.go
index dec53cc..e66a3ae 100644
--- a/stack_test.go
+++ b/stack_test.go
@@ -5,7 +5,7 @@ import "testing"
func TestInt(t *testing.T) {
s := NewStack()
s.Push(1)
- i, _ := s.Pop()
+ i := s.Pop()
if i != 1 {
t.Error("Expected 1, got ", i)
}
@@ -14,7 +14,7 @@ func TestInt(t *testing.T) {
func TestComplex(t *testing.T) {
s := NewStack()
s.Push(1+1i)
- i, _ := s.Pop()
+ i := s.Pop()
if i != 1+1i {
t.Error("Expected 1+1i, got ", i)
}
@@ -24,11 +24,11 @@ func TestMeny(t *testing.T) {
s := NewStack()
s.Push(1)
s.Push(2)
- i, _ := s.Pop()
+ i := s.Pop()
if i != 2 {
t.Error("Expected 2, got ", i)
}
- i, _ = s.Pop()
+ i = s.Pop()
if i != 1 {
t.Error("Expected 1, got ", i)
}
@@ -42,8 +42,8 @@ func TestSwap(t *testing.T) {
if s.Depth() != 2 {
t.Error("Expected depth of 2")
}
- a, _ := s.Pop()
- b, _ := s.Pop()
+ a := s.Pop()
+ b := s.Pop()
if s.Depth() != 0 {
t.Error("Expected depth of 0")
}