Refactor test structure and enhance object encoding tests
- Updated CMakeLists.txt to correct file paths for unit tests. - Modified DungeonObjectRenderingE2ETests to inherit from BoundRomTest for better ROM management. - Enhanced DungeonEditorIntegrationTest with improved mock ROM handling and added graphics data setup. - Introduced a new MockRom class with methods for setting mock data and initializing memory layout. - Added comprehensive unit tests for RoomObject encoding and decoding, covering all object types and edge cases. - Refactored DungeonObjectRenderingTests to utilize BoundRomTest, ensuring consistent ROM loading and setup. - Improved assertions in rendering tests for better clarity and reliability.
This commit is contained in:
@@ -144,6 +144,9 @@ class SnesPalette {
|
||||
size_t size() const { return size_; }
|
||||
bool empty() const { return size_ == 0; }
|
||||
|
||||
// Resize
|
||||
void Resize(size_t size) { size_ = size; }
|
||||
|
||||
auto begin() { return colors_.begin(); }
|
||||
auto end() { return colors_.begin() + size_; }
|
||||
auto begin() const { return colors_.begin(); }
|
||||
@@ -218,6 +221,7 @@ struct PaletteGroup {
|
||||
}
|
||||
|
||||
void clear() { palettes.clear(); }
|
||||
void resize(size_t new_size) { palettes.resize(new_size); }
|
||||
auto name() const { return name_; }
|
||||
auto size() const { return palettes.size(); }
|
||||
auto palette(int i) const { return palettes[i]; }
|
||||
|
||||
Reference in New Issue
Block a user