yaze 0.2.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
dungeon_room_test.cc
Go to the documentation of this file.
1#include <gmock/gmock.h>
2#include <gtest/gtest.h>
3
4#include "app/rom.h"
6
7namespace yaze {
8namespace test {
9
10class DungeonRoomTest : public ::testing::Test, public SharedRom {
11 protected:
12 void SetUp() override {
13 // Skip tests on Linux for automated github builds
14#if defined(__linux__)
15 GTEST_SKIP();
16#else
17 if (!rom()->LoadFromFile("./zelda3.sfc").ok()) {
18 GTEST_SKIP_("Failed to load test ROM");
19 }
20#endif
21 }
22 void TearDown() override {}
23};
24
25TEST_F(DungeonRoomTest, SingleRoomLoadOk) {
26 zelda3::Room test_room(/*room_id=*/0);
27 test_room.LoadHeader();
28 // Do some assertions based on the output in ZS
29 test_room.LoadRoomFromROM();
30}
31
32} // namespace test
33} // namespace yaze
auto rom()
Definition rom.h:382
SharedRom()=default
void LoadHeader()
Definition room.cc:18
void LoadRoomFromROM()
Definition room.cc:125
TEST_F(CpuTest, AsmParserTokenizerOk)
Definition cpu_test.cc:44
Main namespace for the application.
Definition controller.cc:18