GB Test: Fix tests
Vicki Pfau vi@endrift.com
Sat, 29 Jul 2017 17:40:58 -0700
1 files changed,
4 insertions(+),
4 deletions(-)
jump to
M
src/gb/test/rtc.c
→
src/gb/test/rtc.c
@@ -14,7 +14,6 @@
struct GBRTCTest { struct mRTCSource d; struct mCore* core; - struct VFile* fakeROM; time_t nextTime; };@@ -51,10 +50,10 @@ test->core->init(test->core);
struct VFile* vf = VFileMemChunk(NULL, 2048); GBSynthesizeROM(vf); test->core->loadROM(test->core, vf); - test->core->setRTC(test->core, &test->d); + mCoreSetRTC(test->core, &test->d); + struct GB* gb = test->core->board; - struct GBCartridge* cart = (struct GBCartridge*) &gb->memory.rom[0x100]; - cart->type = 0x0F; + gb->memory.mbcType = GB_MBC3_RTC; *state = test; return 0;@@ -77,6 +76,7 @@ struct GB* gb = test->core->board;
uint8_t expected[sizeof(gb->memory.rtcRegs)] = { 0, 0, 0, 0, 0 }; assert_memory_equal(gb->memory.rtcRegs, expected, sizeof(expected)); + assert_int_equal(gb->memory.mbcType, GB_MBC3_RTC); } M_TEST_DEFINE(tickSecond) {