tests: cover ClearCensus size classes, overflow, and delta reports #3867
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!3867
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3865"
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-12-02 15:12 UTC · original
Ammmae0x:tests/clear-census-unit→main· +1144 −0 · 5 files · 2 commits · merged 2026-12-02 15:31 UTCRefs #1149.
Finer-grained portable C++17 unit + header-mutation tests for
x2w_startup::clear_size_class,ClearKey, andClearCensus(
src/startup_stubs/clear_census.h), under the disjointclear_census_unitprefix. The existingtests/startup_clear_census_check.cppcoverage is untouched;this suite re-pins the same contract with one CTest test per
boundary instead of four combined cases.
What landed (5 new files only, +1144/-0, zero edits elsewhere):
tests/clear_census_unit_check.cpp— 12 casestests/cmake/clear_census_unit.cmake— one CTest test percase plus
clear_census_unit_all, and 6WILL_FAIL TRUEheader-mutation controls
tests/clear_census_unit_meta_check.py— audits thecontract and runs the real check plus every mutation natively
(1:1 with the CMake set)
tests/checks/python-linux/clear_census_unit.txtdocs/experiments/clear-census-unit.mdCases (12):
size_class_zero_one(0/1 are class 0),size_class_small(2..7),size_class_pow2(8, 16, 2^32,2^63),
size_class_pow2_plus1(9, 17, 2^32+1, 2^63+1),size_class_max(UINT64_MAXis class 64),key_equality(direct
operator==assertions varying exactly one field ata time: kind, format, dimension, width/height/depth class,
each
bitsword),note_merge_first_frame(repeat keepsfirst_seen_frame, counts calls),note_cap_overflow(128-shape cap, 129th/130th overflow, re-noting an overflowed
shape counts overflow again, repeating a stored shape does
not),
report_empty(no-op, either mode),report_delta_only_if_changed(suppression, then re-emit ofonly modified entries),
report_always(
only_if_changed=falsere-emits and does not consume thedelta),
report_kind_names_formats(all fourClearKindnames with exact literal lines, including
%08xzeropadding).
New pins over the combined check: size classes at the 2^32
boundary, direct per-field
operator==assertions, literal(rather than format-copy) report lines, and the re-note of an
overflowed shape.
Mutation controls (6, each killed by its control case):
size_class(drops the- 1, 1 lands one class too high),key_bits(drops thebitscomparison),note_merge(merge resetscallsto 1),overflow(overflow stops being counted),report_watermark(watermark updated on forced reportsinstead of periodic ones),
report_entry_skip(per-entrydelta test dropped, periodic reports emit the header only).
Linux verification (this host, g++ 13,
-std=c++17 -O2 -Wall -Wextra -Wpedantic -Werror):PASS: clear_census_unit: 12 cases, 6/6 mutations killed (g++)^clear_census_unit: 19/19 (12 casesform_coverage_check.py: passed;docs_links_check.py:checked 242 files and 921 links;
bidi_controls_check.py:checked 2960 files, no bidirectional controls
tools/run_checks_parallel.py,CI
python-linuxcommand): all 329 checks passeddiff --checkclean;git merge-tree --write-tree origin/main HEADexits 0Remote mapping: the task said push to
origin, but in thisclone
originis R0Y00/Xbox2Windows upstream, so as with allprior PRs it went to
fork(Ammmae0x/Xbox2Windows, branchtests/clear-census-unit, no force-push).Windows Verification (
828af8b37aec994d1f8759ba03e8bcbf6384a694)AI-assisted.
@R0Y00 on GitHub · 2026-12-02 15:23 UTC · original · approved these changes
Independent Windows/MSVC Debug validation:
ctest --preset dev --no-tests=error -R '^clear_census_unit' --output-on-failurepassed 19/19, including all six mutation controls. Compared the tested head828af8b3withbf1cb175: the only difference is the unrelated packed mesh fixture fix from main. Test targets and fixture inputs are identical.github-bot referenced this pull request2026-12-02 15:50:19 +00:00