backend-infra-engineer: Release v0.3.2 snapshot
This commit is contained in:
46
test/unit/zelda3/test_dungeon_objects.h
Normal file
46
test/unit/zelda3/test_dungeon_objects.h
Normal file
@@ -0,0 +1,46 @@
|
||||
#ifndef YAZE_TEST_TEST_DUNGEON_OBJECTS_H
|
||||
#define YAZE_TEST_TEST_DUNGEON_OBJECTS_H
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "app/rom.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "mocks/mock_rom.h"
|
||||
#include "testing.h"
|
||||
|
||||
namespace yaze {
|
||||
namespace test {
|
||||
|
||||
/**
|
||||
* @brief Simplified test framework for dungeon object rendering
|
||||
*
|
||||
* This provides a clean, focused testing environment for dungeon object
|
||||
* functionality without the complexity of full integration tests.
|
||||
*/
|
||||
class TestDungeonObjects : public ::testing::Test {
|
||||
protected:
|
||||
void SetUp() override;
|
||||
void TearDown() override;
|
||||
|
||||
// Test helpers
|
||||
absl::Status CreateTestRom();
|
||||
absl::Status SetupObjectData();
|
||||
|
||||
// Mock data generators
|
||||
std::vector<uint8_t> CreateObjectSubtypeTable(int base_addr, int count);
|
||||
std::vector<uint8_t> CreateTileData(int base_addr, int tile_count);
|
||||
std::vector<uint8_t> CreateRoomHeader(int room_id);
|
||||
|
||||
std::unique_ptr<MockRom> test_rom_;
|
||||
|
||||
// Test constants
|
||||
static constexpr int kTestObjectId = 0x01;
|
||||
static constexpr int kTestRoomId = 0x00;
|
||||
static constexpr size_t kTestRomSize = 0x100000; // 1MB test ROM
|
||||
};
|
||||
|
||||
} // namespace test
|
||||
} // namespace yaze
|
||||
|
||||
#endif // YAZE_TEST_TEST_DUNGEON_OBJECTS_H
|
||||
Reference in New Issue
Block a user