unlock parameter tests

This commit is contained in:
Yuichi Nishiwaki 2014-06-28 20:46:04 +09:00
parent c44803d238
commit 7da5786ef3
1 changed files with 12 additions and 12 deletions

View File

@ -364,18 +364,18 @@
;; (define radix
;; (make-parameter
;; 10
;; (lambda (x)
;; (if (and (integer? x) (<= 2 x 16))
;; x
;; (error "invalid radix")))))
;; (define (f n) (number->string n (radix)))
;; (test "12" (f 12))
;; (test "1100" (parameterize ((radix 2))
;; (f 12)))
;; (test "12" (f 12))
(define radix
(make-parameter
10
(lambda (x)
(if (and (integer? x) (<= 2 x 16))
x
(error "invalid radix")))))
(define (f n) (number->string n (radix)))
(test "12" (f 12))
(test "1100" (parameterize ((radix 2))
(f 12)))
(test "12" (f 12))
(test '(list 3 4) `(list ,(+ 1 2) 4))
(let ((name 'a)) (test '(list a (quote a)) `(list ,name ',name)))
(test '(a 3 4 5 6 b) `(a ,(+ 1 2) ,@(map abs '(4 -5 6)) b))