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 {
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
25};
26
27TEST_F(DungeonRoomTest, SingleRoomLoadOk) {
28 zelda3::Room test_room(/*room_id=*/0, &rom_);
29
30 test_room = zelda3::LoadRoomFromRom(&rom_, /*room_id=*/0);
31}
32
33} // namespace test
34} // namespace yaze
The Rom class is used to load, save, and modify Rom data.
Definition rom.h:57
TEST_F(CpuTest, AsmParserTokenizerOk)
Definition cpu_test.cc:44
Room LoadRoomFromRom(Rom *rom, int room_id)
Definition room.cc:80
Main namespace for the application.
Definition controller.cc:12