;;; portal-rng-load.lsp — resume xoshiro256** state from a file written
;;; by another (or same) impl, draw 5 values, and compare against the
;;; baseline captured by portal-rng-save.lsp.

(define expected-baseline '())
(load "/tmp/cross-rng.sexp")  ; sets rng state + binds expected-baseline

(define actual
  (list (random-int 1000000) (random-int 1000000) (random-int 1000000)
        (random-int 1000000) (random-int 1000000)))

(display "expected: ") (display expected-baseline) (newline)
(display "actual:   ") (display actual) (newline)

(if (equal? actual expected-baseline)
    (display "PASS: cross-impl RNG portal round-trip\n")
    (display "FAIL: cross-impl RNG portal round-trip\n"))
