Skip to content

Add regression coverage for native VM module alias order#207

Draft
cursor[bot] wants to merge 1 commit into
next-gen-5from
cursor/regression-test-coverage-097c
Draft

Add regression coverage for native VM module alias order#207
cursor[bot] wants to merge 1 commit into
next-gen-5from
cursor/regression-test-coverage-097c

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented May 11, 2026

Risky behavior now covered

  • Native VM module loading now has deterministic coverage for the logical alias/probe order used by loadNative, including legacy qagame -> game, project-native game/server, cgame/client, and ui/frontend aliases.
  • The test also covers non-generic modules staying on the legacy platform-specific fallback path and capacity-limited alias construction.

Test files added/updated

  • Updated tests/unit/test_vm_native_module.c with alias/probe-order assertions.
  • Updated src/qcommon/vm_native_module.c/.h to expose the alias ordering helper used by production loading.
  • Updated CMakeLists.txt so unit_vm_native_module links the shared string helper implementation needed by case-insensitive alias checks.

Why this reduces regression risk

  • Recent native-module compatibility work affects core mod/full-conversion loading. A small ordering regression could break expected native artifact names even when the files exist.
  • The tested helper is now the same path consumed by loadNative, so future alias or ordering changes will fail in a focused unit test before reaching runtime.

Validation

  • cmake -S . -B build-coverage-tests -DBUILD_TESTING=ON -DBUILD_UNIT_TESTS=ON
  • cmake --build build-coverage-tests --target unit_vm_native_module
  • ctest --test-dir build-coverage-tests -R unit_vm_native_module --output-on-failure
Open in Web View Automation 

Co-authored-by: Tim Fox <timfox@outlook.com>
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.

1 participant