nx_warc_reader_gate.nx
buildroot/runtime/nx_warc_reader_gate.nx
about
nx_warc_reader_gate.nx -- GREEN/RED gate for nx_warc_reader. Builds a SYNTHETIC plain-WARC fixture in memory (a
warcinfo record + a 'response' record for https://www.page3.com/ whose HTTP body is HTML referencing /girl.jpg),
parses it with warc_next_record, and asserts: exactly 2 records, the response record's WARC-Type / Target-URI /
HTTP status / referenced media are extracted byte-exact, and a non-WARC buffer yields no record (NEG-CTL).
Sovereign, deterministic, no network. license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_warc_reader.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
| 8 | func gw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } called by 1: main |
| 9 | func gn(v: i64) -> i64 { if v==0 { sys_write(1,"0" as *u8,1); return 0 } var m: i64=v; if m<0 { sys_write(1,"-" as *u8,1); m=0-m } let t: *u8=sys_mmap(24); var k: i64=0; while m>0 { t[k]=(48+(m%10)) as u8; m=m/10; k=k+1 } let o: *u8=sys_mmap(24); var w: i64=0; var q: i64=k-1; while q>=0 { o[w]=t[q]; w=w+1; q=q-1 } sys_write(1,o,w); return 0 } |
| 10 | func ap(buf: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8) { buf[off+i]=s[i]; i=i+1 } return off+i } called by 1: main |
| 11 | func apn(buf: *u8, off: i64, v: i64) -> i64 { if v==0 { buf[off]=0x30 as u8; return off+1 } var m: i64=v; let t: *u8=sys_mmap(24); var k: i64=0; while m>0 { t[k]=(48+(m%10)) as u8; m=m/10; k=k+1 } var o: i64=off; var q: i64=k-1; while q>=0 { buf[o]=t[q]; o=o+1; q=q-1 } return o } called by 1: main |
| 12 | func apcrlf(buf: *u8, off: i64) -> i64 { buf[off]=0x0d as u8; buf[off+1]=0x0a as u8; return off+2 } called by 1: main |
| 13 | func apbuf(dst: *u8, off: i64, src: *u8, m: i64) -> i64 { var i: i64=0; while i<m { dst[off+i]=src[i]; i=i+1 } return off+m } called by 1: main |
| 15 | func main() -> i64 |