From a28fd94bb9711f62659bc89a275af9eb7134bece Mon Sep 17 00:00:00 2001 From: rich Date: Thu, 11 Oct 2007 07:40:21 +0000 Subject: [PATCH] Basic stack tests --- test_stack.f | 17 +++++++++++++++++ test_stack.f.out | 11 +++++++++++ 2 files changed, 28 insertions(+) create mode 100644 test_stack.f create mode 100644 test_stack.f.out diff --git a/test_stack.f b/test_stack.f new file mode 100644 index 0000000..e8e558d --- /dev/null +++ b/test_stack.f @@ -0,0 +1,17 @@ +( -*- text -*- ) + +: TEST + DEPTH . CR + + 42 DUP . . CR + 23 DROP DEPTH . CR + 1 2 SWAP . . CR + 1 2 OVER . . . CR + 1 2 3 ROT . . . CR + 1 2 3 -ROT . . . CR + 1 2 3 4 2DROP . . CR + 1 2 3 4 2DUP . . . . . . CR + 1 2 3 4 2SWAP . . . . CR + + DEPTH . CR +; diff --git a/test_stack.f.out b/test_stack.f.out new file mode 100644 index 0000000..e6d6204 --- /dev/null +++ b/test_stack.f.out @@ -0,0 +1,11 @@ +0 +42 42 +0 +1 2 +1 2 1 +2 1 3 +1 3 2 +2 1 +4 3 4 3 2 1 +2 1 4 3 +0 -- 1.8.3.1