Procházet zdrojové kódy

Add "ls_std_core" header

This header file replaces the generic header file to remove unnecessary dependencies from "core" module tests.
Patrick-Christopher Mattulat před 2 roky
rodič
revize
11de957a3a

+ 22 - 0
CMakeLists.txt

@@ -197,6 +197,15 @@ endif ()
 #    add_executable(${MODULE_NAME_BOXING}_test ${TEST_FILES_BOXING})
 #endif ()
 
+##########################################################
+# Build Tests (core)
+##########################################################
+
+if (${LS_STD_BUILD_WITH_TESTS})
+    message("${MODULE_NAME_CORE}: Building tests...")
+    add_executable(${MODULE_NAME_CORE}_test ${TEST_FILES_CORE})
+endif ()
+
 ##########################################################
 # Build Tests
 ##########################################################
@@ -304,6 +313,19 @@ endif ()
 #            "${MODULE_NAME_BOXING}")
 #endif ()
 
+##########################################################
+# Linking (core)
+##########################################################
+
+if (${LS_STD_BUILD_WITH_TESTS})
+    message("${MODULE_NAME_CORE}: Linking libraries for test application...")
+    target_link_libraries(${MODULE_NAME_CORE}_test
+            gtest
+            gmock
+            gtest_main
+            "${MODULE_NAME_CORE}")
+endif ()
+
 ##########################################################
 # Linking
 ##########################################################

+ 46 - 0
include/ls_std/ls_std_core.hpp

@@ -0,0 +1,46 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2022-05-13
+ * Changed:         2022-05-13
+ *
+ * */
+
+#ifndef LS_STD_LS_STD_CORE_HPP
+#define LS_STD_LS_STD_CORE_HPP
+
+#include <ls_std/core/exception/EventNotHandledException.hpp>
+#include <ls_std/core/exception/EventNotSubscribedException.hpp>
+#include <ls_std/core/exception/FileNotFoundException.hpp>
+#include <ls_std/core/exception/FileOperationException.hpp>
+#include <ls_std/core/exception/IllegalArgumentException.hpp>
+#include <ls_std/core/exception/IllegalArithmeticOperationException.hpp>
+#include <ls_std/core/exception/IncompleteJsonException.hpp>
+#include <ls_std/core/exception/NullPointerException.hpp>
+
+#include <ls_std/core/interface/IBoxing.hpp>
+#include <ls_std/core/interface/IEventSubscriber.hpp>
+#include <ls_std/core/interface/IFactory.hpp>
+#include <ls_std/core/interface/IListener.hpp>
+#include <ls_std/core/interface/IReader.hpp>
+#include <ls_std/core/interface/ISerializable.hpp>
+#include <ls_std/core/interface/IStorable.hpp>
+#include <ls_std/core/interface/IWriter.hpp>
+
+#include <ls_std/core/types/EventTypes.hpp>
+#include <ls_std/core/types/KvTypes.hpp>
+#include <ls_std/core/types/StateMachineTypes.hpp>
+#include <ls_std/core/types/Types.hpp>
+
+#include <ls_std/core/utils/RegexUtils.hpp>
+#include <ls_std/core/utils/STLUtils.hpp>
+#if _WIN32
+#include <ls_std/core/utils/WindowsUtils.hpp>
+#endif
+
+#include <ls_std/core/Class.hpp>
+#include <ls_std/core/LibraryVersion.hpp>
+#include <ls_std/core/Version.hpp>
+
+#endif

+ 2 - 2
test/cases/core/ClassTest.cpp

@@ -3,12 +3,12 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-16
- * Changed:         2022-05-09
+ * Changed:         2022-05-13
  *
  * */
 
 #include <gtest/gtest.h>
-#include <ls_std/ls_std.hpp>
+#include <ls_std/ls_std_core.hpp>
 #include <ls_std_test.hpp>
 
 namespace

+ 2 - 2
test/cases/core/LibraryVersionTest.cpp

@@ -3,12 +3,12 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-02
- * Changed:         2022-05-09
+ * Changed:         2022-05-13
  *
  * */
 
 #include <gtest/gtest.h>
-#include <ls_std/ls_std.hpp>
+#include <ls_std/ls_std_core.hpp>
 
 namespace
 {

+ 2 - 2
test/cases/core/VersionTest.cpp

@@ -3,12 +3,12 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-28
- * Changed:         2022-05-09
+ * Changed:         2022-05-13
  *
  * */
 
 #include <gtest/gtest.h>
-#include <ls_std/ls_std.hpp>
+#include <ls_std/ls_std_core.hpp>
 
 namespace
 {

+ 2 - 2
test/cases/core/exception/EventNotHandledExceptionTest.cpp

@@ -3,12 +3,12 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-27
- * Changed:         2022-05-09
+ * Changed:         2022-05-13
  *
  * */
 
 #include <gtest/gtest.h>
-#include <ls_std/ls_std.hpp>
+#include <ls_std/ls_std_core.hpp>
 
 namespace
 {

+ 2 - 2
test/cases/core/exception/EventNotSubscribedExceptionTest.cpp

@@ -3,12 +3,12 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-27
- * Changed:         2022-05-09
+ * Changed:         2022-05-13
  *
  * */
 
 #include <gtest/gtest.h>
-#include <ls_std/ls_std.hpp>
+#include <ls_std/ls_std_core.hpp>
 
 namespace
 {

+ 2 - 2
test/cases/core/exception/FileNotFoundExceptionTest.cpp

@@ -3,12 +3,12 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-01
- * Changed:         2022-05-09
+ * Changed:         2022-05-13
  *
  * */
 
 #include <gtest/gtest.h>
-#include <ls_std/ls_std.hpp>
+#include <ls_std/ls_std_core.hpp>
 
 namespace
 {

+ 2 - 2
test/cases/core/exception/FileOperationExceptionTest.cpp

@@ -3,12 +3,12 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-01
- * Changed:         2022-05-09
+ * Changed:         2022-05-13
  *
  * */
 
 #include <gtest/gtest.h>
-#include <ls_std/ls_std.hpp>
+#include <ls_std/ls_std_core.hpp>
 
 namespace
 {

+ 2 - 2
test/cases/core/exception/IllegalArgumentExceptionTest.cpp

@@ -3,12 +3,12 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-01
- * Changed:         2022-05-09
+ * Changed:         2022-05-13
  *
  * */
 
 #include <gtest/gtest.h>
-#include <ls_std/ls_std.hpp>
+#include <ls_std/ls_std_core.hpp>
 
 namespace
 {

+ 2 - 2
test/cases/core/exception/IllegalArithmeticOperationExceptionTest.cpp

@@ -3,12 +3,12 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-01
- * Changed:         2022-05-09
+ * Changed:         2022-05-13
  *
  * */
 
 #include <gtest/gtest.h>
-#include <ls_std/ls_std.hpp>
+#include <ls_std/ls_std_core.hpp>
 
 namespace
 {

+ 2 - 2
test/cases/core/exception/IncompleteJsonExceptionTest.cpp

@@ -3,12 +3,12 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-01
- * Changed:         2022-05-09
+ * Changed:         2022-05-13
  *
  * */
 
 #include <gtest/gtest.h>
-#include <ls_std/ls_std.hpp>
+#include <ls_std/ls_std_core.hpp>
 
 namespace
 {

+ 2 - 2
test/cases/core/exception/NullPointerExceptionTest.cpp

@@ -3,12 +3,12 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-01
- * Changed:         2022-05-09
+ * Changed:         2022-05-13
  *
  * */
 
 #include <gtest/gtest.h>
-#include <ls_std/ls_std.hpp>
+#include <ls_std/ls_std_core.hpp>
 
 namespace
 {

+ 2 - 2
test/cases/core/utils/RegexUtilsTest.cpp

@@ -3,12 +3,12 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-18
- * Changed:         2022-05-09
+ * Changed:         2022-05-13
  *
  * */
 
 #include <gtest/gtest.h>
-#include <ls_std/ls_std.hpp>
+#include <ls_std/ls_std_core.hpp>
 
 namespace
 {

+ 2 - 2
test/cases/core/utils/STLUtilsTest.cpp

@@ -3,12 +3,12 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2022-05-09
+ * Changed:         2022-05-13
  *
  * */
 
 #include <gtest/gtest.h>
-#include <ls_std/ls_std.hpp>
+#include <ls_std/ls_std_core.hpp>
 #include <vector>
 #include <list>
 #include <string>