mirror of
https://github.com/felipecsl/6502Android.git
synced 2025-01-04 14:33:00 +00:00
moar nits
This commit is contained in:
parent
6706d4e774
commit
9a9ad49aa3
@ -31,9 +31,7 @@ class MainActivity : AppCompatActivity() {
|
||||
emulator.cpu.run()
|
||||
}
|
||||
|
||||
btnReset.setOnClickListener {
|
||||
emulator.reset()
|
||||
}
|
||||
btnReset.setOnClickListener { emulator.reset() }
|
||||
|
||||
val onClickButton = { code: Int ->
|
||||
emulator.cpu.memory.storeKeypress(code)
|
||||
|
@ -7,7 +7,7 @@ import org.junit.Test
|
||||
import java.io.File
|
||||
|
||||
class INESFileParserTest {
|
||||
val tempFile: File = File.createTempFile("foo", "bar")
|
||||
private val tempFile = File.createTempFile("foo", "bar")
|
||||
|
||||
@Before fun setUp() {
|
||||
tempFile.writeBytes((0..40).map(Int::toByte).toByteArray())
|
||||
@ -22,7 +22,7 @@ class INESFileParserTest {
|
||||
}
|
||||
|
||||
@Test fun validHeader() {
|
||||
val testRom = javaClass.classLoader.getResource("roms/testrom.nes").toURI()
|
||||
val testRom = javaClass.classLoader!!.getResource("roms/testrom.nes").toURI()
|
||||
val header = INESFileParser.parseFileHeader(File(testRom).inputStream())
|
||||
assertThat(header).isEqualTo(INESFileHeader(
|
||||
INESFileParser.INES_FILE_MAGIC, 0x10, 0x10, 0x40, 0x0, 0x0, INESFileParser.PADDING))
|
||||
@ -30,7 +30,7 @@ class INESFileParserTest {
|
||||
}
|
||||
|
||||
@Test fun testMapper() {
|
||||
val testRom = javaClass.classLoader.getResource("roms/testrom.nes").toURI()
|
||||
val testRom = javaClass.classLoader!!.getResource("roms/testrom.nes").toURI()
|
||||
val cartridge = INESFileParser.parseCartridge(File(testRom))
|
||||
// super mario bros 3 is Mapper 4 (MMC3)
|
||||
assertThat(cartridge.mapper).isEqualTo(4)
|
||||
|
Loading…
Reference in New Issue
Block a user