Files
yaze/test/integration/dungeon_editor_test.cc
scawful dc3a59f03b feat: Update README and z3ed documentation for AI-powered features and editor integration
refactor: Simplify dungeon editor integration tests by using real ROM data and removing mock implementations
2025-10-04 13:53:34 -04:00

34 lines
899 B
C++

#include "integration/dungeon_editor_test.h"
#include "app/zelda3/dungeon/room.h"
#include "app/zelda3/dungeon/room_object.h"
namespace yaze {
namespace test {
using namespace yaze::zelda3;
// Test cases using real ROM
TEST_F(DungeonEditorIntegrationTest, LoadRoomFromRealRom) {
auto room = zelda3::LoadRoomFromRom(rom_.get(), kTestRoomId);
EXPECT_NE(room.rom(), nullptr);
room.LoadObjects();
EXPECT_FALSE(room.GetTileObjects().empty());
}
TEST_F(DungeonEditorIntegrationTest, DungeonEditorInitialization) {
ASSERT_TRUE(dungeon_editor_->Load().ok());
}
TEST_F(DungeonEditorIntegrationTest, ObjectEncodingRoundTrip) {
auto room = zelda3::LoadRoomFromRom(rom_.get(), kTestRoomId);
room.LoadObjects();
auto encoded = room.EncodeObjects();
EXPECT_FALSE(encoded.empty());
EXPECT_EQ(encoded[encoded.size()-1], 0xFF); // Terminator
}
} // namespace test
} // namespace yaze