tests: Add test for the bug fixed in cca16c52fd838b34c759913a41ff28c4e04735d0 [formerly 453e7c03ab48f1bcf72cd9d4b1aae012eb08c697]

Updated gba-suite submodule


Former-commit-id: 97bccebd0a9bf60ed6da1cf3f853b98d114631af
This commit is contained in:
Michel Heily 2020-01-19 00:30:50 +02:00
parent a47cb18cda
commit 6dbc3d5cf0
3 changed files with 8 additions and 4 deletions

2
.gitmodules vendored
View file

@ -1,3 +1,3 @@
[submodule "external/gba-suite"] [submodule "external/gba-suite"]
path = external/gba-suite path = external/gba-suite
url = https://github.com/jsmolka/gba-suite.git url = https://github.com/michelhe/gba-suite.git

2
external/gba-suite vendored

@ -1 +1 @@
Subproject commit 854c1fb3a02fc8d94d04041b2948826708d81011 Subproject commit 0fdc3ada312fcc9180fed8ef96d5ce039321ba5a

View file

@ -189,9 +189,11 @@ mod tests {
use std::cell::RefCell; use std::cell::RefCell;
use std::rc::Rc; use std::rc::Rc;
use super::super::bus::Bus;
use super::super::arm7tdmi; use super::super::arm7tdmi;
use super::super::cartridge::Cartridge; use super::super::cartridge::Cartridge;
struct DummyInterface {} struct DummyInterface {}
impl DummyInterface { impl DummyInterface {
@ -230,7 +232,8 @@ mod tests {
gba.frame(); gba.frame();
} }
assert_eq!(0x080019e0, gba.cpu.pc); let insn = gba.sysbus.read_32(gba.cpu.pc);
assert_eq!(insn, 0xeafffffe); // loop
assert_eq!(0, gba.cpu.gpr[12]); assert_eq!(0, gba.cpu.gpr[12]);
} }
@ -242,7 +245,8 @@ mod tests {
gba.frame(); gba.frame();
} }
assert_eq!(0x800091a, gba.cpu.pc); let insn = gba.sysbus.read_16(gba.cpu.pc);
assert_eq!(insn, 0xe7fe); // loop
assert_eq!(0, gba.cpu.gpr[7]); assert_eq!(0, gba.cpu.gpr[7]);
} }
} }