Added test global result

This commit is contained in:
Souryo 2014-06-22 08:40:57 -04:00
parent 7e2ad19da3
commit 81ec6b4b74

View File

@ -232,6 +232,8 @@ namespace NES
void MainWindow::RunTests()
{
Stop();
int passCount = 0;
int totalCount = 0;
for(wstring testROM : GetFilesInFolder(L"TestSuite/*.nes")) {
ifstream testResult(L"TestSuite/" + testROM + L".trt", ios::in | ios::binary);
@ -242,6 +244,7 @@ namespace NES
std::wcout << testROM << ": ";
if(console->RunTest(expectedResult)) {
std::cout << "Passed";
passCount++;
} else {
std::cout << "FAILED";
}
@ -253,7 +256,12 @@ namespace NES
} else {
std::wcout << testROM << ": [NO KNOWN RESULT]" << std::endl;
}
totalCount++;
}
std::cout << "------------------------" << std::endl;
std::cout << passCount << " / " << totalCount << std::endl;
std::cout << "------------------------" << std::endl;
}
LRESULT CALLBACK MainWindow::WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)