Merged
Conversation
This commit significantly expands the test suite with 7 new test files covering: **New Test Coverage:** - ts-numeric.cpp: Tests for GetLongValue, GetDoubleValue, SetLongValue, SetDoubleValue including hex values, edge cases, and multikey scenarios - ts-boolean.cpp: Tests for GetBoolValue and SetBoolValue with all recognized boolean formats (true/t/yes/y/1/on, false/f/no/n/0/off) - ts-sections.cpp: Tests for GetSection, GetSectionSize, SectionExists, KeyExists, GetAllSections, GetAllKeys - ts-deletion.cpp: Tests for Delete and DeleteValue with various scenarios including multikey deletion and removeEmpty option - ts-edgecases.cpp: Tests for special characters, whitespace handling, long values, Unicode, malformed input, and other edge cases - ts-multiline.cpp: Tests for multiline values with various end tags, whitespace, Unicode, and edge cases - ts-casesensitivity.cpp: Tests for both case-sensitive (CSimpleIniCaseA) and case-insensitive (CSimpleIniA) modes **Test Statistics:** - Added 123 new tests (from 35 to 158 total tests) - All 158 tests passing - Test coverage now includes previously untested API methods **Build Improvements:** - Bumped minimum CMake version to 3.16 - Added precompiled headers (PCH) support for faster test compilation - PCH includes common headers: string, map, list, algorithm, SimpleIni.h This comprehensive test suite validates library functionality, uncovers edge cases, and provides regression testing for future development.
The precompiled headers were being applied to both C and C++ compilation, causing Windows MSVC to fail with 'STL1003: Unexpected compiler, expected C++ compiler' when trying to compile C++ STL headers with the C compiler. Fix: Use CMake generator expressions to restrict PCH to C++ language only: $<$<COMPILE_LANGUAGE:CXX>:...> This ensures C++ headers are only precompiled for C++ source files, not C files. Tests still pass with 158/158 on Linux and should now work on Windows.
Generator expressions in target_precompile_headers() are not compatible with MSVC's PCH implementation, causing malformed include directives in the generated PCH file (e.g., trying to #include '>'). Solution: Conditionally disable PCH on MSVC while keeping it enabled for GCC/Clang where it works correctly. This maintains the build speed improvement on Unix-like systems while ensuring Windows builds succeed. Tests: 158/158 passing on Linux with PCH, Windows should now build successfully.
Precompiled headers were causing cross-platform compatibility issues with MSVC. Removing PCH simplifies the build system and ensures compatibility across all platforms without the added complexity. Changes: - Reverted minimum CMake version from 3.16 to 3.14 - Removed all PCH configuration - Tests: 158/158 passing on Linux, Windows builds should now succeed
The test was using 0xDEADBEEF (3,735,928,559) which exceeds the maximum value for 32-bit signed long (2,147,483,647). Windows uses 32-bit long even on 64-bit systems, causing the test to fail. Changed to 0x12345678 (305,419,896) which fits comfortably in 32-bit signed long and still tests hex parsing functionality. Tests: 158/158 passing on Linux, should now pass on Windows.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit significantly expands the test suite with 7 new test files covering:
New Test Coverage:
Test Statistics:
Build Improvements:
This comprehensive test suite validates library functionality, uncovers edge cases, and provides regression testing for future development.