nx_css_apply_test.nx
buildroot/runtime/nx_css_apply_test.nx
about
nx_css_apply_test.nx -- smoke for the Phase-2 cascade primitive.
Hand-builds CssRule + CssDeclaration + CssElement arrays into a
shared source buffer (so byte equality is well-defined), runs the
O(R x E) match-and-emit loop, then exercises the property lookup
helper.
Fixture stylesheet (semantically):
body { color: #ff0000; }
.head { font-size: 16px; }
Fixture elements:
el0: <body> (TAG body)
el1: <span class="head"> (CLASS head)
el2: <span class="other"> (CLASS other -- no match)
Expected cascade output:
3 computed entries:
(el0, color = #ff0000)
(el1, font-size = DIMENSION 16 px)
Wait -- el2 contributes zero entries; el0 contributes 1; el1
contributes 1. Total = 2 entries. Let's also verify the lookup
helper returns correct values per element.
dependencies 5 imports · 0 importers
imports: nx_syscalls.nxnx_css_tokenize.nxnx_css_parse.nxnx_css_selector_match.nxnx_css_apply.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 31 | func _put_byte(buf: *u8, i: i64, v: i64) -> i64 called by 1: _build_src |
| 46 | func _build_src() -> *u8 |
| 109 | func main() -> i64 |