prop_lex_number_test.nx
buildroot/runtime/prop_lex_number_test.nx
about
prop_lex_number_test.nx -- property test for lex_source on numbers.
Property: for every random decimal digit sequence D with value V,
lex_source(D) produces exactly one TK_INT with int_val == V.
Catches:
* Overflow in the digit accumulator (V doesn't match hand math)
* Off-by-one in digit iteration
* Mis-tokenising legal digit chars as something else
* Crash on edge cases (leading zeros, max i64 magnitude, etc.)
Runs 2000 iterations. Each iteration picks a random number of
digits (1..18 -- safely under i64 range for uniform digits).
dependencies 5 imports · 0 importers
imports: syscalls.nxtypes.nxlex_kinds.nxlex.nxprop_test.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
| 23 | func ascii_to_i64(buf: *u8, n: i64) -> i64 {
called by 1: main |
| 33 | func main() -> i64 { |