Skip to content

Add unit tests projects to projects missing them#81

Merged
X-rays5 merged 7 commits intomasterfrom
add-tests
Dec 18, 2025
Merged

Add unit tests projects to projects missing them#81
X-rays5 merged 7 commits intomasterfrom
add-tests

Conversation

@X-rays5
Copy link
Owner

@X-rays5 X-rays5 commented Dec 18, 2025

This pull request introduces a new Windows string conversion utility and adds Google Test-based unit test setups for both the injector and menu modules. The main changes are grouped into improvements to string conversion and logging, and enhancements to the testing infrastructure.

String conversion and logging improvements:

  • Added a new CW2A class in common/src/conversion/cw2a.hpp and its implementation in cw2a.cpp, providing a utility for converting wide-character strings (wchar_t*) to ANSI (char*) using Windows APIs. [1] [2]
  • Integrated the new CW2A utility into the thread ID formatter in common/src/logging/formatter/thread_id.hpp, replacing the previous ATL-based conversion and updating relevant includes. [1] [2]
  • Updated the build system (common/CMakeLists.txt) to include the new conversion utility source files.

Testing infrastructure enhancements:

  • Added Google Test integration for the injector module, including a new test directory, CMake configuration (injector/test/CMakeLists.txt), and a test entry point (injector/test/src/main.cpp). [1] [2] [3]
  • Added Google Test integration for the menu module, including a new test directory, CMake configuration (menu/test/CMakeLists.txt), and a test entry point (menu/test/src/main.cpp). [1] [2] [3] [4]

Copilot AI review requested due to automatic review settings December 18, 2025 19:29
@X-rays5 X-rays5 enabled auto-merge (squash) December 18, 2025 19:31
@X-rays5 X-rays5 self-assigned this Dec 18, 2025
@X-rays5 X-rays5 added this to the 2.0 rewrite milestone Dec 18, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds Google Test-based unit test infrastructure for the injector and menu modules, and replaces ATL-based string conversion with a custom CW2A utility to reduce external dependencies.

  • Introduces a custom Windows string conversion class CW2A for converting wide-character strings to ANSI
  • Adds Google Test framework integration and test entry points for both injector and menu modules
  • Updates the thread ID formatter to use the new conversion utility instead of ATL

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
common/src/conversion/cw2a.hpp Implements custom CW2A class for wide-char to ANSI conversion
common/src/conversion/cw2a.cpp Source file for CW2A implementation
common/CMakeLists.txt Adds CW2A conversion utility source files to build
common/src/logging/formatter/thread_id.hpp Updates include and usage to use new CW2A utility instead of ATL
injector/test/src/main.cpp Adds Google Test entry point for injector tests
injector/test/CMakeLists.txt Configures test executable for injector module
injector/CMakeLists.txt Adds test subdirectory to build
menu/test/src/main.cpp Adds Google Test entry point for menu tests
menu/test/CMakeLists.txt Configures test executable for menu module
menu/CMakeLists.txt Adds test subdirectory and test file to build

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

X-rays5 and others added 4 commits December 18, 2025 20:36
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Dec 18, 2025

Test Results

42 tests  ±0   42 ✅ ±0   26s ⏱️ -1s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 6486d4d. ± Comparison against base commit 83191f8.

♻️ This comment has been updated with latest results.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 18, 2025

@X-rays5 X-rays5 merged commit 839ad34 into master Dec 18, 2025
7 checks passed
@X-rays5 X-rays5 deleted the add-tests branch December 18, 2025 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants