Add E2E and ZSCustomOverworld test suites for comprehensive testing
- Introduced new E2E test suite for comprehensive ROM testing, validating the complete ROM editing workflow. - Added ZSCustomOverworld test suite to validate version upgrades and data integrity. - Updated `EditorManager` to register the new test suites. - Enhanced CMake configuration to include the new test files. - Updated README to reflect the new testing capabilities and best practices for AI agent testing.
This commit is contained in:
34
test/unit/zelda3/dungeon_room_test.cc
Normal file
34
test/unit/zelda3/dungeon_room_test.cc
Normal file
@@ -0,0 +1,34 @@
|
||||
#include <gmock/gmock.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "app/rom.h"
|
||||
#include "app/zelda3/dungeon/room.h"
|
||||
|
||||
namespace yaze {
|
||||
namespace test {
|
||||
|
||||
class DungeonRoomTest : public ::testing::Test {
|
||||
protected:
|
||||
void SetUp() override {
|
||||
// Skip tests on Linux for automated github builds
|
||||
#if defined(__linux__)
|
||||
GTEST_SKIP();
|
||||
#else
|
||||
if (!rom_.LoadFromFile("./zelda3.sfc").ok()) {
|
||||
GTEST_SKIP_("Failed to load test ROM");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
void TearDown() override {}
|
||||
|
||||
Rom rom_;
|
||||
};
|
||||
|
||||
TEST_F(DungeonRoomTest, SingleRoomLoadOk) {
|
||||
zelda3::Room test_room(/*room_id=*/0, &rom_);
|
||||
|
||||
test_room = zelda3::LoadRoomFromRom(&rom_, /*room_id=*/0);
|
||||
}
|
||||
|
||||
} // namespace test
|
||||
} // namespace yaze
|
||||
Reference in New Issue
Block a user