1
0
mirror of https://github.com/ariejan/i6502.git synced 2024-12-28 05:29:53 +00:00

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