tests: cover AddressIndex range groups, overflow clamps, and rollbacks #3749
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!3749
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3747"
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-01 14:47 UTC · original
Ammmae0x:tests/resource-address-index-unit→main· +1245 −0 · 5 files · 1 commits · merged 2026-12-01 17:04 UTCRefs #1149.
Portable C++17 unit, boundary, exception-safety, and 1:1 header-mutation tests for
x2w_startup::AddressIndex,address_span_touches, andstore_indexed(src/startup_stubs/resource_address_index.h), with zero edits to existing files (5 new files only, +1245/-0). The existingtests/startup_resource_address_index_check.cppcoverage is untouched, and the new check uses the disjointresource_address_index_unitprefix so test names stay disjoint.23 cases: the span-touch predicate (null base never touches, unknown-size resources touch only at their base, both span-end edges), insert/erase (duplicate no-ops, extent upgrades across the 64 KiB group boundary in both directions, same-group extent replacement, exact-pair erasure),
for_each_reaching(forward [from, to) edges, entries beforefromspanningfrom, entries ending exactly atfrom, the backward scan finding an older larger entry behind a shorter one in both the small and the large group, themax_extentcutoff, the UINT64_MAX overflow clamp, early stop, several keys at one base), andstore_indexed(base 0 writes the record without indexing, a throwing record insert rolls the index back for a new key while leaving a known key indexed).CMake registers one CTest test per case plus
resource_address_index_unit_all, and 6WILL_FAIL TRUEheader-copy controls (null_base, span_end, max_extent, backward_extent, overflow_clamp, rollback), each killed by its pinned control case.Linux checks (this host, g++ 13):
PASS: resource_address_index_unit: 23 cases, 6/6 mutations killed (g++)diff --checkclean; merge-tree vsorigin/mainexits 0; zero personal pathsNo mingw on this host, so no Windows compile check; WIN-VERIFY run is the arbiter.
AI-assisted.
Windows Verification (
f3162114)git merge-tree --write-tree upstream/main HEAD->0834f8d7(exit 0),git diff --check upstream/main...HEADcleanpy_compile,form_coverage_check.py,docs_links_check.py(209 files, 806 links),bidi_controls_check.py(2830 files) passeddev30/30 passed (1.03s);release30/30 passed (0.88s); directresource_address_index_unit_check.exe(dev&release):PASS: resource_address_index_unit: 23/23 cases passed. AI-assisted.