chip8-emulator/chip8/chip8_test.go
2022-03-01 18:30:05 -03:00

20 lines
375 B
Go

package chip8_test
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/tangzero/chip8-emulator/chip8"
)
func TestEmulator_Reset(t *testing.T) {
emulator := chip8.NewEmulator(nil, nil)
emulator.V[0x03] = 0xFF
emulator.V[0x0F] = 0xBB
emulator.Reset()
assert.Equal(t, uint8(0x00), emulator.V[0x03])
assert.Equal(t, uint8(0x00), emulator.V[0x0F])
}