2014-10-26 18:47:14 -07:00
|
|
|
#include <3ds.h>
|
|
|
|
|
|
|
|
#include "output.h"
|
2014-12-10 22:24:26 -08:00
|
|
|
#include "tests/test.h"
|
2014-11-27 12:54:05 -05:00
|
|
|
#include "tests/fs/fs.h"
|
2014-12-08 21:05:51 -05:00
|
|
|
#include "tests/cpu/cputests.h"
|
2014-10-30 14:55:01 -07:00
|
|
|
|
2014-12-10 22:24:26 -08:00
|
|
|
static unsigned int test_counter = 0;
|
|
|
|
static TestCaller tests[] = {
|
2014-12-08 21:05:51 -05:00
|
|
|
FS::TestAll,
|
|
|
|
CPU::Integer::TestAll
|
2014-10-30 14:55:01 -07:00
|
|
|
};
|
2014-10-26 18:47:14 -07:00
|
|
|
|
2014-12-10 22:24:26 -08:00
|
|
|
int main(int argc, char** argv)
|
2014-10-26 18:47:14 -07:00
|
|
|
{
|
2015-01-12 09:16:07 -02:00
|
|
|
gfxInitDefault();
|
2015-01-15 05:14:33 -02:00
|
|
|
InitOutput();
|
2014-11-22 00:58:29 -08:00
|
|
|
|
2014-12-10 22:24:26 -08:00
|
|
|
ClearScreens();
|
|
|
|
Print(GFX_TOP, "Press A to begin...\n");
|
2014-11-22 00:58:29 -08:00
|
|
|
|
|
|
|
while (aptMainLoop()) {
|
2014-12-14 02:37:52 -08:00
|
|
|
DrawBuffers();
|
2014-11-22 12:21:12 -08:00
|
|
|
|
|
|
|
hidScanInput();
|
|
|
|
if (hidKeysDown() & KEY_START) {
|
|
|
|
break;
|
|
|
|
} else if (hidKeysDown() & KEY_A) {
|
2014-12-14 02:37:52 -08:00
|
|
|
ClearScreens();
|
2014-11-22 12:21:12 -08:00
|
|
|
|
2014-12-10 22:24:26 -08:00
|
|
|
if (test_counter < (sizeof(tests) / sizeof(tests[0]))) {
|
|
|
|
tests[test_counter]();
|
|
|
|
test_counter++;
|
2014-11-22 12:21:12 -08:00
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2014-12-14 02:37:52 -08:00
|
|
|
Log(GFX_TOP, "\n");
|
2014-12-10 22:24:26 -08:00
|
|
|
Print(GFX_TOP, "Press A to continue...\n");
|
2014-11-22 12:21:12 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
gspWaitForEvent(GSPEVENT_VBlank0, false);
|
2014-11-22 00:58:29 -08:00
|
|
|
}
|
|
|
|
|
2014-12-10 22:24:26 -08:00
|
|
|
ClearScreens();
|
2014-12-14 02:37:52 -08:00
|
|
|
|
2014-11-22 00:58:29 -08:00
|
|
|
gfxExit();
|
2015-01-15 05:14:33 -02:00
|
|
|
DeinitOutput();
|
2015-01-14 14:57:42 -02:00
|
|
|
|
2014-11-22 00:58:29 -08:00
|
|
|
return 0;
|
2014-10-26 18:47:14 -07:00
|
|
|
}
|