aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-11-02 18:46:18 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-11-02 18:46:18 +0100
commitc17df7d3e28e0eeb21f7a62d1c66f525b487a5fa (patch)
tree897cc608add9682c0ae36d3b3552147706234602 /test
parent5e4dd0c0197f6273c61491a5b9a030c93f796a12 (diff)
implement dungeon generation
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt1
-rw-r--r--test/direction.cpp11
2 files changed, 12 insertions, 0 deletions
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 <gtest/gtest.h>
+
+#include "backend/Location.h"
+
+TEST(LocationDirection, Negate) {
+ ASSERT_EQ(-NORTH, SOUTH);
+ ASSERT_EQ(-EAST, WEST);
+ ASSERT_EQ(-SOUTH, NORTH);
+ ASSERT_EQ(-WEST, EAST);
+}
+