aboutsummaryrefslogtreecommitdiff
path: root/tests/test/let.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-06-12 21:09:35 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-06-13 04:11:35 +0200
commit73a4bfc3d8e9bb5365e33a11a6ad3b8340d5195b (patch)
treee52324edc63a240e5c0b88081c325f789168a4c5 /tests/test/let.scm
parentDocument timespec and zic. (diff)
downloadcalp-73a4bfc3d8e9bb5365e33a11a6ad3b8340d5195b.tar.gz
calp-73a4bfc3d8e9bb5365e33a11a6ad3b8340d5195b.tar.xz
Remove custom let*.
While it was nice, the most important part was the multi-valued let from srfi-71 (which is implemented in srfi-71)). The minor pattern matching structures could often be replaced with car+cdr, or a propper match.
Diffstat (limited to '')
-rw-r--r--tests/test/let.scm45
1 files changed, 0 insertions, 45 deletions
diff --git a/tests/test/let.scm b/tests/test/let.scm
deleted file mode 100644
index 5312409e..00000000
--- a/tests/test/let.scm
+++ /dev/null
@@ -1,45 +0,0 @@
-;;; Commentary:
-;; Tests my custom let*.
-;;; Code:
-
-(define-module (test let)
- :use-module (srfi srfi-64)
- :use-module (srfi srfi-88)
- :use-module ((hnh util) :select (let*)))
-
-(test-assert (let* ((a #t)) a))
-
-(test-assert (let* (((a . b) (cons #t #f))) a))
-
-(test-assert (let* (((a . b) (cons* #f #t))) b))
-
-(test-assert
- (let* ((a b c (values #f #t #f))) b))
-
-(test-assert
- (let* (((a b c) (list #f #t #f))) b))
-
-(test-assert (let* (((a) '(#t))) a))
-
-(test-equal '(2) (let* (((a . b) '(1 2))) b))
-
-(test-equal
- '(3 4)
- (let* (((a b . c) '(1 2 3 4))) c))
-
-(test-equal 10 (let* (x) (set! x 10) x))
-
-(test-equal
- 30
- (let* (x y) (set! x 10) (set! y 20) (+ x y)))
-
-(test-assert (let* (x) (not x)))
-
-(test-equal
- 6
- (let* ((x 1) y z)
- (set! y 2)
- (set! z 3)
- (+ x y z)))
-
-