GB Test: Make sure to init core configs

This commit is contained in:
Vicki Pfau 2017-08-05 23:12:07 -07:00
parent ff272a5f1d
commit 5930e10cf4
4 changed files with 5 additions and 0 deletions

View File

@ -29,6 +29,7 @@ M_TEST_DEFINE(reset) {
struct mCore* core = GBCoreCreate();
assert_non_null(core);
assert_true(core->init(core));
mCoreInitConfig(core, NULL);
core->reset(core);
core->deinit(core);
}
@ -37,6 +38,7 @@ M_TEST_DEFINE(loadNullROM) {
struct mCore* core = GBCoreCreate();
assert_non_null(core);
assert_true(core->init(core));
mCoreInitConfig(core, NULL);
assert_false(core->loadROM(core, NULL));
core->reset(core);
core->deinit(core);

View File

@ -16,6 +16,7 @@ M_TEST_SUITE_SETUP(GBMBC) {
GBSynthesizeROM(vf);
struct mCore* core = GBCoreCreate();
core->init(core);
mCoreInitConfig(core, NULL);
core->loadROM(core, vf);
*state = core;
return 0;

View File

@ -16,6 +16,7 @@ M_TEST_SUITE_SETUP(GBMemory) {
GBSynthesizeROM(vf);
struct mCore* core = GBCoreCreate();
core->init(core);
mCoreInitConfig(core, NULL);
core->loadROM(core, vf);
*state = core;
return 0;

View File

@ -48,6 +48,7 @@ M_TEST_SUITE_SETUP(GBRTC) {
return -1;
}
test->core->init(test->core);
mCoreInitConfig(test->core, NULL);
struct VFile* vf = VFileMemChunk(NULL, 2048);
GBSynthesizeROM(vf);
test->core->loadROM(test->core, vf);