From c9c46a9a8bb1a668666abe0fa0508223eac90a6b Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 27 Nov 2026 23:42:40 +0100 Subject: [PATCH] resolve test: the billion-laughs shape needs the early stop --- crates/thing-core/tests/resolve.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/thing-core/tests/resolve.rs b/crates/thing-core/tests/resolve.rs index 373b347..1961050 100644 --- a/crates/thing-core/tests/resolve.rs +++ b/crates/thing-core/tests/resolve.rs @@ -326,14 +326,14 @@ fn cycles_and_depth_end_in_a_placeholder() { #[test] fn expansion_is_bounded() { big(|| { - // A composition using the previous one twice, 17 levels: 2^17 nodes. + // A composition using the previous one twice, 30 levels: 2^30 nodes, so only an early stop terminates. let mut chain = vec![composition("c0", &[], boxed("body", vec![]))]; - for n in 1..=17 { + for n in 1..=30 { let below = format!("c{}", n - 1); let body = boxed("body", vec![use_of("l", &below, vec![]), use_of("r", &below, vec![])]); chain.push(composition(&format!("c{n}"), &[], body)); } - let resolution = run(&surface(boxed("root", vec![use_of("u", "c17", vec![])]), &[]), &state_with(&chain)); + let resolution = run(&surface(boxed("root", vec![use_of("u", "c30", vec![])]), &[]), &state_with(&chain)); assert!(resolution.tree.is_none()); assert!(resolution.diagnostics.iter().any(|found| found.code == Code::ExpansionLimit));