Use testify for cleaner tests

This commit is contained in:
Ariejan de Vroom 2014-08-13 06:19:44 +02:00
parent 1f7867cfb6
commit f88946a622
2 changed files with 6 additions and 7 deletions

View File

@ -7,3 +7,6 @@ go:
matrix:
allow_failures:
- go: tip
install:
- go get github.com/stretchr/testify

View File

@ -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)
}