mirror of https://github.com/mgba-emu/mgba.git
GBA: Fix tests
This commit is contained in:
parent
4a3d042089
commit
c18c38b616
|
@ -16,6 +16,7 @@
|
|||
static int cheatsSetup(void** state) {
|
||||
struct mCore* core = GBACoreCreate();
|
||||
core->init(core);
|
||||
mCoreInitConfig(core, NULL);
|
||||
core->cheatDevice(core);
|
||||
*state = core;
|
||||
return 0;
|
||||
|
@ -26,6 +27,7 @@ static int cheatsTeardown(void** state) {
|
|||
return 0;
|
||||
}
|
||||
struct mCore* core = *state;
|
||||
mCoreConfigDeinit(&core->config);
|
||||
core->deinit(core);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -27,7 +27,9 @@ M_TEST_DEFINE(reset) {
|
|||
struct mCore* core = GBACoreCreate();
|
||||
assert_non_null(core);
|
||||
assert_true(core->init(core));
|
||||
mCoreInitConfig(core, NULL);
|
||||
core->reset(core);
|
||||
mCoreConfigDeinit(&core->config);
|
||||
core->deinit(core);
|
||||
}
|
||||
|
||||
|
@ -36,7 +38,9 @@ M_TEST_DEFINE(loadNullROM) {
|
|||
assert_non_null(core);
|
||||
assert_true(core->init(core));
|
||||
assert_false(core->loadROM(core, NULL));
|
||||
mCoreInitConfig(core, NULL);
|
||||
core->reset(core);
|
||||
mCoreConfigDeinit(&core->config);
|
||||
core->deinit(core);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue