Преглед на файлове

Add "ls_std_time" header

This header file replaces the generic header file to remove unnecessary dependencies from "time" module tests.
Patrick-Christopher Mattulat преди 2 години
родител
ревизия
80e537786d
променени са 3 файла, в които са добавени 40 реда и са изтрити 2 реда
  1. 23 0
      CMakeLists.txt
  2. 15 0
      include/ls_std/ls_std_time.hpp
  3. 2 2
      test/cases/time/DateTest.cpp

+ 23 - 0
CMakeLists.txt

@@ -231,6 +231,15 @@ if (${LS_STD_BUILD_WITH_TESTS})
     add_executable(${MODULE_NAME_LOGIC}_test ${TEST_FILES_LOGIC})
 endif ()
 
+##########################################################
+# Build Tests (time)
+##########################################################
+
+if (${LS_STD_BUILD_WITH_TESTS})
+    message("${MODULE_NAME_TIME}: Building tests...")
+    add_executable(${MODULE_NAME_TIME}_test ${TEST_FILES_TIME})
+endif ()
+
 ##########################################################
 # Build Tests
 ##########################################################
@@ -392,6 +401,20 @@ if (${LS_STD_BUILD_WITH_TESTS})
             "${MODULE_NAME_CORE}")
 endif ()
 
+##########################################################
+# Linking (time)
+##########################################################
+
+if (${LS_STD_BUILD_WITH_TESTS})
+    message("${MODULE_NAME_TIME}: Linking libraries for test application...")
+    target_link_libraries(${MODULE_NAME_TIME}_test
+            gtest
+            gmock
+            gtest_main
+            "${MODULE_NAME_TIME}"
+            "${MODULE_NAME_CORE}")
+endif ()
+
 ##########################################################
 # Linking
 ##########################################################

+ 15 - 0
include/ls_std/ls_std_time.hpp

@@ -0,0 +1,15 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2022-05-16
+ * Changed:         2022-05-16
+ *
+ * */
+
+#ifndef LS_STD_LS_STD_TIME_HPP
+#define LS_STD_LS_STD_TIME_HPP
+
+#include <ls_std/time/Date.hpp>
+
+#endif

+ 2 - 2
test/cases/time/DateTest.cpp

@@ -3,13 +3,13 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2022-05-07
+ * Changed:         2022-05-16
  *
  * */
 
 #include <gtest/gtest.h>
 #include <regex>
-#include <ls_std/ls_std.hpp>
+#include <ls_std/ls_std_time.hpp>
 
 namespace
 {