Skip to content

test(modules): add module verification test infrastructure#284

Merged
kcenon merged 1 commit into
mainfrom
feature/277-test-verification-module-builds
Jan 10, 2026
Merged

test(modules): add module verification test infrastructure#284
kcenon merged 1 commit into
mainfrom
feature/277-test-verification-module-builds

Conversation

@kcenon

@kcenon kcenon commented Jan 10, 2026

Copy link
Copy Markdown
Owner

Summary

Add test infrastructure for C++20 module build verification as part of Phase 3 Module Stabilization (Issue #275).

Changes:

  • Add module_verification_test.cpp with comprehensive tests for:
    • Result pattern (ok, err, map, and_then, value_or)
    • EventBus (publish/subscribe operations)
    • ServiceContainer (registration and resolution)
    • Module version info (when modules enabled)
  • Update tests/CMakeLists.txt with conditional module test support
  • Same test file runs in both header-only and module modes

Test Results

Header-only mode: 18/18 tests passed

The module verification test (common_module_verification_test) validates API compatibility between header-only and module builds.

Related Issues

Test Plan

  • Verify all unit tests pass with header-only build
  • Verify module verification test compiles and runs
  • Test infrastructure ready for module mode (requires Clang 16+, GCC 14+, or MSVC 2022)
  • CI verification (AppleClang will skip module tests)

Notes

  • AppleClang does not support C++20 module dependency scanning, so module mode tests require different compilers
  • The test file uses conditional compilation (#ifdef KCENON_USE_MODULES) to switch between header includes and module imports

Add test infrastructure for C++20 module build verification:
- Add module_verification_test.cpp with tests for Result, EventBus,
  and ServiceContainer modules
- Update tests/CMakeLists.txt with conditional module test support
- Test same file in both header-only and module modes
- Verify API compatibility between header-only and module builds

The verification test validates:
- Core Result<T> pattern functionality
- Event bus publish/subscribe operations
- Service container registration and resolution
- Module version info (when KCENON_USE_MODULES is defined)

All 18 tests pass in header-only mode. Module mode tests require
Clang 16+, GCC 14+, or MSVC 2022 (AppleClang not supported).
@kcenon kcenon merged commit 90c8bbe into main Jan 10, 2026
24 checks passed
@kcenon kcenon deleted the feature/277-test-verification-module-builds branch January 10, 2026 18:08
kcenon added a commit that referenced this pull request Apr 13, 2026
Add test infrastructure for C++20 module build verification:
- Add module_verification_test.cpp with tests for Result, EventBus,
  and ServiceContainer modules
- Update tests/CMakeLists.txt with conditional module test support
- Test same file in both header-only and module modes
- Verify API compatibility between header-only and module builds

The verification test validates:
- Core Result<T> pattern functionality
- Event bus publish/subscribe operations
- Service container registration and resolution
- Module version info (when KCENON_USE_MODULES is defined)

All 18 tests pass in header-only mode. Module mode tests require
Clang 16+, GCC 14+, or MSVC 2022 (AppleClang not supported).
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.

[MODULE-P3] Test verification with module builds

1 participant