diff options
author | dan <[email protected]> | 2023-06-03 18:31:02 -0400 |
---|---|---|
committer | dan <[email protected]> | 2023-06-03 18:31:02 -0400 |
commit | 01f5d30b7931af9c612c58c21264d7d73e5075de (patch) | |
tree | e9754076c95aee143fcdecfd8e8e920e5d4da364 | |
parent | f59e909a1adaf545dba4c77d83523eeb5063fbcb (diff) | |
download | forth-01f5d30b7931af9c612c58c21264d7d73e5075de.tar.gz forth-01f5d30b7931af9c612c58c21264d7d73e5075de.tar.bz2 forth-01f5d30b7931af9c612c58c21264d7d73e5075de.zip |
tests: add do loop tests
-rw-r--r-- | tests/do-loop-nested.forth | 20 | ||||
-rw-r--r-- | tests/do-loop.forth | 14 |
2 files changed, 34 insertions, 0 deletions
diff --git a/tests/do-loop-nested.forth b/tests/do-loop-nested.forth new file mode 100644 index 0000000..00cf68a --- /dev/null +++ b/tests/do-loop-nested.forth @@ -0,0 +1,20 @@ +INPUT +: timestables 5 1 do i 5 1 do dup i * . loop loop drop ; +timestables +OUTPUT +1 +2 +3 +4 +2 +4 +6 +8 +3 +6 +9 +12 +4 +8 +12 +16 diff --git a/tests/do-loop.forth b/tests/do-loop.forth new file mode 100644 index 0000000..4bf49b2 --- /dev/null +++ b/tests/do-loop.forth @@ -0,0 +1,14 @@ +INPUT +: decade 10 0 do i . loop ; +decade +OUTPUT +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 |