Notes and intervals

This commit is contained in:
2026-01-22 01:38:55 +01:00
parent c73e25e207
commit 409e815414
9 changed files with 85965 additions and 0 deletions

View File

@@ -15,6 +15,31 @@ fn dup_underflow() {
expect_error("dup", "stack underflow");
}
#[test]
fn dupn() {
expect_stack("2 4 dupn", &[int(2), int(2), int(2), int(2)]);
}
#[test]
fn dupn_one() {
expect_stack("5 1 dupn", &[int(5)]);
}
#[test]
fn dupn_zero() {
expect_stack("5 0 dupn", &[]);
}
#[test]
fn dupn_underflow() {
expect_error("3 dupn", "stack underflow");
}
#[test]
fn bang_alias() {
expect_stack("c4 3 !", &[int(60), int(60), int(60)]);
}
#[test]
fn drop() {
expect_stack("1 2 drop", &[int(1)]);