Update ROM loading assertions in integration tests for improved error handling

- Replaced direct calls to `rom_->LoadFromData` with `ASSERT_OK` assertions in `OverworldIntegrationTest` and `OverworldV3IntegrationTest` to enhance error handling and ensure robust test execution.
- This change aligns with recent improvements in error management across the testing framework.
This commit is contained in:
scawful
2025-09-28 15:25:14 -04:00
parent 41326edd91
commit 8e5bfb962b

View File

@@ -5,6 +5,7 @@
#include "app/rom.h" #include "app/rom.h"
#include "app/zelda3/overworld/overworld.h" #include "app/zelda3/overworld/overworld.h"
#include "app/zelda3/overworld/overworld_map.h" #include "app/zelda3/overworld/overworld_map.h"
#include "testing.h"
namespace yaze { namespace yaze {
namespace zelda3 { namespace zelda3 {
@@ -52,7 +53,7 @@ class OverworldIntegrationTest : public ::testing::Test {
rom_data[0x3F51F] = 0x01; // Map 1 message ID (low byte) rom_data[0x3F51F] = 0x01; // Map 1 message ID (low byte)
rom_data[0x3F520] = 0x00; // Map 1 message ID (high byte) rom_data[0x3F520] = 0x00; // Map 1 message ID (high byte)
rom_->LoadFromData(rom_data); ASSERT_OK(rom_->LoadFromData(rom_data));
} }
std::unique_ptr<Rom> rom_; std::unique_ptr<Rom> rom_;
@@ -151,7 +152,7 @@ class OverworldV3IntegrationTest : public ::testing::Test {
rom_data[0x140488 + i] = i + 10; // Map 1 custom tiles rom_data[0x140488 + i] = i + 10; // Map 1 custom tiles
} }
rom_->LoadFromData(rom_data); ASSERT_OK(rom_->LoadFromData(rom_data));
} }
std::unique_ptr<Rom> rom_; std::unique_ptr<Rom> rom_;