mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-11-19 02:08:25 +00:00
982bccf0c9
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
44 lines
977 B
C++
44 lines
977 B
C++
#pragma once
|
|
|
|
#include "FuseTest.h"
|
|
#include "FuseExpectedTestResult.h"
|
|
|
|
#include "Memory.h"
|
|
#include "InputOutput.h"
|
|
#include "Z80.h"
|
|
|
|
namespace Fuse {
|
|
class TestRunner {
|
|
private:
|
|
const Test& m_test;
|
|
const ExpectedTestResult& m_expected;
|
|
|
|
bool m_failed;
|
|
bool m_unimplemented;
|
|
|
|
EightBit::Memory m_memory;
|
|
EightBit::InputOutput m_ports;
|
|
EightBit::Z80 m_cpu;
|
|
|
|
void initialise();
|
|
void initialiseRegisters();
|
|
void initialiseMemory();
|
|
|
|
void check();
|
|
void checkregisters();
|
|
void checkMemory();
|
|
|
|
void dumpDifference(const std::string& description, uint8_t high, uint8_t low) const;
|
|
void dumpDifference(
|
|
const std::string& highDescription,
|
|
const std::string& lowDescription,
|
|
EightBit::register16_t actual, EightBit::register16_t expected) const;
|
|
|
|
public:
|
|
TestRunner(const Test& test, const ExpectedTestResult& expected);
|
|
|
|
void run();
|
|
bool failed() const { return m_failed; }
|
|
bool unimplemented() const { return m_unimplemented; }
|
|
};
|
|
} |