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:
parent
1f7867cfb6
commit
f88946a622
@ -7,3 +7,6 @@ go:
|
||||
matrix:
|
||||
allow_failures:
|
||||
- go: tip
|
||||
|
||||
install:
|
||||
- go get github.com/stretchr/testify
|
||||
|
10
cpu_test.go
10
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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user