Răsfoiți Sursa

Fix MSVC related security issues

Patrick-Christopher Mattulat 4 ore în urmă
părinte
comite
a6a74d047f
47 a modificat fișierele cu 217 adăugiri și 212 ștergeri
  1. 6 6
      cmake/Security.cmake
  2. 2 1
      include/ls-std/io/File.hpp
  3. 2 1
      include/ls-std/time/common/DateParameterMapper.hpp
  4. 7 7
      source/ls-std/io/section-pair/validator/SectionPairSectionValidator.cpp
  5. 2 2
      source/ls-std/io/xml/XmlParser.cpp
  6. 3 2
      source/ls-std/time/system-time/WindowsClock.cpp
  7. 5 5
      test/cases/core/evaluator/EmptyStringArgumentEvaluatorTest.cpp
  8. 3 3
      test/cases/core/evaluator/IndexOutOfBoundsEvaluatorTest.cpp
  9. 3 3
      test/cases/core/evaluator/NullPointerArgumentEvaluatorTest.cpp
  10. 7 7
      test/cases/core/evaluator/NullPointerEvaluatorTest.cpp
  11. 3 3
      test/cases/core/evaluator/RawNullPointerArgumentEvaluatorTest.cpp
  12. 3 3
      test/cases/core/evaluator/RawNullPointerEvaluatorTest.cpp
  13. 5 5
      test/cases/core/exception/EventNotHandledExceptionTest.cpp
  14. 5 5
      test/cases/core/exception/FileNotFoundExceptionTest.cpp
  15. 5 5
      test/cases/core/exception/FileOperationExceptionTest.cpp
  16. 5 5
      test/cases/core/exception/IllegalArgumentExceptionTest.cpp
  17. 5 5
      test/cases/core/exception/IllegalArithmeticOperationExceptionTest.cpp
  18. 5 5
      test/cases/core/exception/IncompleteJsonExceptionTest.cpp
  19. 5 5
      test/cases/core/exception/IndexOutOfBoundsExceptionTest.cpp
  20. 5 5
      test/cases/core/exception/NotImplementedExceptionTest.cpp
  21. 5 5
      test/cases/core/exception/NullPointerExceptionTest.cpp
  22. 6 6
      test/cases/event/EventListenerTest.cpp
  23. 6 6
      test/cases/event/EventManagerTest.cpp
  24. 7 7
      test/cases/io/FileReaderTest.cpp
  25. 20 20
      test/cases/io/FileTest.cpp
  26. 5 5
      test/cases/io/FileWriterTest.cpp
  27. 6 6
      test/cases/io/StorableFileTest.cpp
  28. 3 3
      test/cases/io/evaluator/FileExistenceEvaluatorTest.cpp
  29. 2 2
      test/cases/io/logging/LoggerTest.cpp
  30. 3 3
      test/cases/io/section-pair/evaluator/SectionPairIdentifierArgumentEvaluatorTest.cpp
  31. 3 3
      test/cases/io/section-pair/evaluator/SectionPairRowArgumentEvaluatorTest.cpp
  32. 3 3
      test/cases/io/section-pair/evaluator/SectionPairRowListValueArgumentEvaluatorTest.cpp
  33. 3 3
      test/cases/io/section-pair/evaluator/SectionPairRowSingleValueArgumentEvaluatorTest.cpp
  34. 3 3
      test/cases/io/section-pair/evaluator/SectionPairSectionArgumentEvaluatorTest.cpp
  35. 3 3
      test/cases/io/section-pair/evaluator/SectionPairValueArgumentEvaluatorTest.cpp
  36. 2 2
      test/cases/io/section-pair/reader/SectionPairFileReaderIT.cpp
  37. 5 5
      test/cases/io/section-pair/reader/SectionPairFileReaderTest.cpp
  38. 4 4
      test/cases/io/section-pair/serialization/SerializableSectionPairDocumentTest.cpp
  39. 7 7
      test/cases/io/section-pair/serialization/SerializableSectionPairRowListValueTest.cpp
  40. 5 5
      test/cases/io/section-pair/serialization/SerializableSectionPairRowSingleValueTest.cpp
  41. 4 4
      test/cases/io/section-pair/serialization/SerializableSectionPairRowTest.cpp
  42. 9 9
      test/cases/io/section-pair/serialization/SerializableSectionPairSectionTest.cpp
  43. 2 2
      test/cases/io/xml/XmlParserTest.cpp
  44. 6 6
      test/cases/io/xml/XmlReaderTest.cpp
  45. 4 3
      test/cases/time/common/DateParameterMapperTest.cpp
  46. 2 1
      test/classes/TestHelper.cpp
  47. 3 3
      test/classes/io/section-pair/SectionPairDocumentProvider.cpp

+ 6 - 6
cmake/Security.cmake

@@ -1,11 +1,11 @@
 function(enable_strict_warnings target)
     if (MSVC)
-        target_compile_options(${${${target}}} PRIVATE
-                /W4
-                /WX
-                /permissive-
-                /sdl
-        )
+        #target_compile_options(${${${target}}} PRIVATE // Too complicated currently
+        #        /W3
+        #        /WX
+        #        /permissive-
+        #        /sdl
+        #)
     else()
         target_compile_options(${${${target}}} PRIVATE
                 -Wall

+ 2 - 1
include/ls-std/io/File.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-15
- * Changed:         2025-12-21
+ * Changed:         2025-12-23
  *
  * */
 
@@ -20,6 +20,7 @@
 #include <string>
 #include <vector>
 #ifdef _WIN32
+  #define NOMINMAX
   #include <windows.h>
 #endif
 

+ 2 - 1
include/ls-std/time/common/DateParameterMapper.hpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-03-31
-* Changed:         2024-09-11
+* Changed:         2025-12-23
 *
 * */
 
@@ -14,6 +14,7 @@
 #include <ls-std/os/dynamic-goal.hpp>
 #include <ls-std/time/type/DateParameterTypes.hpp>
 #ifdef _WIN32
+  #define NOMINMAX
   #include <windows.h>
 #endif
 

+ 7 - 7
source/ls-std/io/section-pair/validator/SectionPairSectionValidator.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-20
-* Changed:         2025-12-21
+* Changed:         2025-12-23
 *
 * */
 
@@ -42,12 +42,12 @@ bool SectionPairSectionValidator::isValid()
 
 string SectionPairSectionValidator::_getValidationRegex()
 {
-  string newLine = R"(((\n)|(\r\n)))";
-  string identifier = SectionPairIdentifierValidator::getValidationRegex();
-  string sectionHeader = newLine + R"(\[{1}()" + identifier + R"()\]{1}()" + newLine + R"({2}))";
-  string row = SectionPairRowValidator::getValidationRegex();
-  string atLeastOneRow = R"((()" + row + R"(){1}))";
-  string optionalRows = R"((()" + row + R"()*))";
+  const string newLine = R"(((\n)|(\r\n)))";
+  const string identifier = SectionPairIdentifierValidator::getValidationRegex();
+  const string sectionHeader = newLine + R"(\[{1}()" + identifier + R"()\]{1}()" + newLine + R"({2}))";
+  const string row = SectionPairRowValidator::getValidationRegex();
+  const string atLeastOneRow = R"((()" + row + R"(){1}))";
+  const string optionalRows = R"((()" + row + R"()*))";
 
   return sectionHeader + atLeastOneRow + optionalRows;
 }

+ 2 - 2
source/ls-std/io/xml/XmlParser.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-26
- * Changed:         2025-12-21
+ * Changed:         2025-12-23
  *
  * */
 
@@ -321,7 +321,7 @@ size_t XmlParser::_parseDeclaration(const byte_field &_data, const string::size_
 
   if (isValidTagString)
   {
-    const shared_ptr<XmlDeclaration> declaration = this->_createDeclaration(_parseAttributes(tagString));
+    const shared_ptr<XmlDeclaration> declaration = _createDeclaration(_parseAttributes(tagString));
     this->document->setDeclaration(declaration);
   }
 

+ 3 - 2
source/ls-std/time/system-time/WindowsClock.cpp

@@ -3,12 +3,13 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-04-01
-* Changed:         2023-04-01
+* Changed:         2025-12-23
 *
 * */
 
 #include <ls-std/time/common/DateParameterMapper.hpp>
 #include <ls-std/time/system-time/WindowsClock.hpp>
+#define NOMINMAX
 #include <windows.h>
 
 using ls::std::time::DateParameter;
@@ -21,6 +22,6 @@ WindowsClock::~WindowsClock() noexcept = default;
 
 bool WindowsClock::setTime(const DateParameter &_dateParameter)
 {
-  SYSTEMTIME systemTime = DateParameterMapper::toWindowsSystemTime(_dateParameter);
+  const SYSTEMTIME systemTime = DateParameterMapper::toWindowsSystemTime(_dateParameter);
   return SetLocalTime(&systemTime);
 }

+ 5 - 5
test/cases/core/evaluator/EmptyStringArgumentEvaluatorTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-08
-* Changed:         2023-03-25
+* Changed:         2025-12-23
 *
 * */
 
@@ -36,8 +36,8 @@ namespace
           }
           catch (const IllegalArgumentException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - passed argument is empty!";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - passed argument is empty!";
 
             ASSERT_STREQ(expected.c_str(), actual.c_str());
             throw;
@@ -56,8 +56,8 @@ namespace
           }
           catch (const IllegalArgumentException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - this id is empty!";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - this id is empty!";
 
             ASSERT_STREQ(expected.c_str(), actual.c_str());
             throw;

+ 3 - 3
test/cases/core/evaluator/IndexOutOfBoundsEvaluatorTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-10
-* Changed:         2023-03-25
+* Changed:         2025-12-23
 *
 * */
 
@@ -56,8 +56,8 @@ namespace
           }
           catch (const IndexOutOfBoundsException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - index 3 is not in range of the containers size, which is 2!";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - index 3 is not in range of the containers size, which is 2!";
 
             ASSERT_STREQ(expected.c_str(), actual.c_str());
             throw;

+ 3 - 3
test/cases/core/evaluator/NullPointerArgumentEvaluatorTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-08
-* Changed:         2023-04-07
+* Changed:         2025-12-23
 *
 * */
 
@@ -102,8 +102,8 @@ namespace
           }
           catch (const IllegalArgumentException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - this reference is null!";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - this reference is null!";
 
             ASSERT_STREQ(expected.c_str(), actual.c_str());
             throw;

+ 7 - 7
test/cases/core/evaluator/NullPointerEvaluatorTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-08
-* Changed:         2023-05-22
+* Changed:         2025-12-23
 *
 * */
 
@@ -70,7 +70,7 @@ namespace
 
   TEST_F(NullPointerEvaluatorTest, evaluate)
   {
-    shared_ptr<void> value{};
+    const shared_ptr<void> value{};
 
     EXPECT_THROW(
         {
@@ -80,8 +80,8 @@ namespace
           }
           catch (const NullPointerException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - reference in use is null!";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - reference in use is null!";
 
             ASSERT_STREQ(expected.c_str(), actual.c_str());
             throw;
@@ -92,7 +92,7 @@ namespace
 
   TEST_F(NullPointerEvaluatorTest, evaluate_dedicated_message)
   {
-    shared_ptr<void> value{};
+    const shared_ptr<void> value{};
 
     EXPECT_THROW(
         {
@@ -102,8 +102,8 @@ namespace
           }
           catch (const NullPointerException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - this reference is not set and causes this exception!";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - this reference is not set and causes this exception!";
 
             ASSERT_STREQ(expected.c_str(), actual.c_str());
             throw;

+ 3 - 3
test/cases/core/evaluator/RawNullPointerArgumentEvaluatorTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-05-23
-* Changed:         2023-05-23
+* Changed:         2025-12-23
 *
 * */
 
@@ -36,8 +36,8 @@ namespace
           }
           catch (const IllegalArgumentException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - passed argument is null!";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - passed argument is null!";
 
             ASSERT_STREQ(expected.c_str(), actual.c_str());
             throw;

+ 3 - 3
test/cases/core/evaluator/RawNullPointerEvaluatorTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-05-24
-* Changed:         2023-05-24
+* Changed:         2025-12-23
 *
 * */
 
@@ -36,8 +36,8 @@ namespace
           }
           catch (const NullPointerException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - reference in use is null!";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - reference in use is null!";
 
             ASSERT_STREQ(expected.c_str(), actual.c_str());
             throw;

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

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-27
- * Changed:         2023-03-25
+ * Changed:         2025-12-23
  *
  * */
 
@@ -35,8 +35,8 @@ namespace
           }
           catch (const EventNotHandledException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - event was not handled - nothing happened!";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - event was not handled - nothing happened!";
 
             EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
@@ -55,8 +55,8 @@ namespace
           }
           catch (const EventNotHandledException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - id: OPEN_DOOR";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - id: OPEN_DOOR";
 
             EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;

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

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-01
- * Changed:         2023-03-25
+ * Changed:         2025-12-23
  *
  * */
 
@@ -35,8 +35,8 @@ namespace
           }
           catch (const FileNotFoundException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - file not found!";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - file not found!";
 
             EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
@@ -55,8 +55,8 @@ namespace
           }
           catch (const FileNotFoundException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + R"( thrown - "settings.txt" not found!)";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + R"( thrown - "settings.txt" not found!)";
 
             EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;

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

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-01
- * Changed:         2023-03-25
+ * Changed:         2025-12-23
  *
  * */
 
@@ -35,8 +35,8 @@ namespace
           }
           catch (const FileOperationException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - file operation failed!";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - file operation failed!";
 
             EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
@@ -55,8 +55,8 @@ namespace
           }
           catch (const FileOperationException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + R"( thrown - creating directory "tmp")";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + R"( thrown - creating directory "tmp")";
 
             EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;

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

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-01
- * Changed:         2023-03-25
+ * Changed:         2025-12-23
  *
  * */
 
@@ -35,8 +35,8 @@ namespace
           }
           catch (const IllegalArgumentException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - passed argument is not valid!";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - passed argument is not valid!";
 
             EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
@@ -55,8 +55,8 @@ namespace
           }
           catch (const IllegalArgumentException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - value is empty";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - value is empty";
 
             EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;

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

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-01
- * Changed:         2023-03-25
+ * Changed:         2025-12-23
  *
  * */
 
@@ -35,8 +35,8 @@ namespace
           }
           catch (const IllegalArithmeticOperationException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - arithmetic operation is not allowed!";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - arithmetic operation is not allowed!";
 
             EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
@@ -55,8 +55,8 @@ namespace
           }
           catch (const IllegalArithmeticOperationException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - division by zero";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - division by zero";
 
             EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;

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

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-01
- * Changed:         2023-03-25
+ * Changed:         2025-12-23
  *
  * */
 
@@ -35,8 +35,8 @@ namespace
           }
           catch (const IncompleteJsonException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - this JSON string is incomplete.";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - this JSON string is incomplete.";
 
             EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
@@ -55,8 +55,8 @@ namespace
           }
           catch (const IncompleteJsonException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - incomplete: {\"name\":\"}";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - incomplete: {\"name\":\"}";
 
             EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;

+ 5 - 5
test/cases/core/exception/IndexOutOfBoundsExceptionTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-10
-* Changed:         2023-03-25
+* Changed:         2025-12-23
 *
 * */
 
@@ -35,8 +35,8 @@ namespace
           }
           catch (const IndexOutOfBoundsException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - provided index is out of bounds!";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - provided index is out of bounds!";
 
             EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
@@ -55,8 +55,8 @@ namespace
           }
           catch (const IndexOutOfBoundsException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - index 3 is out of bounds!";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - index 3 is out of bounds!";
 
             EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;

+ 5 - 5
test/cases/core/exception/NotImplementedExceptionTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-03-27
-* Changed:         2023-03-27
+* Changed:         2025-12-23
 *
 * */
 
@@ -35,8 +35,8 @@ namespace
           }
           catch (const NotImplementedException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - method is not implemented and should not be used!";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - method is not implemented and should not be used!";
 
             EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
@@ -55,8 +55,8 @@ namespace
           }
           catch (const NotImplementedException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + R"lit( thrown - method "marshal" is not implemented!)lit";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + R"lit( thrown - method "marshal" is not implemented!)lit";
 
             EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;

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

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2021-05-01
- * Changed:         2023-03-25
+ * Changed:         2025-12-23
  *
  * */
 
@@ -35,8 +35,8 @@ namespace
           }
           catch (const NullPointerException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - reference is null!";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - reference is null!";
 
             EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
@@ -55,8 +55,8 @@ namespace
           }
           catch (const NullPointerException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - _value is null";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - _value is null";
 
             EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;

+ 6 - 6
test/cases/event/EventListenerTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2024-05-16
-* Changed:         2025-12-21
+* Changed:         2025-12-23
 *
 * */
 
@@ -63,8 +63,8 @@ namespace
           }
           catch (const NullPointerException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - no event manager is provided for OnClickEvent";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - no event manager is provided for OnClickEvent";
 
             EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;
@@ -90,7 +90,7 @@ namespace
 
   TEST_F(EventListenerTest, unsubscribe_with_missing_event_manager)
   {
-    auto myButton = make_shared<Button>();
+    const auto myButton = make_shared<Button>();
 
     EXPECT_THROW(
         {
@@ -100,8 +100,8 @@ namespace
           }
           catch (const NullPointerException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - no event manager is provided for OnClickEvent";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - no event manager is provided for OnClickEvent";
 
             EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;

+ 6 - 6
test/cases/event/EventManagerTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2024-05-16
-* Changed:         2025-12-21
+* Changed:         2025-12-23
 *
 * */
 
@@ -62,12 +62,12 @@ namespace
 
   TEST_F(EventManagerTest, invoke)
   {
-    auto eventManager = make_shared<EventManager>();
+    const auto eventManager = make_shared<EventManager>();
 
     auto myBlueButton = make_shared<Button>();
     myBlueButton->subscribe(OnClickEvent().supervisedBy(eventManager), [myBlueButton]() mutable { myBlueButton->onClickEvent(); });
     myBlueButton->subscribe(ChangeColorEvent().supervisedBy(eventManager), [myBlueButton]() mutable { myBlueButton->onChangeColorEvent(); });
-    auto myRedButton = make_shared<Button>();
+    const auto myRedButton = make_shared<Button>();
     auto myGreenButton = make_shared<Button>();
     myGreenButton->subscribe(ChangeColorEvent().supervisedBy(eventManager), [myGreenButton]() mutable { myGreenButton->onChangeColorEvent(); });
 
@@ -95,7 +95,7 @@ namespace
 
   TEST_F(EventManagerTest, invoke_event_not_known)
   {
-    auto eventManager = make_shared<EventManager>();
+    const auto eventManager = make_shared<EventManager>();
 
     EXPECT_THROW(
         {
@@ -105,8 +105,8 @@ namespace
           }
           catch (const EventNotHandledException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - event OnClickEvent is not known by event manager";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - event OnClickEvent is not known by event manager";
 
             EXPECT_STREQ(expected.c_str(), actual.c_str());
             throw;

+ 7 - 7
test/cases/io/FileReaderTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-18
- * Changed:         2023-03-25
+ * Changed:         2025-12-23
  *
  * */
 
@@ -34,7 +34,7 @@ namespace
 
   TEST_F(FileReaderTest, constructor_file_does_not_exist)
   {
-    File file{TestHelper::getResourcesFolderLocation() + "does-not-exist.txt"};
+    const File file{TestHelper::getResourcesFolderLocation() + "does-not-exist.txt"};
 
     EXPECT_THROW(
         {
@@ -52,18 +52,18 @@ namespace
 
   TEST_F(FileReaderTest, read)
   {
-    File file{TestHelper::getResourcesFolderLocation() + "simple.txt"};
+    const File file{TestHelper::getResourcesFolderLocation() + "simple.txt"};
     FileReader reader{file};
-    string expectedUnix = "Hello!" + NewLine::getUnixNewLine();
-    string expectedWindows = "Hello!" + NewLine::getWindowsNewLine();
+    const string expectedUnix = "Hello!" + NewLine::getUnixNewLine();
+    const string expectedWindows = "Hello!" + NewLine::getWindowsNewLine();
 
-    byte_field content = reader.read();
+    const byte_field content = reader.read();
     ASSERT_TRUE(content == expectedUnix || content == expectedWindows);
   }
 
   TEST_F(FileReaderTest, read_file_gets_lost_in_between)
   {
-    File file{TestHelper::getResourcesFolderLocation() + "lost-readable-file.txt"};
+    const File file{TestHelper::getResourcesFolderLocation() + "lost-readable-file.txt"};
     file.createNewFile();
     FileReader reader{file};
     file.remove();

+ 20 - 20
test/cases/io/FileTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-15
- * Changed:         2025-12-21
+ * Changed:         2025-12-23
  *
  * */
 
@@ -66,7 +66,7 @@ namespace
   TEST_F(FileTest, canExecute)
   {
 #ifdef _WIN32
-    File executableFile{TestHelper::getResourcesFolderLocation() + "app.exe"};
+    const File executableFile{TestHelper::getResourcesFolderLocation() + "app.exe"};
 #endif
 #if defined(unix) || defined(__APPLE__)
     const File executableFile{TestHelper::getResourcesFolderLocation() + "app"};
@@ -89,7 +89,7 @@ namespace
 
   TEST_F(FileTest, canRead_file_does_not_exist)
   {
-    File file{""};
+    const File file{""};
 
     EXPECT_THROW(
         {
@@ -118,7 +118,7 @@ namespace
     ASSERT_FALSE(noWritableFile.canWrite());
 #endif
 #ifdef _WIN32
-    File noWritableFile{TestHelper::getResourcesFolderLocation() + "no-writable-windows.txt"};
+    const File noWritableFile{TestHelper::getResourcesFolderLocation() + "no-writable-windows.txt"};
     ASSERT_FALSE(noWritableFile.canWrite());
 #endif
   }
@@ -137,7 +137,7 @@ namespace
 
   TEST_F(FileTest, createNewFile_file_does_already_exist)
   {
-    File file{TestHelper::getResourcesFolderLocation() + "simple.txt"};
+    const File file{TestHelper::getResourcesFolderLocation() + "simple.txt"};
 
     EXPECT_THROW(
         {
@@ -147,8 +147,8 @@ namespace
           }
           catch (const FileOperationException &_exception)
           {
-            string expected = _exception.getName() + R"lit( thrown - file ")lit" + TestHelper::getResourcesFolderLocation() + R"lit(simple.txt" could not be created!)lit";
-            string actual = _exception.what();
+            const string expected = _exception.getName() + R"lit( thrown - file ")lit" + TestHelper::getResourcesFolderLocation() + R"lit(simple.txt" could not be created!)lit";
+            const string actual = _exception.what();
 
             ASSERT_STREQ(expected.c_str(), actual.c_str());
             throw;
@@ -174,13 +174,13 @@ namespace
 
   TEST_F(FileTest, getAbsoluteFilePath)
   {
-    File file{this->fileLocation};
+    const File file{this->fileLocation};
     ASSERT_STREQ(this->fileLocation.c_str(), file.getAbsoluteFilePath().c_str());
     string s = {FilePathSeparator::get()};
 
-    string wrongFilePath = "home" + s + s + s + "user" + s + "bla" + s + s + "sub_folder";
-    string expectedFilePath = "home" + s + "user" + s + "bla" + s + "sub_folder";
-    File anotherFile{wrongFilePath};
+    const string wrongFilePath = "home" + s + s + s + "user" + s + "bla" + s + s + "sub_folder";
+    const string expectedFilePath = "home" + s + "user" + s + "bla" + s + "sub_folder";
+    const File anotherFile{wrongFilePath};
     ASSERT_STREQ(expectedFilePath.c_str(), anotherFile.getAbsoluteFilePath().c_str());
   }
 
@@ -254,8 +254,8 @@ namespace
 
   TEST_F(FileTest, list)
   {
-    File file{TestHelper::getResourcesFolderLocation() + "list-test"};
-    list<string> filesInDirectory = file.list();
+    const File file{TestHelper::getResourcesFolderLocation() + "list-test"};
+    const list<string> filesInDirectory = file.list();
     string expectedFile{};
     const char separator = FilePathSeparator::get();
 
@@ -280,8 +280,8 @@ namespace
 
   TEST_F(FileTest, listFiles)
   {
-    File file{TestHelper::getResourcesFolderLocation() + "list-test"};
-    list<string> filesInDirectory = file.listFiles();
+    const File file{TestHelper::getResourcesFolderLocation() + "list-test"};
+    const list<string> filesInDirectory = file.listFiles();
     string expectedFile{};
     const char separator = FilePathSeparator::get();
 
@@ -312,7 +312,7 @@ namespace
 
   TEST_F(FileTest, makeDirectory_directory_already_exists)
   {
-    File directory{TestHelper::getResourcesFolderLocation() + "list-test"};
+    const File directory{TestHelper::getResourcesFolderLocation() + "list-test"};
 
     EXPECT_THROW(
         {
@@ -322,8 +322,8 @@ namespace
           }
           catch (const FileOperationException &_exception)
           {
-            string expected = _exception.getName() + R"lit( thrown - directory ")lit" + TestHelper::getResourcesFolderLocation() + R"lit(list-test" could not be created!)lit";
-            string actual = _exception.what();
+            const string expected = _exception.getName() + R"lit( thrown - directory ")lit" + TestHelper::getResourcesFolderLocation() + R"lit(list-test" could not be created!)lit";
+            const string actual = _exception.what();
 
             ASSERT_STREQ(expected.c_str(), actual.c_str());
             throw;
@@ -365,8 +365,8 @@ namespace
 
   TEST_F(FileTest, renameTo)
   {
-    string currentName = TestHelper::getResourcesFolderLocation() + "tmp-rename-to.txt";
-    string newName = TestHelper::getResourcesFolderLocation() + "tmp-rename-to-better-name.txt";
+    const string currentName = TestHelper::getResourcesFolderLocation() + "tmp-rename-to.txt";
+    const string newName = TestHelper::getResourcesFolderLocation() + "tmp-rename-to-better-name.txt";
 
     File file{currentName};
     file.createNewFile();

+ 5 - 5
test/cases/io/FileWriterTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2023-03-25
+ * Changed:         2025-12-23
  *
  * */
 
@@ -31,8 +31,8 @@ namespace
 
   TEST_F(FileWriterTest, constructor_file_does_not_exist)
   {
-    string path = TestHelper::getResourcesFolderLocation() + "not-existing-file.txt";
-    File file{path};
+    const string path = TestHelper::getResourcesFolderLocation() + "not-existing-file.txt";
+    const File file{path};
 
     EXPECT_THROW(
         {
@@ -75,8 +75,8 @@ namespace
 
   TEST_F(FileWriterTest, write)
   {
-    string path = TestHelper::getResourcesFolderLocation() + "tmp-file-writer-test.txt";
-    File file{path};
+    const string path = TestHelper::getResourcesFolderLocation() + "tmp-file-writer-test.txt";
+    const File file{path};
 
     ASSERT_FALSE(file.exists());
     file.createNewFile();

+ 6 - 6
test/cases/io/StorableFileTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-19
- * Changed:         2025-12-21
+ * Changed:         2025-12-23
  *
  * */
 
@@ -72,16 +72,16 @@ namespace
 
   TEST_F(StorableFileTest, save)
   {
-    string path = TestHelper::getResourcesFolderLocation() + "tmp-storable-file.txt";
-    File file{path};
+    const string path = TestHelper::getResourcesFolderLocation() + "tmp-storable-file.txt";
+    const File file{path};
     file.createNewFile();
 
     StorableFile storableFile{path};
-    byte_field textUnix = "Testing save method!" + NewLine::getUnixNewLine();
-    byte_field textWindows = "Testing save method!" + NewLine::getWindowsNewLine();
+    const byte_field textUnix = "Testing save method!" + NewLine::getUnixNewLine();
+    const byte_field textWindows = "Testing save method!" + NewLine::getWindowsNewLine();
 
     storableFile.save(textUnix);
-    byte_field content = storableFile.load();
+    const byte_field content = storableFile.load();
     ASSERT_TRUE(content == textUnix || content == textWindows);
 
     file.remove();

+ 3 - 3
test/cases/io/evaluator/FileExistenceEvaluatorTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-21
-* Changed:         2023-03-25
+* Changed:         2025-12-23
 *
 * */
 
@@ -38,8 +38,8 @@ namespace
           }
           catch (const FileNotFoundException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - \"" + GetParam() + "\" does not exist!";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - \"" + GetParam() + "\" does not exist!";
 
             ASSERT_STREQ(expected.c_str(), actual.c_str());
             throw;

+ 2 - 2
test/cases/io/logging/LoggerTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2025-12-21
+ * Changed:         2025-12-23
  *
  * */
 
@@ -53,7 +53,7 @@ namespace
 
       static string getContentFromLogFile(const string &_logName)
       {
-        File file{TestHelper::getResourcesFolderLocation() + _logName};
+        const File file{TestHelper::getResourcesFolderLocation() + _logName};
         FileReader reader{file};
         string content{reader.read()};
         file.remove();

+ 3 - 3
test/cases/io/section-pair/evaluator/SectionPairIdentifierArgumentEvaluatorTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-09
-* Changed:         2025-12-21
+* Changed:         2025-12-23
 *
 * */
 
@@ -55,8 +55,8 @@ namespace
           }
           catch (const IllegalArgumentException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - \"" + GetParam() + "\" is not a valid identifier!";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - \"" + GetParam() + "\" is not a valid identifier!";
 
             ASSERT_STREQ(expected.c_str(), actual.c_str());
             throw;

+ 3 - 3
test/cases/io/section-pair/evaluator/SectionPairRowArgumentEvaluatorTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-20
-* Changed:         2025-12-21
+* Changed:         2025-12-23
 *
 * */
 
@@ -56,8 +56,8 @@ namespace
           }
           catch (const IllegalArgumentException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - \"" + GetParam() + "\" is not a valid section pair row!";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - \"" + GetParam() + "\" is not a valid section pair row!";
 
             ASSERT_STREQ(SectionPairMessageFormatter::getFormattedMessage(expected).c_str(), actual.c_str());
             throw;

+ 3 - 3
test/cases/io/section-pair/evaluator/SectionPairRowListValueArgumentEvaluatorTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-20
-* Changed:         2025-12-21
+* Changed:         2025-12-23
 *
 * */
 
@@ -56,8 +56,8 @@ namespace
           }
           catch (const IllegalArgumentException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - \"" + GetParam() + "\" is not a valid section pair list value row!";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - \"" + GetParam() + "\" is not a valid section pair list value row!";
 
             ASSERT_STREQ(SectionPairMessageFormatter::getFormattedMessage(expected).c_str(), actual.c_str());
             throw;

+ 3 - 3
test/cases/io/section-pair/evaluator/SectionPairRowSingleValueArgumentEvaluatorTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-19
-* Changed:         2025-12-21
+* Changed:         2025-12-23
 *
 * */
 
@@ -56,8 +56,8 @@ namespace
           }
           catch (const IllegalArgumentException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - \"" + GetParam() + "\" is not a valid section pair single value row!";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - \"" + GetParam() + "\" is not a valid section pair single value row!";
 
             ASSERT_STREQ(SectionPairMessageFormatter::getFormattedMessage(expected).c_str(), actual.c_str());
             throw;

+ 3 - 3
test/cases/io/section-pair/evaluator/SectionPairSectionArgumentEvaluatorTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-20
-* Changed:         2025-12-21
+* Changed:         2025-12-23
 *
 * */
 
@@ -56,8 +56,8 @@ namespace
           }
           catch (const IllegalArgumentException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - \"" + GetParam() + "\" is not a valid section!";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - \"" + GetParam() + "\" is not a valid section!";
 
             ASSERT_STREQ(SectionPairMessageFormatter::getFormattedMessage(expected).c_str(), actual.c_str());
             throw;

+ 3 - 3
test/cases/io/section-pair/evaluator/SectionPairValueArgumentEvaluatorTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-10
-* Changed:         2025-12-21
+* Changed:         2025-12-23
 *
 * */
 
@@ -55,8 +55,8 @@ namespace
           }
           catch (const IllegalArgumentException &_exception)
           {
-            string actual = _exception.what();
-            string expected = _exception.getName() + " thrown - \"" + GetParam() + "\" is not a valid value!";
+            const string actual = _exception.what();
+            const string expected = _exception.getName() + " thrown - \"" + GetParam() + "\" is not a valid value!";
 
             ASSERT_STREQ(expected.c_str(), actual.c_str());
             throw;

+ 2 - 2
test/cases/io/section-pair/reader/SectionPairFileReaderIT.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-21
-* Changed:         2023-05-16
+* Changed:         2025-12-23
 *
 * */
 
@@ -40,7 +40,7 @@ namespace
   TEST_F(SectionPairFileReaderIT, read)
   {
     SectionPairFileReaderParameter parameter{};
-    auto document = make_shared<SectionPairDocument>();
+    const auto document = make_shared<SectionPairDocument>();
     parameter.setDocument(document);
     parameter.setFilePath(SectionPairFileReaderIT::getSectionPairFileLocation());
     SectionPairFileReader reader{parameter};

+ 5 - 5
test/cases/io/section-pair/reader/SectionPairFileReaderTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-21
-* Changed:         2025-12-21
+* Changed:         2025-12-23
 *
 * */
 
@@ -102,8 +102,8 @@ namespace
           }
           catch (const IllegalArgumentException &_exception)
           {
-            string message = _exception.what();
-            string expected = _exception.getName() + " thrown - \"" + GetParam() + "\" does not have a valid section pair file extension (.txt or .sp)!";
+            const string message = _exception.what();
+            const string expected = _exception.getName() + " thrown - \"" + GetParam() + "\" does not have a valid section pair file extension (.txt or .sp)!";
 
             ASSERT_STREQ(expected.c_str(), message.c_str());
             throw;
@@ -125,10 +125,10 @@ namespace
 
   TEST_F(SectionPairFileReaderTest, read)
   {
-    SectionPairFileReaderParameter parameter = SectionPairFileReaderTest::createMockParameter(true);
+    const SectionPairFileReaderParameter parameter = SectionPairFileReaderTest::createMockParameter(true);
     parameter.getDocument()->reserveNewLine(NewLine::getUnixNewLine());
     SectionPairFileReader reader{parameter};
-    shared_ptr<MockFileReader> mockFileReader = dynamic_pointer_cast<MockFileReader>(parameter.getReader());
+    const shared_ptr<MockFileReader> mockFileReader = dynamic_pointer_cast<MockFileReader>(parameter.getReader());
 
     EXPECT_CALL(*mockFileReader, read()).Times(AtLeast(1));
     ON_CALL(*mockFileReader, read()).WillByDefault(Return(SectionPairFileReaderTest::getMockSectionPairFileContent()));

+ 4 - 4
test/cases/io/section-pair/serialization/SerializableSectionPairDocumentTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-16
-* Changed:         2025-12-21
+* Changed:         2025-12-23
 *
 * */
 
@@ -86,19 +86,19 @@ namespace
 
   TEST_P(SerializableSectionPairDocumentTest_LineBreakTest, marshal)
   {
-    string newLine = GetParam();
+    const string& newLine = GetParam();
     SerializableSectionPairParameter parameter{};
     parameter.setValue(SectionPairDocumentProvider::createDocument());
     parameter.setNewLine(newLine);
     SerializableSectionPairDocument serializable(parameter);
-    byte_field expected = SectionPairDocumentProvider::createSerializedDocument(newLine);
+    const byte_field expected = SectionPairDocumentProvider::createSerializedDocument(newLine);
 
     ASSERT_STREQ(expected.c_str(), serializable.marshal().c_str());
   }
 
   TEST_P(SerializableSectionPairDocumentTest_LineBreakTest, unmarshal)
   {
-    string newLine = GetParam();
+    const string& newLine = GetParam();
     SerializableSectionPairParameter parameter{};
     parameter.setValue(make_shared<SectionPairDocument>());
     parameter.setNewLine(newLine);

+ 7 - 7
test/cases/io/section-pair/serialization/SerializableSectionPairRowListValueTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-11
-* Changed:         2025-12-21
+* Changed:         2025-12-23
 *
 * */
 
@@ -81,16 +81,16 @@ namespace
   TEST_P(SerializableSectionPairRowListValueTest_LineBreakTest, marshal)
   {
     SerializableSectionPairParameter parameter{};
-    auto value = make_shared<SectionPairRowListValue>();
+    const auto value = make_shared<SectionPairRowListValue>();
     value->add("Drumming");
     value->add("Reading");
     value->add("Coding");
     parameter.setValue(value);
-    string newLine = GetParam();
+    const string& newLine = GetParam();
     parameter.setNewLine(newLine);
     SerializableSectionPairRowListValue serializable(parameter);
 
-    string expected = "  Drumming" + newLine + "  Reading" + newLine + "  Coding" + newLine;
+    const string expected = "  Drumming" + newLine + "  Reading" + newLine + "  Coding" + newLine;
 
     ASSERT_STREQ(expected.c_str(), serializable.marshal().c_str());
   }
@@ -98,12 +98,12 @@ namespace
   TEST_P(SerializableSectionPairRowListValueTest_LineBreakTest, unmarshal)
   {
     SerializableSectionPairParameter parameter{};
-    auto value = make_shared<SectionPairRowListValue>();
+    const auto value = make_shared<SectionPairRowListValue>();
     parameter.setValue(value);
-    string newLine = GetParam();
+    const string& newLine = GetParam();
     parameter.setNewLine(newLine);
     SerializableSectionPairRowListValue serializable(parameter);
-    string serializedListValue = "  Drumming" + newLine + "  Reading" + newLine + "  Coding" + newLine;
+    const string serializedListValue = "  Drumming" + newLine + "  Reading" + newLine + "  Coding" + newLine;
     serializable.unmarshal(serializedListValue);
 
     ASSERT_EQ(3, value->getSize());

+ 5 - 5
test/cases/io/section-pair/serialization/SerializableSectionPairRowSingleValueTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-11
-* Changed:         2025-12-21
+* Changed:         2025-12-23
 *
 * */
 
@@ -46,7 +46,7 @@ namespace
 
   TEST_F(SerializableSectionPairRowSingleValueTest, constructor_no_reference)
   {
-    SerializableSectionPairParameter parameter{};
+    const SerializableSectionPairParameter parameter{};
 
     EXPECT_THROW(
         {
@@ -82,14 +82,14 @@ namespace
 
   TEST_P(SerializableSectionPairRowSingleValueTest_LineBreakTest, marshal)
   {
-    string newLine = GetParam();
+    const string& newLine = GetParam();
     SerializableSectionPairParameter parameter{};
     parameter.setValue(make_shared<SectionPairRowSingleValue>("empty"));
     parameter.setNewLine(newLine);
     SerializableSectionPairRowSingleValue serializable(parameter);
 
-    byte_field expected = "empty" + newLine;
-    byte_field actual = serializable.marshal();
+    const byte_field expected = "empty" + newLine;
+    const byte_field actual = serializable.marshal();
 
     ASSERT_STREQ(expected.c_str(), actual.c_str());
   }

+ 4 - 4
test/cases/io/section-pair/serialization/SerializableSectionPairRowTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-12
-* Changed:         2025-12-21
+* Changed:         2025-12-23
 *
 * */
 
@@ -112,7 +112,7 @@ namespace
 
   TEST_P(SerializableSectionPairRowTest_LineBreakTest, marshal_single_value)
   {
-    const string newLine = GetParam();
+    const string& newLine = GetParam();
     const shared_ptr<SerializableSectionPairRow> serializable = SerializableSectionPairRowProvider::createSingleValueForMarshal(newLine);
 
     const byte_field expected = "favourite-color=blue" + newLine;
@@ -123,7 +123,7 @@ namespace
 
   TEST_P(SerializableSectionPairRowTest_LineBreakTest, marshal_list_value)
   {
-    const string newLine = GetParam();
+    const string& newLine = GetParam();
     const shared_ptr<SerializableSectionPairRow> serializable = SerializableSectionPairRowProvider::createListValueForMarshal(newLine);
 
     const string expected = "favourite-colors:" + newLine + "  blue" + newLine + "  red" + newLine + "  purple" + newLine;
@@ -143,7 +143,7 @@ namespace
 
   TEST_P(SerializableSectionPairRowTest_LineBreakTest, unmarshal_list_value)
   {
-    const string newLine = GetParam();
+    const string& newLine = GetParam();
     const shared_ptr<SerializableSectionPairRow> serializable = SerializableSectionPairRowProvider::createListValueForUnmarshal(newLine);
 
     const string data = "favourite-colors:" + newLine + "  blue" + newLine + "  red" + newLine + "  purple" + newLine;

+ 9 - 9
test/cases/io/section-pair/serialization/SerializableSectionPairSectionTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-14
-* Changed:         2025-12-21
+* Changed:         2025-12-23
 *
 * */
 
@@ -85,33 +85,33 @@ namespace
 
   TEST_P(SerializableSectionPairSectionTest_LineBreakTest, marshal_sandra)
   {
-    string newLine = GetParam();
+    const string& newLine = GetParam();
     SerializableSectionPairParameter parameter{};
     parameter.setValue(SectionPairSectionProvider::createSectionWithSandraExample());
     parameter.setNewLine(newLine);
     SerializableSectionPairSection serializable{parameter};
-    byte_field expected = SectionPairSectionProvider::createSerializedSectionWithSandraExample(newLine);
-    byte_field actual = serializable.marshal();
+    const byte_field expected = SectionPairSectionProvider::createSerializedSectionWithSandraExample(newLine);
+    const byte_field actual = serializable.marshal();
 
     ASSERT_STREQ(expected.c_str(), actual.c_str());
   }
 
   TEST_P(SerializableSectionPairSectionTest_LineBreakTest, marshal_tom)
   {
-    string newLine = GetParam();
+    const string& newLine = GetParam();
     SerializableSectionPairParameter parameter{};
     parameter.setValue(SectionPairSectionProvider::createSectionWithTomExample());
     parameter.setNewLine(newLine);
     SerializableSectionPairSection serializable{parameter};
-    byte_field expected = SectionPairSectionProvider::createSerializedSectionWithTomExample(newLine);
-    byte_field actual = serializable.marshal();
+    const byte_field expected = SectionPairSectionProvider::createSerializedSectionWithTomExample(newLine);
+    const byte_field actual = serializable.marshal();
 
     ASSERT_STREQ(expected.c_str(), actual.c_str());
   }
 
   TEST_P(SerializableSectionPairSectionTest_LineBreakTest, unmarshal_sandra)
   {
-    string newLine = GetParam();
+    const string& newLine = GetParam();
     SerializableSectionPairParameter parameter{};
     auto section = make_shared<SectionPairSection>("tmp-id");
     parameter.setValue(section);
@@ -137,7 +137,7 @@ namespace
 
   TEST_P(SerializableSectionPairSectionTest_LineBreakTest, unmarshal_tom)
   {
-    string newLine = GetParam();
+    const string& newLine = GetParam();
     SerializableSectionPairParameter parameter{};
     auto section = make_shared<SectionPairSection>("tmp-id");
     parameter.setValue(section);

+ 2 - 2
test/cases/io/xml/XmlParserTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-26
- * Changed:         2025-12-21
+ * Changed:         2025-12-23
  *
  * */
 
@@ -94,7 +94,7 @@ namespace
 
   TEST_F(XmlParserTest, constructor)
   {
-    shared_ptr<XmlDocument> document{};
+    const shared_ptr<XmlDocument> document{};
 
     EXPECT_THROW(
         {

+ 6 - 6
test/cases/io/xml/XmlReaderTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-10
- * Changed:         2025-12-21
+ * Changed:         2025-12-23
  *
  * */
 
@@ -62,8 +62,8 @@ namespace
 
   TEST_F(XmlReaderTest, setDocument_no_reference)
   {
-    string xmlPath = TestHelper::getResourcesFolderLocation() + "state-machine-test.xml";
-    auto document = make_shared<XmlDocument>();
+    const string xmlPath = TestHelper::getResourcesFolderLocation() + "state-machine-test.xml";
+    const auto document = make_shared<XmlDocument>();
     XmlReader xmlReader{document, xmlPath};
 
     EXPECT_THROW(
@@ -82,9 +82,9 @@ namespace
 
   TEST_F(XmlReaderTest, setFile)
   {
-    string xmlPath = TestHelper::getResourcesFolderLocation() + "state-machine-test.xml";
+    const string xmlPath = TestHelper::getResourcesFolderLocation() + "state-machine-test.xml";
     XmlReader xmlReader{make_shared<XmlDocument>(), xmlPath};
-    File xmlFile{xmlPath};
+    const File xmlFile{xmlPath};
     xmlReader.setFile(xmlFile);
 
     ASSERT_TRUE(true);
@@ -92,7 +92,7 @@ namespace
 
   TEST_F(XmlReaderTest, setFile_does_not_exist)
   {
-    string xmlPath = TestHelper::getResourcesFolderLocation() + "state-machine-test.xml";
+    const string xmlPath = TestHelper::getResourcesFolderLocation() + "state-machine-test.xml";
     XmlReader xmlReader{make_shared<XmlDocument>(), xmlPath};
     File xmlFile{xmlPath};
 

+ 4 - 3
test/cases/time/common/DateParameterMapperTest.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-03-31
-* Changed:         2025-12-21
+* Changed:         2025-12-23
 *
 * */
 
@@ -12,6 +12,7 @@
 #include <utility>
 #include <vector>
 #ifdef _WIN32
+  #define NOMINMAX
   #include <windows.h>
 #endif
 
@@ -73,8 +74,8 @@ namespace
 
   TEST_P(DateParameterMapperTest_Windows, toWindowsSystemTime)
   {
-    DateParameter dateParameter = GetParam();
-    SYSTEMTIME systemTime = DateParameterMapper::toWindowsSystemTime(dateParameter);
+    const DateParameter& dateParameter = GetParam();
+    const SYSTEMTIME systemTime = DateParameterMapper::toWindowsSystemTime(dateParameter);
 
     ASSERT_EQ(systemTime.wYear, GetParam().getYear());
     ASSERT_EQ(systemTime.wMonth, GetParam().getMonth());

+ 2 - 1
test/classes/TestHelper.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-05
-* Changed:         2025-12-21
+* Changed:         2025-12-23
 *
 * */
 
@@ -18,6 +18,7 @@
   #include <unistd.h>
 #endif
 #ifdef _WIN32
+  #define NOMINMAX
   #include <windows.h>
 #endif
 

+ 3 - 3
test/classes/io/section-pair/SectionPairDocumentProvider.cpp

@@ -3,7 +3,7 @@
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2023-02-16
-* Changed:         2025-12-21
+* Changed:         2025-12-23
 *
 * */
 
@@ -79,8 +79,8 @@ byte_field SectionPairDocumentProvider::createSerializedDocument(const string &_
 
 byte_field SectionPairDocumentProvider::createSerializedDocumentColineExample(const string &_newLine)
 {
-  string paragraph = _newLine + _newLine;
-  string _resourcesFolderLocation = R"lit(C:\Users\Admin\CLionProjects\coline-documentation\test\resources)lit";
+  const string paragraph = _newLine + _newLine;
+  const string _resourcesFolderLocation = R"lit(C:\Users\Admin\CLionProjects\coline-documentation\test\resources)lit";
 
   byte_field fileContent = "# section-pair document" + paragraph;
   fileContent += "[general]" + paragraph;