Feat: UI/UX and ducking compressor

This commit is contained in:
2026-02-24 02:57:27 +01:00
parent 848d0e773f
commit 2de49bdeba
24 changed files with 402 additions and 71 deletions

View File

@@ -209,6 +209,37 @@ fn bounce_underflow() {
expect_error("1 2 5 bounce", "stack underflow");
}
// pbounce
#[test]
fn pbounce_by_iter() {
let expected = [60, 64, 67, 72, 67, 64, 60, 64];
for (iter, &exp) in expected.iter().enumerate() {
let ctx = ctx_with(|c| c.iter = iter);
let f = run_ctx("60 64 67 72 4 pbounce", &ctx);
assert_eq!(stack_int(&f), exp, "pbounce at iter={}", iter);
}
}
#[test]
fn pbounce_single() {
for iter in 0..5 {
let ctx = ctx_with(|c| c.iter = iter);
let f = run_ctx("42 1 pbounce", &ctx);
assert_eq!(stack_int(&f), 42, "pbounce single at iter={}", iter);
}
}
#[test]
fn pbounce_with_bracket() {
let expected = [60, 64, 67, 64, 60, 64];
for (iter, &exp) in expected.iter().enumerate() {
let ctx = ctx_with(|c| c.iter = iter);
let f = run_ctx("[ 60 64 67 ] pbounce", &ctx);
assert_eq!(stack_int(&f), exp, "pbounce bracket at iter={}", iter);
}
}
// wchoose
#[test]