Files
yaze/test/integration/dungeon_editor_v2_test.h
scawful bb5e2002c2 fix: apply clang-format and exclude third-party libraries from formatting checks
- Applied clang-format to fix formatting violations in TUI and other source files
- Updated CMakeLists.txt to exclude src/lib/* from format targets to prevent third-party library violations
- Fixes clang-format violations in chat_tui.cc, tui.cc, and unified_layout.cc
- All source files now pass format-check target

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 03:30:56 -05:00

52 lines
1.3 KiB
C++

#ifndef YAZE_TEST_INTEGRATION_DUNGEON_EDITOR_V2_TEST_H
#define YAZE_TEST_INTEGRATION_DUNGEON_EDITOR_V2_TEST_H
#include <memory>
#include <string>
#include "app/editor/dungeon/dungeon_editor_v2.h"
#include "app/rom.h"
#include "gtest/gtest.h"
namespace yaze {
namespace test {
/**
* @brief Integration test framework for DungeonEditorV2
*
* Tests the simplified component delegation architecture
*/
class DungeonEditorV2IntegrationTest : public ::testing::Test {
protected:
void SetUp() override {
// Use the real ROM (try multiple locations)
rom_ = std::make_unique<Rom>();
auto status = rom_->LoadFromFile("assets/zelda3.sfc");
if (!status.ok()) {
status = rom_->LoadFromFile("build/bin/zelda3.sfc");
}
if (!status.ok()) {
status = rom_->LoadFromFile("zelda3.sfc");
}
ASSERT_TRUE(status.ok()) << "Could not load zelda3.sfc from any location";
// Create V2 editor with ROM
dungeon_editor_v2_ = std::make_unique<editor::DungeonEditorV2>(rom_.get());
}
void TearDown() override {
dungeon_editor_v2_.reset();
rom_.reset();
}
std::unique_ptr<Rom> rom_;
std::unique_ptr<editor::DungeonEditorV2> dungeon_editor_v2_;
static constexpr int kTestRoomId = 0x01;
};
} // namespace test
} // namespace yaze
#endif // YAZE_TEST_INTEGRATION_DUNGEON_EDITOR_V2_TEST_H