~ chicken-core (chicken-5) 55b93b0d373961ea125c62251efe0673934e7943
commit 55b93b0d373961ea125c62251efe0673934e7943
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Wed Jan 13 17:44:55 2010 +0100
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Wed Jan 13 17:44:55 2010 +0100
added some compiler-syntax tests
diff --git a/tests/compiler-syntax-tests.scm b/tests/compiler-syntax-tests.scm
index 382fbb46..192dc63b 100644
--- a/tests/compiler-syntax-tests.scm
+++ b/tests/compiler-syntax-tests.scm
@@ -57,9 +57,20 @@
(module bar (xxx)
(import scheme chicken)
(define (xxx) 'yyy) ; ineffective - suboptimal
+ (define (abc) 123)
;(assert (eq? 'yyy (xxx)))
(define-compiler-syntax xxx
(syntax-rules ()
((_) 'zzz)))
+ (define-syntax alias
+ (syntax-rules ()
+ ((_ name x)
+ (define-compiler-syntax name
+ (syntax-rules ()
+ ((_ . args) (x . args)))))))
+ (alias pof +)
+ (alias pif xxx)
+ (assert (= 7 (pof 3 4)))
+ (assert (eq? 'zzz (pif)))
(print (xxx))
(assert (eq? 'zzz (xxx))))
Trap