tests: cover input_view_token facts and refusal precedence #3866
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!3866
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3864"
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:08 UTC · original
Ammmae0x:tests/input-view-token-unit→main· +1210 −0 · 5 files · 2 commits · merged 2026-12-02 15:33 UTCRefs #1149
Portable C++17 unit and 1:1 header-mutation tests for
input_view_token_factsandinput_view_token_refusalinsrc/startup_stubs/input_view_token.h, with zero edits to existing files (5 new files only, +1210/-0, prefixinput_view_token_unit). The existingtests/startup_input_view_token_check.cppcoverage is untouched.What landed
tests/input_view_token_unit_check.cpp— 12 cases, header-only againstsrc, no device, no temporary files, every shared constantstatic constexpr:facts_passthrough: default facts and passthrough ofknown,slot,desc_bytes,view_dimension,resource_pointer,placement.facts_wrapper_resource: the full 8-row truth table forresource = wrapper && owner_is_resourceanddesktop = resource && desktop.unknown_precedence:!knownbeats sampler, UAV, truncated CBV, and truncated non-buffer non-wrapper SRV shapes.slot_kinds: slots 22 (sampler), 19 (UAV), 20/21 (render or depth view), each before any size, dimension or ownership guard.cbv_boundary: slot 17 withdesc_bytes0/11 truncated, 12/13/40 binding; truncation precedes the dimension guard and a 12-byte view binds without the dimension or wrapper guards.unrecognized_slot: slots 0, 1, 16, 23, 100 andUINT32_MAX; slot 16 with 39 bytes is unrecognized before truncation, slot 0 with dimension 0 before the dimension guard.srv_truncation: slot 18 withdesc_bytes0/39 truncated, 40/41 reaching the dimension guard; 39 bytes truncated before the dimension and wrapper guards.non_buffer_dimension: dimensions 0, 2, 4 andUINT32_MAXkeep the historical "not a buffer view" sentence, before the wrapper guard.wrapper_guard: no resource pointer, non-wrapper owner, and neither — each refused as not a wrapper, before the resource and desktop guards.resource_guard: a wrapper of another kind refused as not a resource, even with a desktop flag and with placement 1/2 and no desktop object.desktop_placement: no desktop object with placement 1/2 refused as placed or copied, and with placement 0/3/UINT32_MAXas having no desktop resource.valid_views: 12-byte and 100-byte CBVs bind, and 40-byte and 41-byte buffer SRVs of a desktop resource bind, including with placement 1/2 once the desktop object is present.tests/cmake/input_view_token_unit.cmake— one CTest test per case plusinput_view_token_unit_all, and 6WILL_FAIL TRUEBEFORE PRIVATEheader-copy controls, mirrored 1:1 in the meta check:facts_resource,facts_desktop,cbv_boundary,srv_boundary,sampler_slot,desktop_placement.tests/input_view_token_unit_meta_check.py— audits the contract, compiles and runs the real check withg++ -std=c++17 -Wall -Wextra -Wpedantic -Werror(orclwith/W4on a host withoutg++), and kills each mutant natively; temporary directories removed in afinallyblock.tests/checks/python-linux/input_view_token_unit.txtdocs/experiments/input-view-token-unit.mdLinux verification (this host,
g++ -std=c++17)Scratch CMake + CTest (fragment standalone via symlinked
src/testswithenable_testing(); the full configure needs DXC): 19/19 (12 per-case +_all+ 6WILL_FAILcontrols).form_coverage_check.pypasses,docs_links_check.pypasses (242 files / 921 links),bidi_controls_check.pypasses (2960 files), full python-linux suite 329/329 viatools/run_checks_parallel.py(txt-listed checks alone: 120/120),git diff --checkclean,git merge-tree --write-tree origin/main HEADexits 0.Caveat: no mingw on this host, so no Windows compile check; WIN-VERIFY run is the arbiter.
Remote mapping: the task said push to
origin, but in this cloneoriginis R0Y00/Xbox2Windows, so as with all prior PRs it went tofork(Ammmae0x/Xbox2Windows, branchtests/input-view-token-unit, no force-push). Work was done in a dedicated worktree offorigin/main5770f14e; the main clone is untouched.Windows Verification (
55e7e211e53737b4f69482c6a01c25231c4dcc1c)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 '^input_view_token_unit' --output-on-failurepassed 19/19, including all six mutation controls. Compared the tested head55e7e211with7bfa5567: the only difference is the unrelated packed mesh fixture fix from main. Test targets and fixture inputs are identical.