2014-10-26 18:47:14 -07:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <3ds.h>
|
|
|
|
|
|
|
|
#include "output.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-11-22 00:48:18 -08:00
|
|
|
static unsigned int testCounter = 0;
|
2014-10-30 14:55:01 -07:00
|
|
|
static void (*tests[]) (void) = {
|
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
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
2014-11-22 00:58:29 -08:00
|
|
|
srvInit();
|
|
|
|
aptInit();
|
|
|
|
hidInit(NULL);
|
|
|
|
gfxInit();
|
|
|
|
gfxSet3D(false);
|
|
|
|
|
|
|
|
clearScreens();
|
|
|
|
print(GFX_TOP, "Press A to begin...\n");
|
|
|
|
|
|
|
|
while (aptMainLoop()) {
|
2014-11-22 12:21:12 -08:00
|
|
|
drawFrames();
|
|
|
|
|
|
|
|
hidScanInput();
|
|
|
|
if (hidKeysDown() & KEY_START) {
|
|
|
|
break;
|
|
|
|
} else if (hidKeysDown() & KEY_A) {
|
|
|
|
clearScreen(GFX_TOP);
|
|
|
|
|
|
|
|
if (testCounter < (sizeof(tests) / sizeof(tests[0]))) {
|
|
|
|
tests[testCounter]();
|
|
|
|
testCounter++;
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
print(GFX_TOP, "\n");
|
|
|
|
print(GFX_TOP, "Press A to continue...\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
gspWaitForEvent(GSPEVENT_VBlank0, false);
|
2014-11-22 00:58:29 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
clearScreens();
|
|
|
|
gfxExit();
|
|
|
|
hidExit();
|
|
|
|
aptExit();
|
|
|
|
srvExit();
|
|
|
|
return 0;
|
2014-10-26 18:47:14 -07:00
|
|
|
}
|