浏览代码

Move ClassWrapper implementation to dedicated source file

Patrick-Christopher Mattulat 2 年之前
父节点
当前提交
4aa256296f
共有 4 个文件被更改,包括 26 次插入9 次删除
  1. 2 1
      CMakeLists.txt
  2. 18 0
      test/classes/core/ClassWrapper.cpp
  3. 4 6
      test/classes/core/ClassWrapper.hpp
  4. 2 2
      test/ls-std-core-test.hpp

+ 2 - 1
CMakeLists.txt

@@ -234,7 +234,8 @@ if (${LS_STD_BUILD_WITH_TESTS})
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/utils/StlUtilsTest.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/ClassTest.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/LibraryVersionTest.cpp
-            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/VersionTest.cpp)
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/core/VersionTest.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/core/ClassWrapper.cpp)
 
     set(TEST_FILES_ENCODING
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/encoding/Base64Test.cpp)

+ 18 - 0
test/classes/core/ClassWrapper.cpp

@@ -0,0 +1,18 @@
+/*
+* Author:          Patrick-Christopher Mattulat
+* Company:         Lynar Studios
+* E-Mail:          webmaster@lynarstudios.com
+* Created:         2023-02-05
+* Changed:         2023-02-05
+*
+* */
+
+#include <classes/core/ClassWrapper.hpp>
+
+ls_std_core_test::ClassWrapper::ClassWrapper() : ls::std::core::Class("ClassWrapper")
+{}
+
+ls_std_core_test::ClassWrapper::~ClassWrapper()
+{
+  Die();
+}

+ 4 - 6
test/classes/base/ClassWrapper.hpp → test/classes/core/ClassWrapper.hpp

@@ -15,16 +15,14 @@
 
 namespace ls_std_core_test // TODO: fix namespace
 {
-  class ClassWrapper : public ls::std::core::Class // TODO: split header and source
+  class ClassWrapper : public ls::std::core::Class
   {
     public:
 
-      ClassWrapper() : ls::std::core::Class("ClassWrapper"){};
+      ClassWrapper();
+      ~ClassWrapper() override;
+
       MOCK_METHOD0(Die, void());
-      ~ClassWrapper() override
-      {
-        Die();
-      }
   };
 }
 

+ 2 - 2
test/ls-std-core-test.hpp

@@ -3,13 +3,13 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2022-05-16
- * Changed:         2023-02-03
+ * Changed:         2023-02-05
  *
  * */
 
 #ifndef LS_STD_LS_STD_CORE_TEST_HPP
 #define LS_STD_LS_STD_CORE_TEST_HPP
 
-#include <classes/base/ClassWrapper.hpp>
+#include <classes/core/ClassWrapper.hpp>
 
 #endif