yaze
0.2.0
Link to the Past ROM Editor
Loading...
Searching...
No Matches
dungeon_room_test.cc
Go to the documentation of this file.
1
#include "
app/zelda3/dungeon/room.h
"
2
3
#include "gtest/gtest.h"
4
#include <gmock/gmock.h>
5
#include <gtest/gtest.h>
6
7
#include "
app/rom.h
"
8
9
namespace
yaze
{
10
namespace
test {
11
namespace
zelda3 {
12
13
class
DungeonRoomTest
:
public
::testing::Test,
public
app::SharedRom
{
14
protected
:
15
void
SetUp
()
override
{
16
// Skip tests on Linux for automated github builds
17
#if defined(__linux__)
18
GTEST_SKIP();
19
#else
20
if
(!
rom
()->LoadFromFile(
"./zelda3.sfc"
).ok()) {
21
GTEST_SKIP_(
"Failed to load test ROM"
);
22
}
23
#endif
24
}
25
void
TearDown
()
override
{}
26
};
27
28
TEST_F
(
DungeonRoomTest
, SingleRoomLoadOk) {
29
app::zelda3::dungeon::Room
test_room(
/*room_id=*/
0);
30
test_room.
LoadHeader
();
31
// Do some assertions based on the output in ZS
32
test_room.
LoadRoomFromROM
();
33
}
34
35
}
// namespace zelda3
36
}
// namespace test
37
}
// namespace yaze
yaze::app::SharedRom
A class to hold a shared pointer to a Rom object.
Definition
rom.h:576
yaze::app::SharedRom::rom
auto rom()
Definition
rom.h:588
yaze::app::zelda3::dungeon::Room
Definition
room.h:90
yaze::app::zelda3::dungeon::Room::LoadRoomFromROM
void LoadRoomFromROM()
Definition
room.cc:127
yaze::app::zelda3::dungeon::Room::LoadHeader
void LoadHeader()
Definition
room.cc:23
yaze::test::zelda3::DungeonRoomTest
Definition
dungeon_room_test.cc:13
yaze::test::zelda3::DungeonRoomTest::SetUp
void SetUp() override
Definition
dungeon_room_test.cc:15
yaze::test::zelda3::DungeonRoomTest::TearDown
void TearDown() override
Definition
dungeon_room_test.cc:25
yaze::test::zelda3::TEST_F
TEST_F(DungeonRoomTest, SingleRoomLoadOk)
Definition
dungeon_room_test.cc:28
yaze
Definition
common.cc:22
rom.h
room.h
src
test
zelda3
dungeon_room_test.cc
Generated by
1.12.0