backend-infra-engineer: Release v0.3.3 snapshot
This commit is contained in:
@@ -42,10 +42,10 @@ TEST_F(DungeonEditorV2IntegrationTest, LoadWithoutRom) {
|
||||
TEST_F(DungeonEditorV2IntegrationTest, LoadSequence) {
|
||||
// Test the full initialization sequence
|
||||
dungeon_editor_v2_->Initialize();
|
||||
|
||||
|
||||
auto load_status = dungeon_editor_v2_->Load();
|
||||
ASSERT_TRUE(load_status.ok());
|
||||
|
||||
|
||||
// After loading, Update() should work
|
||||
(void)dungeon_editor_v2_->Update();
|
||||
}
|
||||
@@ -63,7 +63,7 @@ TEST_F(DungeonEditorV2IntegrationTest, UpdateBeforeLoad) {
|
||||
TEST_F(DungeonEditorV2IntegrationTest, UpdateAfterLoad) {
|
||||
dungeon_editor_v2_->Initialize();
|
||||
(void)dungeon_editor_v2_->Load();
|
||||
|
||||
|
||||
// Update should delegate to components
|
||||
auto status = dungeon_editor_v2_->Update();
|
||||
EXPECT_TRUE(status.ok());
|
||||
@@ -85,7 +85,7 @@ TEST_F(DungeonEditorV2IntegrationTest, SaveAfterLoad) {
|
||||
dungeon_editor_v2_->Initialize();
|
||||
auto load_status = dungeon_editor_v2_->Load();
|
||||
ASSERT_TRUE(load_status.ok());
|
||||
|
||||
|
||||
// Save should delegate to room objects
|
||||
auto save_status = dungeon_editor_v2_->Save();
|
||||
EXPECT_TRUE(save_status.ok());
|
||||
@@ -98,10 +98,10 @@ TEST_F(DungeonEditorV2IntegrationTest, SaveAfterLoad) {
|
||||
TEST_F(DungeonEditorV2IntegrationTest, AddRoomTab) {
|
||||
dungeon_editor_v2_->Initialize();
|
||||
(void)dungeon_editor_v2_->Load();
|
||||
|
||||
|
||||
// Add a room tab
|
||||
dungeon_editor_v2_->add_room(kTestRoomId);
|
||||
|
||||
|
||||
// This should not crash or fail
|
||||
auto status = dungeon_editor_v2_->Update();
|
||||
EXPECT_TRUE(status.ok());
|
||||
@@ -110,12 +110,12 @@ TEST_F(DungeonEditorV2IntegrationTest, AddRoomTab) {
|
||||
TEST_F(DungeonEditorV2IntegrationTest, AddMultipleRoomTabs) {
|
||||
dungeon_editor_v2_->Initialize();
|
||||
(void)dungeon_editor_v2_->Load();
|
||||
|
||||
|
||||
// Add multiple rooms
|
||||
dungeon_editor_v2_->add_room(0x00);
|
||||
dungeon_editor_v2_->add_room(0x01);
|
||||
dungeon_editor_v2_->add_room(0x02);
|
||||
|
||||
|
||||
auto status = dungeon_editor_v2_->Update();
|
||||
EXPECT_TRUE(status.ok());
|
||||
}
|
||||
@@ -128,7 +128,7 @@ TEST_F(DungeonEditorV2IntegrationTest, RoomLoaderDelegation) {
|
||||
// Verify that Load() delegates to room_loader_
|
||||
dungeon_editor_v2_->Initialize();
|
||||
auto status = dungeon_editor_v2_->Load();
|
||||
|
||||
|
||||
// If Load succeeds, room_loader_ must have worked
|
||||
EXPECT_TRUE(status.ok());
|
||||
}
|
||||
@@ -137,7 +137,7 @@ TEST_F(DungeonEditorV2IntegrationTest, ComponentsInitializedAfterLoad) {
|
||||
dungeon_editor_v2_->Initialize();
|
||||
auto status = dungeon_editor_v2_->Load();
|
||||
ASSERT_TRUE(status.ok());
|
||||
|
||||
|
||||
// After Load(), all components should be properly initialized
|
||||
// We can't directly test this, but Update() should work
|
||||
(void)dungeon_editor_v2_->Update();
|
||||
@@ -151,7 +151,7 @@ TEST_F(DungeonEditorV2IntegrationTest, SetRomAfterConstruction) {
|
||||
// Create editor without ROM
|
||||
editor::DungeonEditorV2 editor;
|
||||
EXPECT_EQ(editor.rom(), nullptr);
|
||||
|
||||
|
||||
// Set ROM
|
||||
editor.set_rom(rom_.get());
|
||||
EXPECT_EQ(editor.rom(), rom_.get());
|
||||
@@ -161,12 +161,12 @@ TEST_F(DungeonEditorV2IntegrationTest, SetRomAfterConstruction) {
|
||||
TEST_F(DungeonEditorV2IntegrationTest, SetRomAndLoad) {
|
||||
// Create editor without ROM
|
||||
editor::DungeonEditorV2 editor;
|
||||
|
||||
|
||||
// Set ROM and load
|
||||
editor.set_rom(rom_.get());
|
||||
editor.Initialize();
|
||||
auto status = editor.Load();
|
||||
|
||||
|
||||
EXPECT_TRUE(status.ok());
|
||||
}
|
||||
|
||||
@@ -174,19 +174,20 @@ TEST_F(DungeonEditorV2IntegrationTest, SetRomAndLoad) {
|
||||
// Unimplemented Methods Tests
|
||||
// ============================================================================
|
||||
|
||||
TEST_F(DungeonEditorV2IntegrationTest, UnimplementedMethods) {
|
||||
// These should return UnimplementedError
|
||||
EXPECT_EQ(dungeon_editor_v2_->Undo().code(),
|
||||
absl::StatusCode::kUnimplemented);
|
||||
EXPECT_EQ(dungeon_editor_v2_->Redo().code(),
|
||||
absl::StatusCode::kUnimplemented);
|
||||
EXPECT_EQ(dungeon_editor_v2_->Cut().code(),
|
||||
absl::StatusCode::kUnimplemented);
|
||||
EXPECT_EQ(dungeon_editor_v2_->Copy().code(),
|
||||
absl::StatusCode::kUnimplemented);
|
||||
EXPECT_EQ(dungeon_editor_v2_->Paste().code(),
|
||||
absl::StatusCode::kUnimplemented);
|
||||
EXPECT_EQ(dungeon_editor_v2_->Find().code(),
|
||||
TEST_F(DungeonEditorV2IntegrationTest, EditingCommandsFallback) {
|
||||
// Undo/Redo should report precondition when history is empty
|
||||
EXPECT_EQ(dungeon_editor_v2_->Undo().code(),
|
||||
absl::StatusCode::kFailedPrecondition);
|
||||
EXPECT_EQ(dungeon_editor_v2_->Redo().code(),
|
||||
absl::StatusCode::kFailedPrecondition);
|
||||
|
||||
// Cut/Copy/Paste should be callable even without a selection
|
||||
EXPECT_EQ(dungeon_editor_v2_->Cut().code(), absl::StatusCode::kOk);
|
||||
EXPECT_EQ(dungeon_editor_v2_->Copy().code(), absl::StatusCode::kOk);
|
||||
EXPECT_EQ(dungeon_editor_v2_->Paste().code(), absl::StatusCode::kOk);
|
||||
|
||||
// Find remains unimplemented
|
||||
EXPECT_EQ(dungeon_editor_v2_->Find().code(),
|
||||
absl::StatusCode::kUnimplemented);
|
||||
}
|
||||
|
||||
@@ -198,7 +199,7 @@ TEST_F(DungeonEditorV2IntegrationTest, MultipleUpdateCycles) {
|
||||
dungeon_editor_v2_->Initialize();
|
||||
auto load_status = dungeon_editor_v2_->Load();
|
||||
ASSERT_TRUE(load_status.ok());
|
||||
|
||||
|
||||
// Run multiple update cycles
|
||||
for (int i = 0; i < 10; i++) {
|
||||
(void)dungeon_editor_v2_->Update();
|
||||
@@ -212,10 +213,10 @@ TEST_F(DungeonEditorV2IntegrationTest, MultipleUpdateCycles) {
|
||||
TEST_F(DungeonEditorV2IntegrationTest, InvalidRoomId) {
|
||||
dungeon_editor_v2_->Initialize();
|
||||
(void)dungeon_editor_v2_->Load();
|
||||
|
||||
|
||||
// Add invalid room ID (beyond 0x128)
|
||||
dungeon_editor_v2_->add_room(0x200);
|
||||
|
||||
|
||||
// Update should handle gracefully
|
||||
auto status = dungeon_editor_v2_->Update();
|
||||
EXPECT_TRUE(status.ok());
|
||||
@@ -224,10 +225,10 @@ TEST_F(DungeonEditorV2IntegrationTest, InvalidRoomId) {
|
||||
TEST_F(DungeonEditorV2IntegrationTest, NegativeRoomId) {
|
||||
dungeon_editor_v2_->Initialize();
|
||||
(void)dungeon_editor_v2_->Load();
|
||||
|
||||
|
||||
// Add negative room ID
|
||||
dungeon_editor_v2_->add_room(-1);
|
||||
|
||||
|
||||
// Update should handle gracefully
|
||||
auto status = dungeon_editor_v2_->Update();
|
||||
EXPECT_TRUE(status.ok());
|
||||
@@ -235,11 +236,11 @@ TEST_F(DungeonEditorV2IntegrationTest, NegativeRoomId) {
|
||||
|
||||
TEST_F(DungeonEditorV2IntegrationTest, LoadTwice) {
|
||||
dungeon_editor_v2_->Initialize();
|
||||
|
||||
|
||||
// Load twice
|
||||
auto status1 = dungeon_editor_v2_->Load();
|
||||
auto status2 = dungeon_editor_v2_->Load();
|
||||
|
||||
|
||||
// Both should succeed
|
||||
EXPECT_TRUE(status1.ok());
|
||||
EXPECT_TRUE(status2.ok());
|
||||
@@ -247,4 +248,3 @@ TEST_F(DungeonEditorV2IntegrationTest, LoadTwice) {
|
||||
|
||||
} // namespace test
|
||||
} // namespace yaze
|
||||
|
||||
|
||||
Reference in New Issue
Block a user