#pragma once #include "Types.h" #include #include #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 m_getByteFunction; std::vector m_memory; };