Feat: polyphony + iterator reset

This commit is contained in:
2026-02-02 00:33:46 +01:00
parent 8452033473
commit ccce0df79d
9 changed files with 132 additions and 145 deletions

View File

@@ -74,22 +74,6 @@ fn dupn_alias() {
expect_int("5 3 ! + +", 15);
}
#[test]
fn tcycle_creates_cycle_list() {
let outputs = expect_outputs(r#"0.0 at 60 64 67 3 tcycle note sine s ."#, 1);
assert!(outputs[0].contains("note/60"));
}
#[test]
fn tcycle_with_multiple_emits() {
let f = forth();
let ctx = default_ctx();
let outputs = f.evaluate(r#"0 0.5 2 at 60 64 2 tcycle note sine s ."#, &ctx).unwrap();
assert_eq!(outputs.len(), 2);
assert!(outputs[0].contains("note/60"));
assert!(outputs[1].contains("note/64"));
}
#[test]
fn cycle_zero_count_error() {
expect_error("1 2 3 0 cycle", "cycle count must be > 0");
@@ -99,8 +83,3 @@ fn cycle_zero_count_error() {
fn choose_zero_count_error() {
expect_error("1 2 3 0 choose", "choose count must be > 0");
}
#[test]
fn tcycle_zero_count_error() {
expect_error("1 2 3 0 tcycle", "tcycle count must be > 0");
}