backend-infra-engineer: Pre-0.2.2 2024 Q2 snapshot

This commit is contained in:
scawful
2024-04-14 15:49:57 -05:00
parent 546093360f
commit 92cc574e15
113 changed files with 5631 additions and 1872 deletions

View File

@@ -6,10 +6,21 @@
#include "app/emu/memory/memory.h"
#include "app/emu/memory/mock_memory.h"
namespace yaze {
namespace app {
namespace emu {
namespace yaze_test {
namespace emu_test {
using yaze::app::emu::Clock;
using yaze::app::emu::memory::MockClock;
using yaze::app::emu::memory::MockMemory;
using yaze::app::emu::video::BackgroundMode;
using yaze::app::emu::video::PpuInterface;
using yaze::app::emu::video::SpriteAttributes;
using yaze::app::emu::video::Tilemap;
using yaze::app::gfx::Bitmap;
/**
* @brief Mock Ppu class for testing
*/
class MockPpu : public PpuInterface {
public:
MOCK_METHOD(void, Write, (uint16_t address, uint8_t data), (override));
@@ -28,7 +39,7 @@ class MockPpu : public PpuInterface {
MOCK_METHOD(const std::vector<uint8_t>&, GetFrameBuffer, (),
(const, override));
MOCK_METHOD(std::shared_ptr<gfx::Bitmap>, GetScreen, (), (const, override));
MOCK_METHOD(std::shared_ptr<Bitmap>, GetScreen, (), (const, override));
MOCK_METHOD(void, UpdateModeSettings, (), (override));
MOCK_METHOD(void, UpdateTileData, (), (override));
@@ -48,6 +59,9 @@ class MockPpu : public PpuInterface {
BackgroundMode bgMode;
};
/**
* \test Test fixture for PPU unit tests
*/
class PpuTest : public ::testing::Test {
protected:
MockMemory mock_memory;
@@ -141,6 +155,5 @@ TEST_F(PpuTest, FrameComposition) {
// buffer
}
} // namespace emu
} // namespace app
} // namespace yaze
} // namespace emu_test
} // namespace yaze_test