diff options
author | ubq323 <ubq323@ubq323.website> | 2024-06-26 14:42:55 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2024-06-26 14:42:55 +0100 |
commit | 20584e520dfd44393aa66350b442e8a23e46c5a3 (patch) | |
tree | 9ae898ce259441e97cf9b8b371d10b17e50b563c /tests | |
parent | e97db36651ae3c6171644b6e4d7bf7cf613b061d (diff) |
remove implicit print and adjust tests accordingly
Diffstat (limited to 'tests')
-rw-r--r-- | tests/fizzbuzz.out | 1 | ||||
-rw-r--r-- | tests/four.bth | 2 | ||||
-rw-r--r-- | tests/func1.bth | 2 | ||||
-rw-r--r-- | tests/func2.bth | 2 | ||||
-rw-r--r-- | tests/func3.bth | 5 | ||||
-rw-r--r-- | tests/func4.bth | 1 | ||||
-rw-r--r-- | tests/func4.out | 1 | ||||
-rw-r--r-- | tests/mandel.out | 1 | ||||
-rw-r--r-- | tests/mandel_local.out | 1 | ||||
-rw-r--r-- | tests/multi.out | 1 | ||||
-rw-r--r-- | tests/vars.out | 1 | ||||
-rw-r--r-- | tests/vars1.bth | 4 | ||||
-rw-r--r-- | tests/vars2.bth | 4 | ||||
-rw-r--r-- | tests/vars3.bth | 4 | ||||
-rw-r--r-- | tests/vars4.bth | 2 |
15 files changed, 12 insertions, 20 deletions
diff --git a/tests/fizzbuzz.out b/tests/fizzbuzz.out index 51ff50b..0c33a54 100644 --- a/tests/fizzbuzz.out +++ b/tests/fizzbuzz.out @@ -27,4 +27,3 @@ buzz fizz 28 29 -nil diff --git a/tests/four.bth b/tests/four.bth index 8804fe4..c44e487 100644 --- a/tests/four.bth +++ b/tests/four.bth @@ -1 +1 @@ -(+ 2 2) +(puts (+ 2 2)) diff --git a/tests/func1.bth b/tests/func1.bth index e55f23a..1f175ab 100644 --- a/tests/func1.bth +++ b/tests/func1.bth @@ -1,2 +1,2 @@ (set f (fn (_) 42)) -(f 0) +(puts (f 0)) diff --git a/tests/func2.bth b/tests/func2.bth index 14f0799..ee995fa 100644 --- a/tests/func2.bth +++ b/tests/func2.bth @@ -2,4 +2,4 @@ (set f2 (fn (a b) (+ a b))) (puts (f1 6)) (puts (f2 20 40)) -(f1 (f2 2 1)) +(puts (f1 (f2 2 1))) diff --git a/tests/func3.bth b/tests/func3.bth index 59392e1..050a9bc 100644 --- a/tests/func3.bth +++ b/tests/func3.bth @@ -1,8 +1,7 @@ (set f1 (fn (a b) (* a b))) (set f2 (fn (x) - (set xx x) (let (a 3 g (fn (y) (+ y 7))) - (* (g a) (g xx))))) + (* (g a) (g x))))) (puts (f1 6 6)) -(f2 7) +(puts (f2 7)) diff --git a/tests/func4.bth b/tests/func4.bth index 640c889..fca67b1 100644 --- a/tests/func4.bth +++ b/tests/func4.bth @@ -3,4 +3,3 @@ (set g (fn (f x) (puts (f x)) (puts (f x)))) (g f1 26) (g f2 6) -nil diff --git a/tests/func4.out b/tests/func4.out index 6a32404..597085f 100644 --- a/tests/func4.out +++ b/tests/func4.out @@ -2,4 +2,3 @@ 36 60 60 -nil diff --git a/tests/mandel.out b/tests/mandel.out index f9b5e6d..48faa88 100644 --- a/tests/mandel.out +++ b/tests/mandel.out @@ -28,4 +28,3 @@ ....................................####.................... ......................................#..................... ............................................................ -nil diff --git a/tests/mandel_local.out b/tests/mandel_local.out index f9b5e6d..48faa88 100644 --- a/tests/mandel_local.out +++ b/tests/mandel_local.out @@ -28,4 +28,3 @@ ....................................####.................... ......................................#..................... ............................................................ -nil diff --git a/tests/multi.out b/tests/multi.out index ecb6945..94954ab 100644 --- a/tests/multi.out +++ b/tests/multi.out @@ -1,3 +1,2 @@ hello world -nil diff --git a/tests/vars.out b/tests/vars.out index bef4ee4..28bcf7a 100644 --- a/tests/vars.out +++ b/tests/vars.out @@ -2,4 +2,3 @@ 1229 100 90 -nil diff --git a/tests/vars1.bth b/tests/vars1.bth index 6e91bf0..7c0e264 100644 --- a/tests/vars1.bth +++ b/tests/vars1.bth @@ -1,2 +1,2 @@ -(+ 2 (let (a 10) - (* a a))) +(puts (+ 2 (let (a 10) + (* a a)))) diff --git a/tests/vars2.bth b/tests/vars2.bth index 2d5ebd1..cc4952e 100644 --- a/tests/vars2.bth +++ b/tests/vars2.bth @@ -1,4 +1,4 @@ -(+ 2 (* 6 (let (a 10 +(puts (+ 2 (* 6 (let (a 10 b 20 c 30) - (* b b)))) + (* b b))))) diff --git a/tests/vars3.bth b/tests/vars3.bth index 0c1c0b4..cfc4560 100644 --- a/tests/vars3.bth +++ b/tests/vars3.bth @@ -1,5 +1,5 @@ (set x 1) (set y 10) -(let (x 2) +(puts (let (x 2) (let (y 20) - (+ x y))) + (+ x y)))) diff --git a/tests/vars4.bth b/tests/vars4.bth index b4a2f25..a535d54 100644 --- a/tests/vars4.bth +++ b/tests/vars4.bth @@ -4,4 +4,4 @@ (puts x) (set x 30) (puts x)) -x +(puts x) |