From c17df7d3e28e0eeb21f7a62d1c66f525b487a5fa Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Sat, 2 Nov 2024 18:46:18 +0100 Subject: implement dungeon generation --- test/CMakeLists.txt | 1 + test/direction.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 test/direction.cpp (limited to 'test') diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 96c0e95..c219ac0 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -3,4 +3,5 @@ target_sources(test_main PUBLIC list.cpp ptrlist.cpp util.cpp + direction.cpp ) diff --git a/test/direction.cpp b/test/direction.cpp new file mode 100644 index 0000000..8c36a94 --- /dev/null +++ b/test/direction.cpp @@ -0,0 +1,11 @@ +#include + +#include "backend/Location.h" + +TEST(LocationDirection, Negate) { + ASSERT_EQ(-NORTH, SOUTH); + ASSERT_EQ(-EAST, WEST); + ASSERT_EQ(-SOUTH, NORTH); + ASSERT_EQ(-WEST, EAST); +} + -- cgit v1.2.3