all repos — mgba @ 558a3ab0376faa422132980782dbc7be82c6daa3

mGBA Game Boy Advance Emulator

GB Test: Fix tests
Vicki Pfau vi@endrift.com
Sat, 29 Jul 2017 17:40:58 -0700
commit

558a3ab0376faa422132980782dbc7be82c6daa3

parent

5c90abd294cb969722808b9513e3a7ce58db1da7

1 files changed, 4 insertions(+), 4 deletions(-)

jump to
M src/gb/test/rtc.csrc/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) {