summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/arr1.bth10
-rw-r--r--tests/arr2.bth2
-rw-r--r--tests/arr3.bth2
-rw-r--r--tests/arr4.bth6
-rw-r--r--tests/arr5.bth2
-rw-r--r--tests/for2.bth2
-rw-r--r--tests/iota_imp.bth2
-rw-r--r--tests/iota_rec.bth2
-rw-r--r--tests/map.bth2
-rw-r--r--tests/whilelet.bth2
10 files changed, 16 insertions, 16 deletions
diff --git a/tests/arr1.bth b/tests/arr1.bth
index 1120549..06a830e 100644
--- a/tests/arr1.bth
+++ b/tests/arr1.bth
@@ -1,9 +1,9 @@
(set! A (arr))
(say A)
-(say (len A))
-(append A 10)
-(append A 20)
-(append A 30)
+(say (# A))
+(append! A 10)
+(append! A 20)
+(append! A 30)
(say A)
-(say (len A))
+(say (# A))
(say (A 1))
diff --git a/tests/arr2.bth b/tests/arr2.bth
index a405bde..6297c49 100644
--- a/tests/arr2.bth
+++ b/tests/arr2.bth
@@ -1 +1 @@
-(say (append [1 2 3 4] 99))
+(say (append! [1 2 3 4] 99))
diff --git a/tests/arr3.bth b/tests/arr3.bth
index c2bce88..787165e 100644
--- a/tests/arr3.bth
+++ b/tests/arr3.bth
@@ -1 +1 @@
-(say (append [1 2 (+ 1 2) (let (x 2) (* x x))] (+ 2 3)))
+(say (append! [1 2 (+ 1 2) (let (x 2) (* x x))] (+ 2 3)))
diff --git a/tests/arr4.bth b/tests/arr4.bth
index 2521e63..979a640 100644
--- a/tests/arr4.bth
+++ b/tests/arr4.bth
@@ -1,4 +1,4 @@
(say
- (let (A (append [1 2 3 (let (x 2) (* x x)) 5] 6))
- (let (B (append A 7)) (append B 8))
- (append (append A 9) 10)))
+ (let (A (append! [1 2 3 (let (x 2) (* x x)) 5] 6))
+ (let (B (append! A 7)) (append! B 8))
+ (append! (append! A 9) 10)))
diff --git a/tests/arr5.bth b/tests/arr5.bth
index 15c85e5..8da56a0 100644
--- a/tests/arr5.bth
+++ b/tests/arr5.bth
@@ -1,3 +1,3 @@
(set! A [1 2 3])
-(let (B A) (append B 10))
+(let (B A) (append! B 10))
(say A)
diff --git a/tests/for2.bth b/tests/for2.bth
index 66c490f..8f842f6 100644
--- a/tests/for2.bth
+++ b/tests/for2.bth
@@ -1,3 +1,3 @@
(let (a [6 7 8 9])
- (for (i (len a))
+ (for (i (# a))
(say (+ (a i) (* i 10)))))
diff --git a/tests/iota_imp.bth b/tests/iota_imp.bth
index cc62db9..eea67f8 100644
--- a/tests/iota_imp.bth
+++ b/tests/iota_imp.bth
@@ -1,4 +1,4 @@
(let (a [])
(for (i 10)
- (append a i))
+ (append! a i))
(say a))
diff --git a/tests/iota_rec.bth b/tests/iota_rec.bth
index 8e274a4..5ce196d 100644
--- a/tests/iota_rec.bth
+++ b/tests/iota_rec.bth
@@ -1,6 +1,6 @@
(defn (iota' arr i max)
(if (< i max)
- (iota' (append arr i) (+ i 1) max)
+ (iota' (append! arr i) (+ i 1) max)
arr))
(set! _G_iota' iota')
(defn (iota n) (_G_iota' [] 0 n))
diff --git a/tests/map.bth b/tests/map.bth
index 9f739bb..c3170bd 100644
--- a/tests/map.bth
+++ b/tests/map.bth
@@ -1,5 +1,5 @@
(set! map' (fn (f ix in out)
- (if (< ix (len in))
+ (if (< ix (# in))
(let (elem (in ix)
felem (f elem)
newix (+ 1 ix))
diff --git a/tests/whilelet.bth b/tests/whilelet.bth
index f4188ad..e717a6e 100644
--- a/tests/whilelet.bth
+++ b/tests/whilelet.bth
@@ -2,7 +2,7 @@
(let (i 0
a [])
(while (< i 10)
- (append a i)
+ (append! a i)
(set! i (+ i 1)))
(let (x 100
y 200