1
0
mirror of https://github.com/ariejan/i6502.git synced 2025-08-20 04:27:56 +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: matrix:
allow_failures: allow_failures:
- go: tip - go: tip
install:
- go get github.com/stretchr/testify

View File

@@ -1,17 +1,13 @@
package i6502 package i6502
import ( import (
"github.com/stretchr/testify/assert"
"testing" "testing"
) )
func TestNewCpu(t *testing.T) { func TestNewCpu(t *testing.T) {
cpu, err := NewCpu() cpu, err := NewCpu()
if err != nil { assert.NotNil(t, cpu)
t.Errorf("Expected NewCPU() to not raise an error") assert.Nil(t, err)
}
if cpu == nil {
t.Errorf("Expected NewCPU() to create a new CPU instance")
}
} }