diff --git a/.travis.yml b/.travis.yml index bdc61d3..3fadf53 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,3 +7,6 @@ go: matrix: allow_failures: - go: tip + +install: + - go get github.com/stretchr/testify diff --git a/cpu_test.go b/cpu_test.go index fcc8c96..5227209 100644 --- a/cpu_test.go +++ b/cpu_test.go @@ -1,17 +1,13 @@ package i6502 import ( + "github.com/stretchr/testify/assert" "testing" ) func TestNewCpu(t *testing.T) { cpu, err := NewCpu() - if err != nil { - t.Errorf("Expected NewCPU() to not raise an error") - } - - if cpu == nil { - t.Errorf("Expected NewCPU() to create a new CPU instance") - } + assert.NotNil(t, cpu) + assert.Nil(t, err) }