code wiki / (root) / nx_test_driver_e2e.nx

nx_test_driver_e2e.nx

buildroot/runtime/nx_test_driver_e2e.nx

5649 B136 linesdepth 5pulls 8 transitivereach 0 importersview sourcekind tooltopic test
docsdependenciesstructsconstsfunctions

about

nx_test_driver_e2e.nx -- end-to-end smoke for the bits-up test driver. Composes all 5 primitives (nx_dom_query + nx_dom_click + nx_url_params + nx_test_harness + nx_game_harness) against an inline "fake game" that emits the same HTML shape as nx_tictactoe_render.nx. Why a fake game instead of importing nx_tictactoe.nx directly: the real game's render imports nx_syscalls.nx (RV64); the harness imports nx_syscalls_x86_64.nx; combining them creates duplicate-symbol errors. Cross-arch cleanup of the substrate's syscall layer is the queued follow-up; this smoke validates the *primitives* end-to-end and produces the same test-output format the .mjs harnesses do, proving the architecture works. The fake game models a 3x3 grid like tic-tac-toe. State is 9 cells + last-move indicator. Render emits buttons with class="cell" and data-cell-idx="N". Action 1 with arg0=N places an X at cell N.

dependencies 5 imports · 0 importers

nx_test_harness.nx nx_game_harness.nx nx_dom_query.nx nx_dom_click.nx nx_url_params.nx nx_test_driver_e2e.nx

imports: nx_test_harness.nxnx_game_harness.nxnx_dom_query.nxnx_dom_click.nxnx_url_params.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main nx_test_init nx_capture_start sys_mmap _gh_openat_rdwr sys_dup3 fake_render _fake_w _fake_wi _fake_w ↻ nx_capture_end sys_close sys_lseek sys_read nx_test_expect_eq _th_w _th_strlen _th_wln _th_w ↻ _th_wi nx_test_expect_class_count nx_dom_count_class sys_mmap ↻ nx_html_cursor_init nx_html_next_token _scan_name _is_name _is_void_element _lc _dq_is_elem nx_dom_find_attr _dq_strlen _dq_find_substr_ci _dq_byte_eq_ci _dq_lc nx_dom_class_contains _dq_strlen ↻ _dq_byte_eq _dq_is_word_boundary nx_test_expect_eq ↻

structs

none

consts

23const K_MAGIC_65536: i64 = 65536
25const _FAKE_RENDER_FD: i64 = 99

functions

30func _fake_w(s: *u8) -> i64
called by 2: _fake_wifake_render
36func _fake_wi(n: i64) -> i64
called by 1: fake_render calls 1: _fake_w
49func fake_render() -> i64
called by 1: main calls 2: _fake_w_fake_wi
78func fake_action(action: i64, arg0: i64) -> i64
called by 1: main
89func main() -> i64