juk3n/fluffypublic Fork
⑂ 6714ddd
Commits
⬇ Clone ▾
git clone https://git.rickub.com/juk3n/fluffy.git
git clone ssh://git@rickub.com/juk3n/fluffy.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

added game creation test

juk3n committed 2024-07-01T12:54:20+02:00 Browse files
6714ddd parent: 984c98e
modified app/CMakeLists.txt +1 -0
@@ -39,6 +39,7 @@ add_executable(fluffy src/main.cpp)
3939 add_executable(
4040 hello_test
4141 tests/tests.cc
42+ tests/gameTest.cpp
4243 )
4344 target_link_libraries(
4445 hello_test
@@ -39,6 +39,7 @@ add_executable(fluffy src/main.cpp)
39 add_executable(39 add_executable(
40 hello_test40 hello_test
41 tests/tests.cc41 tests/tests.cc
42+ tests/gameTest.cpp
42 )43 )
43 target_link_libraries(44 target_link_libraries(
44 hello_test45 hello_test
added app/tests/gameTest.cpp +13 -0
new file mode 100644
@@ -0,0 +1,13 @@
1+#include <gtest/gtest.h>
2+
3+#include <game.hpp>
4+
5+// Demonstrate some basic assertions.
6+TEST(GameTest, Creation) {
7+ Game sut{0, "sut", "sut/path"};
8+
9+ EXPECT_EQ(0, sut.getId());
10+ EXPECT_EQ("sut", sut.getName());
11+ EXPECT_EQ("sut/path", sut.getPath());
12+
13+}
new file mode 100644
@@ -0,0 +1,13 @@
1+#include <gtest/gtest.h>
2+
3+#include <game.hpp>
4+
5+// Demonstrate some basic assertions.
6+TEST(GameTest, Creation) {
7+ Game sut{0, "sut", "sut/path"};
8+
9+ EXPECT_EQ(0, sut.getId());
10+ EXPECT_EQ("sut", sut.getName());
11+ EXPECT_EQ("sut/path", sut.getPath());
12+
13+}