yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
dungeon_editor_v2_test.h
Go to the documentation of this file.
1#ifndef YAZE_TEST_INTEGRATION_DUNGEON_EDITOR_V2_TEST_H
2#define YAZE_TEST_INTEGRATION_DUNGEON_EDITOR_V2_TEST_H
3
4#include <memory>
5#include <string>
6
8#include "app/rom.h"
9#include "gtest/gtest.h"
10
11namespace yaze {
12namespace test {
13
19class DungeonEditorV2IntegrationTest : public ::testing::Test {
20 protected:
21 void SetUp() override {
22 // Use the real ROM (try multiple locations)
23 rom_ = std::make_unique<Rom>();
24 auto status = rom_->LoadFromFile("assets/zelda3.sfc");
25 if (!status.ok()) {
26 status = rom_->LoadFromFile("build/bin/zelda3.sfc");
27 }
28 if (!status.ok()) {
29 status = rom_->LoadFromFile("zelda3.sfc");
30 }
31 ASSERT_TRUE(status.ok()) << "Could not load zelda3.sfc from any location";
32
33 // Create V2 editor with ROM
34 dungeon_editor_v2_ = std::make_unique<editor::DungeonEditorV2>(rom_.get());
35 }
36
37 void TearDown() override {
38 dungeon_editor_v2_.reset();
39 rom_.reset();
40 }
41
42 std::unique_ptr<Rom> rom_;
43 std::unique_ptr<editor::DungeonEditorV2> dungeon_editor_v2_;
44
45 static constexpr int kTestRoomId = 0x01;
46};
47
48} // namespace test
49} // namespace yaze
50
51#endif // YAZE_TEST_INTEGRATION_DUNGEON_EDITOR_V2_TEST_H
52
Integration test framework for DungeonEditorV2.
std::unique_ptr< editor::DungeonEditorV2 > dungeon_editor_v2_
Main namespace for the application.