tests: cover classify_null_binding precedence rules and 512-state truth table #3755
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!3755
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3753"
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 15:43 UTC · original
Ammmae0x:tests/null-binding-cause-unit→main· +1274 −0 · 5 files · 1 commits · merged 2026-12-01 17:04 UTCRefs #1149.
Standalone, strict C++17 portable unit, truth-table, and 1:1 header-mutation tests for
x2w_local::classify_null_bindingandNullCause(src/startup_stubs/null_binding_cause.h), with zero edits to existing files (5 new files only, +1274/-0).tests/null_binding_cause_cases.h,tests/startup_null_cause_labels_check.cpp,tests/startup_null_views_check.cpp, andCMakeLists.txtare untouched; thenull_binding_cause_unitprefix keeps CMake/CTest/target names disjoint.What landed — commit
34ec53a1, in thenull-binding-cause-unitworktree; main clone untouched.tests/null_binding_cause_unit_check.cppcovers 10 cases:enum_label_contract(none == -1, dense0..5,null_cause_count == 6, exact names"entry","buffer","token","wrapper","dimension","ring_full");ring_full_precedence(buffer ring failure beatsbound=true,from_table && !entry_readable, andfrom_table && token_magic && !token_known);buffer_bound_precedence(bound buffer beats unreadable entry and unknown token);table_entry_precedence(unreadable entry for buffer and texture alike, and a texture withbound=truestill reportstable_entry);unknown_token_from_table_precedence(unknown token from a table beats wrapper/dimension/!bound, while a direct non-table unknown token behaves cleanly and!token_magicskips the check);texture_token_magic;texture_wrapper_dimension;texture_ring_ignored(ring_failed=trueon a texture does NOT returnring_full);buffer_unreadable_default(defaultBindingFacts{}->buffer_unreadable); andtruth_table_512, an exhaustive 512-combination (2^9) truth table over the nine boolean fields against an independent priority specification, pinning absolute per-cause totalsnone84,table_entry80,buffer_unreadable44,unknown_token116,texture_wrapper40,dimension_mismatch20,ring_full128.-Wall -Wextra -Wpedantic -Werrorand MSVC/W4-safe._all, 7WILL_FAIL TRUEheader-copy controls (ring_full_texture,buffer_bound_precedence,table_entry_readable,unknown_token_from_table,texture_token_magic,texture_dimension,buffer_ring_before_bound— the last is the observable effect of reordering!texture && boundabovering_failed, modelled as the ring guard requiring!bound) with mutated copies at<mut>/startup_stubs/null_binding_cause.handBEFORE PRIVATEinclude. The meta check mirrors them 1:1 with real C++ copies (g++ if present elsecl, temp dirs removed infinally).Verification (Linux, this host)
g++ -std=c++17 -O2 -Wall -Wextra -Wpedantic -Werror:PASS: null_binding_cause_unit: 10/10 cases passedPASS: null_binding_cause_unit: 10 cases, 7/7 mutations killed (g++)_all+ 7WILL_FAILmutation controls)git diff --checkclean; merge-tree exits 0.python-linuxsuite: all 299 checks passedCaveat: no mingw on this host, so no Windows compile check; WIN-VERIFY run is the arbiter.
Windows Verification (
34ec53a1)git merge-tree --write-tree upstream/main HEAD->271d76dd(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),null_binding_cause_unit_meta_check.py(cl:10 cases, 7/7 mutations killed) passeddev18/18 passed (0.86s);release18/18 passed (0.76s); directnull_binding_cause_unit_check.exe(dev&release):PASS: null_binding_cause_unit: 10/10 cases passed. AI-assisted.