Notes and intervals
This commit is contained in:
@@ -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)]);
|
||||
|
||||
Reference in New Issue
Block a user