diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..bdc61d3 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,9 @@ +language: go + +go: + - 1.3 + - tip + +matrix: + allow_failures: + - go: tip diff --git a/cpu.go b/cpu.go new file mode 100644 index 0000000..92157f8 --- /dev/null +++ b/cpu.go @@ -0,0 +1,8 @@ +package i6502 + +type Cpu struct { +} + +func NewCpu() (*Cpu, error) { + return &Cpu{}, nil +} diff --git a/cpu_test.go b/cpu_test.go new file mode 100644 index 0000000..fcc8c96 --- /dev/null +++ b/cpu_test.go @@ -0,0 +1,17 @@ +package i6502 + +import ( + "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") + } +}