tests: add unit and mutation tests for clear_census.h #3660
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!3660
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3658"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Ammmae0x on GitHub · 2026-11-30 22:04 UTC · original
Ammmae0x:tests/startup-clear-census→main· +791 −0 · 5 files · 1 commits · merged 2026-12-01 01:17 UTCRefs #1149
Adds a portable C++17 device-free unit and configure-time header-mutation test suite for
x2w_startup::clear_size_classandx2w_startup::ClearCensus(src/startup_stubs/clear_census.h), without altering the header or device code. 5 new files only, +791/−0.What changed
tests/startup_clear_census_check.cpp: 4 cases —size_class_bounds(exact boundaries 0..UINT64_MAX),dedup_and_fields(all 4ClearKindvalues, first-seen frame + call counts, one-field-difference distinctness, exactx2w-render clear ...line format),capacity_overflow(128 shapes, overflow counting, no overwrite, repeat increments calls),periodic_vs_forced(empty emits nothing, delta emits only the changed entry, forced emits all, forced does not consume the delta).tests/cmake/startup_clear_census.cmake: per-case +startup_clear_census_alltests, plus 6WILL_FAIL TRUEmutation controls mirroringera_physical_owns_last_page_control.tests/startup_clear_census_meta_check.py+tests/checks/python-linux/startup_clear_census.txt: Linux contract audit that compiles and runs the real C++ test and every mutated header copy withg++ -std=c++17.docs/experiments/startup-clear-census.md: cases, controls, and check commands.Tests (Linux)
PASS: startup clear census: 4 cases, 6/6 mutations killed (g++)tools/run_checks_parallel.py --from-dir tests/checks/python-linux: all 73 checks passedform_coverage_check.py,docs_links_check.py(192 files/745 links),bidi_controls_check.py(2762 files): pass; py_compile ok; diff --check clean; merge-tree exits 0; zero personal paths.Windows Verification (
a77b865676dd67bfa2ef38ecb9c49a299bfd0cac)startup_clear_census_check+ all 6 mutation targets built clean)ctest --preset dev --no-tests=error -R '^startup_clear_census' --output-on-failure: 11/11 passed (0.66 s; 4/4 cases,all, 6/6 mutations killed)ctest --preset release --no-tests=error -R '^startup_clear_census' --output-on-failure: 11/11 passed (0.69 s; 4/4 cases,all, 6/6 mutations killed)startup_clear_census_check.exe(dev & release):PASS: startup_clear_census: 4/4 cases passedform_coverage_check.py,docs_links_check.py(193 files, 749 links),bidi_controls_check.py(2765 files): passedAI-assisted.
@R0Y00 on GitHub · 2026-12-01 01:14 UTC · original · approved these changes
Reviewed the clear census fixtures and their CMake controls.
ctest --test-dir <build> --no-tests=error -j1 -R '^startup_clear_census_' --output-on-failurepassed all 11 cases. All six changed-behavior controls were caught.