mirror of
https://github.com/jpd002/Play-.git
synced 2025-04-28 21:57:57 +03:00
33 lines
816 B
C++
33 lines
816 B
C++
#pragma once
|
|
|
|
#include "Types.h"
|
|
#include <vector>
|
|
#include <functional>
|
|
|
|
#define TEST_VERIFY(a) \
|
|
if(!(a)) \
|
|
{ \
|
|
printf("Verification failed: '%s'. Aborting.\n", #a); \
|
|
std::abort(); \
|
|
}
|
|
|
|
class CMemoryViewModelTests
|
|
{
|
|
public:
|
|
void RunTests();
|
|
|
|
private:
|
|
uint8 GetByte(uint32);
|
|
|
|
void TestSimpleBytes();
|
|
void TestOutOfBounds();
|
|
void TestWindowOutOfBounds();
|
|
void TestAddressToModelIndex();
|
|
void TestAddressToModelIndexWord();
|
|
void TestAddressToModelIndexWindowed();
|
|
void TestModelIndexToAddress();
|
|
void TestModelIndexToAddressWord();
|
|
|
|
std::function<uint8(uint32)> m_getByteFunction;
|
|
std::vector<uint8> m_memory;
|
|
};
|