v0.3.1: range/qfor/for in stdlib
This commit is contained in:
@@ -21,6 +21,9 @@
|
||||
0 if [ " if false FAIL" ] [ " if false PASS" ] puts cr # Test if false
|
||||
10 20 [ 5 - ] dip [] cons cons [ 5 20 ] streq if [ " dip PASS" puts cr ] [ " dip FAIL" puts cr ] # Test dip
|
||||
5 dup while [ 1 - dup ] 0 = if [ " while loop PASS" puts cr ] [ " while loop FAIL" puts cr ] # Test while
|
||||
0 [ + ] [ 1 2 3 ] qfor 6 = 0 [ + ] [] qfor 0 = and if [ " qfor PASS" puts cr ] [ " qfor FAIL" puts cr ] # Test qfor
|
||||
0 for [ 1 4 range ] [ + ] 6 = 0 for [ [] ] [ + ] 0 = and if [ " for PASS" puts cr ] [ " for FAIL" puts cr ] # Test for
|
||||
|
||||
|
||||
# 3. Mathematics & Arithmetic
|
||||
"Testing math and logic..." puts cr
|
||||
@@ -188,6 +191,8 @@ if [
|
||||
] [
|
||||
" rev, lcat and s2q FAIL" puts cr
|
||||
]
|
||||
2 5 range [ 2 3 4 ] streq 5 2 range [] streq and 5 5 range [] streq and if [ " range PASS" puts cr ] [ " range FAIL" puts cr ] # Test range
|
||||
|
||||
|
||||
# 9. Bitwise Operations
|
||||
"Testing bitwise operations..." puts cr
|
||||
|
||||
Reference in New Issue
Block a user