We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5fb2c75 + 726aa03 commit e11d0b0Copy full SHA for e11d0b0
test/scratch_classes/CMakeLists.txt
@@ -81,3 +81,17 @@ target_link_libraries(
81
)
82
83
gtest_discover_tests(value_test)
84
+
85
+# entity_test
86
+add_executable(
87
+ entity_test
88
+ entity_test.cpp
89
+)
90
91
+target_link_libraries(
92
93
+ GTest::gtest_main
94
+ scratchcpp
95
96
97
+gtest_discover_tests(entity_test)
test/scratch_classes/entity_test.cpp
@@ -0,0 +1,19 @@
1
+#include <scratchcpp/entity.h>
2
3
+#include "../common.h"
4
5
+using namespace libscratchcpp;
6
7
+TEST(EntityTest, Constructors)
8
+{
9
+ Entity entity("abc");
10
+ ASSERT_EQ(entity.id(), "abc");
11
+}
12
13
+TEST(EntityTest, Id)
14
15
16
17
+ entity.setId("def");
18
+ ASSERT_EQ(entity.id(), "def");
19
0 commit comments