Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions TEST-NEEDS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ compliance, 16 tests)
performance, correctness, 13 tests)
* Benchmarks: `+src/ephapax-parser/benches/parse_bench.rs+`,
`+src/ephapax-vram-cache/benches/cache_bench.rs+`
* Total: *644 tests* (`+cargo test --workspace --all-targets+`);
* Total: *647 tests* (`+cargo test --workspace --all-targets+`);
pass/fail enforced by `+rust-ci.yml+`
* Documented all-target tests: 644
* Documented all-target tests: 647

=== CRG Testing Taxonomy — Status

Expand Down Expand Up @@ -83,7 +83,7 @@ eliminator-fork invariant + its gated capstone, per PROOF-NEEDS.adoc §4)
==== Build & Execution

* [x] cargo build — compiles
* [x] cargo test –workspace –all-targets — 644 pass, 0 fail
* [x] cargo test –workspace –all-targets — 647 pass, 0 fail
* [x] idris2/ephapax-parse-tests.ipkg — compiles AND runs green
(2026-07-07, idris2 0.8.0 + zig-built libephapax_tokbuf.so); CI-gated
compile-only by abi-verify.yml `+idris2-parse-front+` (runtime run stays
Expand Down
31 changes: 31 additions & 0 deletions src/ephapax-cli/tests/recursive_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,37 @@ fn data_types_that_refer_to_each_other_run() {
}
}

/// The interpreter builds and reads a list of 100000 elements. A value
/// shares its parts, so the read of a variable does not copy the list,
/// and no step uses native recursion. (With boxed parts, a list of 2000
/// elements needed 3 GB, and one of 20000 aborted the process.)
#[test]
fn the_interpreter_runs_a_long_list() {
let tmp = tempfile::tempdir().expect("tempdir");
std::fs::write(
tmp.path().join("long.eph"),
"data List = Nil | Cons(I32, List)\n\n\
fn build(n: I32): List = if n == 0 then Nil else Cons(n, build(n - 1))\n\n\
fn length(l: List): I32 =\n match l of\n | Nil => 0\n \
| Cons(x, rest) => 1 + length(rest)\n end\n\n\
fn main(): I32 = length(build(100000))\n",
)
.expect("write program");
let out = ephapax(
tmp.path(),
&["run", "--interp", "--unstable-core", "long.eph"],
);
assert_eq!(
(
out.status.code(),
String::from_utf8_lossy(&out.stdout).trim()
),
(Some(0), "100000"),
"stderr:\n{}",
String::from_utf8_lossy(&out.stderr)
);
}

/// The recursive forms that have no lowering yet are refused by name.
#[test]
fn a_recursive_form_with_no_lowering_is_refused_by_name() {
Expand Down
Loading
Loading