EightBit/LR35902/fusetest_LR35902/FuseTestSuite.cpp
Adrian.Conlon e7001b2425 Now runs the first pass of the translated Z80 tests as LR35902 style instructions
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-08-12 14:22:10 +01:00

31 lines
792 B
C++

#include "stdafx.h"
#include "FuseTestSuite.h"
#include "FuseTestRunner.h"
Fuse::TestSuite::TestSuite(std::string path) {
m_tests.read(path + ".in");
m_results.read(path + ".expected");
}
void Fuse::TestSuite::run() {
auto failedCount = 0;
auto unimplementedCount = 0;
for (auto test : m_tests.container()) {
auto key = test.first;
std::cout << "** Checking: " << key << std::endl;
auto input = test.second;
auto result = m_results.container().find(key)->second;
Fuse::TestRunner runner(input, result);
runner.run();
if (runner.failed())
++failedCount;
if (runner.unimplemented())
++unimplementedCount;
}
std::cout << "+++ Failed test count: " << failedCount << std::endl;
std::cout << "+++ Unimplemented test count: " << unimplementedCount << std::endl;
}