;; Do not edit this file generated by gen-test.scm
(define *test-error* '())
(define *test-ret* '())
(display "test ")
(display '(#t))
(display ", expects ")
(display '#t)
(set! *test-ret* #t)(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '#t *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(#t))))(display "test ")
(display '((and)))
(display ", expects ")
(display '#t)
(set! *test-ret* (and))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(and) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((and)))))(display "test ")
(display '(3))
(display ", expects ")
(display '3)
(set! *test-ret* 3)(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '3 *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(3))))(display "test ")
(display '(4))
(display ", expects ")
(display '4)
(set! *test-ret* 4)(if (equal? *test-ret* '4) (display " ===> ok\n") (begin (set! *test-error* (cons '4 *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(4))))(display "test ")
(display '((if #f #f #t)))
(display ", expects ")
(display '#t)
(set! *test-ret* (if #f #f #t))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(if #f #f #t) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((if #f #f #t)))))(display "test ")
(display '(((lambda (a) 3) 4)))
(display ", expects ")
(display '3)
(set! *test-ret* ((lambda (a) 3) 4))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda (a) 3) 4) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda (a) 3) 4)))))(display "test ")
(display '(((lambda (a) (if 3 7 5)) 6)))
(display ", expects ")
(display '7)
(set! *test-ret* ((lambda (a) (if 3 7 5)) 6))(if (equal? *test-ret* '7) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda (a) (if 3 7 5)) 6) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda (a) (if 3 7 5)) 6)))))(display "test ")
(display '(((lambda () 3))))
(display ", expects ")
(display '3)
(set! *test-ret* ((lambda () 3)))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda () 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda () 3))))))(display "test ")
(display '(((lambda (a) a) 101)))
(display ", expects ")
(display '101)
(set! *test-ret* ((lambda (a) a) 101))(if (equal? *test-ret* '101) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda (a) a) 101) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda (a) a) 101)))))(display "test ")
(display '((((lambda () (lambda () 102))))))
(display ", expects ")
(display '102)
(set! *test-ret* (((lambda () (lambda () 102)))))(if (equal? *test-ret* '102) (display " ===> ok\n") (begin (set! *test-error* (cons '(((lambda () (lambda () 102)))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((((lambda () (lambda () 102))))))))(display "test ")
(display '((((lambda () (lambda (a) 102))) 101)))
(display ", expects ")
(display '102)
(set! *test-ret* (((lambda () (lambda (a) 102))) 101))(if (equal? *test-ret* '102) (display " ===> ok\n") (begin (set! *test-error* (cons '(((lambda () (lambda (a) 102))) 101) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((((lambda () (lambda (a) 102))) 101)))))(display "test ")
(display '((((lambda () (lambda (a) a))) 103)))
(display ", expects ")
(display '103)
(set! *test-ret* (((lambda () (lambda (a) a))) 103))(if (equal? *test-ret* '103) (display " ===> ok\n") (begin (set! *test-error* (cons '(((lambda () (lambda (a) a))) 103) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((((lambda () (lambda (a) a))) 103)))))(display "test ")
(display '((((lambda (a) (lambda () a)) 10))))
(display ", expects ")
(display '10)
(set! *test-ret* (((lambda (a) (lambda () a)) 10)))(if (equal? *test-ret* '10) (display " ===> ok\n") (begin (set! *test-error* (cons '(((lambda (a) (lambda () a)) 10)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((((lambda (a) (lambda () a)) 10))))))(display "test ")
(display '(((lambda (a) (set! a 12) a) 2)))
(display ", expects ")
(display '12)
(set! *test-ret* ((lambda (a) (set! a 12) a) 2))(if (equal? *test-ret* '12) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda (a) (set! a 12) a) 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda (a) (set! a 12) a) 2)))))(display "test ")
(display '(((lambda (a) ((lambda () (set! a 101)))) '())))
(display ", expects ")
(display '101)
(set! *test-ret* ((lambda (a) ((lambda () (set! a 101)))) '()))(if (equal? *test-ret* '101) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda (a) ((lambda () (set! a 101)))) '()) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda (a) ((lambda () (set! a 101)))) '())))))(display "test ")
(display '((call/cc (lambda (c) (c 4)))))
(display ", expects ")
(display '4)
(set! *test-ret* (call/cc (lambda (c) (c 4))))(if (equal? *test-ret* '4) (display " ===> ok\n") (begin (set! *test-error* (cons '(call/cc (lambda (c) (c 4))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((call/cc (lambda (c) (c 4)))))))(display "test ")
(display '((receive a (call/cc (lambda (c) (c 1 2 3))) a)))
(display ", expects ")
(display '(1 2 3))
(set! *test-ret* (receive a (call/cc (lambda (c) (c 1 2 3))) a))(if (equal? *test-ret* '(1 2 3)) (display " ===> ok\n") (begin (set! *test-error* (cons '(receive a (call/cc (lambda (c) (c 1 2 3))) a) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((receive a (call/cc (lambda (c) (c 1 2 3))) a)))))(display "test ")
(display '((receive a (call/cc (lambda (c) (c 1 2))) a)))
(display ", expects ")
(display '(1 2))
(set! *test-ret* (receive a (call/cc (lambda (c) (c 1 2))) a))(if (equal? *test-ret* '(1 2)) (display " ===> ok\n") (begin (set! *test-error* (cons '(receive a (call/cc (lambda (c) (c 1 2))) a) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((receive a (call/cc (lambda (c) (c 1 2))) a)))))(display "test ")
(display '((receive a (call/cc (lambda (c) (c 1))) a)))
(display ", expects ")
(display '(1))
(set! *test-ret* (receive a (call/cc (lambda (c) (c 1))) a))(if (equal? *test-ret* '(1)) (display " ===> ok\n") (begin (set! *test-error* (cons '(receive a (call/cc (lambda (c) (c 1))) a) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((receive a (call/cc (lambda (c) (c 1))) a)))))(display "test ")
(display '(((lambda (cont) (if (call/cc (lambda (c) (set! cont c))) (cont #f) 3)) '())))
(display ", expects ")
(display '3)
(set! *test-ret* ((lambda (cont) (if (call/cc (lambda (c) (set! cont c))) (cont #f) 3)) '()))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda (cont) (if (call/cc (lambda (c) (set! cont c))) (cont #f) 3)) '()) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda (cont) (if (call/cc (lambda (c) (set! cont c))) (cont #f) 3)) '())))))(display "test ")
(display '(((lambda (cont) (if (call/cc (lambda (c) (set! cont c))) ((lambda () ((lambda () (cont #f))))) 102)) '())))
(display ", expects ")
(display '102)
(set! *test-ret* ((lambda (cont) (if (call/cc (lambda (c) (set! cont c))) ((lambda () ((lambda () (cont #f))))) 102)) '()))(if (equal? *test-ret* '102) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda (cont) (if (call/cc (lambda (c) (set! cont c))) ((lambda () ((lambda () (cont #f))))) 102)) '()) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda (cont) (if (call/cc (lambda (c) (set! cont c))) ((lambda () ((lambda () (cont #f))))) 102)) '())))))(display "test ")
(display '(((lambda () 3 4 5))))
(display ", expects ")
(display '5)
(set! *test-ret* ((lambda () 3 4 5)))(if (equal? *test-ret* '5) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda () 3 4 5)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda () 3 4 5))))))(display "test ")
(display '((number? 3)))
(display ", expects ")
(display '#t)
(set! *test-ret* (number? 3))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(number? 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((number? 3)))))(display "test ")
(display '((number? 'a)))
(display ", expects ")
(display '#f)
(set! *test-ret* (number? 'a))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(number? 'a) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((number? 'a)))))(display "test ")
(display '((number? 'a)))
(display ", expects ")
(display '#f)
(set! *test-ret* (number? 'a))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(number? 'a) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((number? 'a)))))(display "test ")
(display '((+ 4)))
(display ", expects ")
(display '4)
(set! *test-ret* (+ 4))(if (equal? *test-ret* '4) (display " ===> ok\n") (begin (set! *test-error* (cons '(+ 4) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((+ 4)))))(display "test ")
(display '((+ 4 3)))
(display ", expects ")
(display '7)
(set! *test-ret* (+ 4 3))(if (equal? *test-ret* '7) (display " ===> ok\n") (begin (set! *test-error* (cons '(+ 4 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((+ 4 3)))))(display "test ")
(display '((+ 4 3 10)))
(display ", expects ")
(display '17)
(set! *test-ret* (+ 4 3 10))(if (equal? *test-ret* '17) (display " ===> ok\n") (begin (set! *test-error* (cons '(+ 4 3 10) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((+ 4 3 10)))))(display "test ")
(display '((+ 1 1 1 1)))
(display ", expects ")
(display '4)
(set! *test-ret* (+ 1 1 1 1))(if (equal? *test-ret* '4) (display " ===> ok\n") (begin (set! *test-error* (cons '(+ 1 1 1 1) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((+ 1 1 1 1)))))(display "test ")
(display '((- 10 5)))
(display ", expects ")
(display '5)
(set! *test-ret* (- 10 5))(if (equal? *test-ret* '5) (display " ===> ok\n") (begin (set! *test-error* (cons '(- 10 5) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((- 10 5)))))(display "test ")
(display '((- 10 5 2)))
(display ", expects ")
(display '3)
(set! *test-ret* (- 10 5 2))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(- 10 5 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((- 10 5 2)))))(display "test ")
(display '((cons 'a 'b)))
(display ", expects ")
(display '(a . b))
(set! *test-ret* (cons 'a 'b))(if (equal? *test-ret* '(a . b)) (display " ===> ok\n") (begin (set! *test-error* (cons '(cons 'a 'b) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((cons 'a 'b)))))(display "test ")
(display '((car (cons 2 3))))
(display ", expects ")
(display '2)
(set! *test-ret* (car (cons 2 3)))(if (equal? *test-ret* '2) (display " ===> ok\n") (begin (set! *test-error* (cons '(car (cons 2 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((car (cons 2 3))))))(display "test ")
(display '((cdr (cons 2 3))))
(display ", expects ")
(display '3)
(set! *test-ret* (cdr (cons 2 3)))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(cdr (cons 2 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((cdr (cons 2 3))))))(display "test ")
(display '((cadr (cons 2 (cons 3 '())))))
(display ", expects ")
(display '3)
(set! *test-ret* (cadr (cons 2 (cons 3 '()))))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(cadr (cons 2 (cons 3 '()))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((cadr (cons 2 (cons 3 '())))))))(display "test ")
(display '((= 3 3)))
(display ", expects ")
(display '#t)
(set! *test-ret* (= 3 3))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(= 3 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((= 3 3)))))(display "test ")
(display '((= 3 4)))
(display ", expects ")
(display '#f)
(set! *test-ret* (= 3 4))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(= 3 4) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((= 3 4)))))(display "test ")
(display '((let ((a 3)) a)))
(display ", expects ")
(display '3)
(set! *test-ret* (let ((a 3)) a))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a 3)) a) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a 3)) a)))))(display "test ")
(display '((let ((a 3) (b 1)) b)))
(display ", expects ")
(display '1)
(set! *test-ret* (let ((a 3) (b 1)) b))(if (equal? *test-ret* '1) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a 3) (b 1)) b) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a 3) (b 1)) b)))))(display "test ")
(display '((let ((a 3) (b 1)) a)))
(display ", expects ")
(display '3)
(set! *test-ret* (let ((a 3) (b 1)) a))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a 3) (b 1)) a) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a 3) (b 1)) a)))))(display "test ")
(display '((let ((a 3) (b 1)) a b)))
(display ", expects ")
(display '1)
(set! *test-ret* (let ((a 3) (b 1)) a b))(if (equal? *test-ret* '1) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a 3) (b 1)) a b) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a 3) (b 1)) a b)))))(display "test ")
(display '((let1 a 3 a)))
(display ", expects ")
(display '3)
(set! *test-ret* (let1 a 3 a))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 a 3 a) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 a 3 a)))))(display "test ")
(display '((let1 a 3 (let1 b 4 b))))
(display ", expects ")
(display '4)
(set! *test-ret* (let1 a 3 (let1 b 4 b)))(if (equal? *test-ret* '4) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 a 3 (let1 b 4 b)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 a 3 (let1 b 4 b))))))(display "test ")
(display '((let1 a 3 (let1 b 4 a))))
(display ", expects ")
(display '3)
(set! *test-ret* (let1 a 3 (let1 b 4 a)))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 a 3 (let1 b 4 a)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 a 3 (let1 b 4 a))))))(display "test ")
(display '((let1 a 3 (let1 b 4 (+ a b)))))
(display ", expects ")
(display '7)
(set! *test-ret* (let1 a 3 (let1 b 4 (+ a b))))(if (equal? *test-ret* '7) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 a 3 (let1 b 4 (+ a b))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 a 3 (let1 b 4 (+ a b)))))))(display "test ")
(display '((let1 a 3 (let1 b 4 (let1 c 5 (+ a b c))))))
(display ", expects ")
(display '12)
(set! *test-ret* (let1 a 3 (let1 b 4 (let1 c 5 (+ a b c)))))(if (equal? *test-ret* '12) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 a 3 (let1 b 4 (let1 c 5 (+ a b c)))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 a 3 (let1 b 4 (let1 c 5 (+ a b c))))))))(display "test ")
(display '((let ((a 3) (b 4)) (let1 c 5 (+ a b c)))))
(display ", expects ")
(display '12)
(set! *test-ret* (let ((a 3) (b 4)) (let1 c 5 (+ a b c))))(if (equal? *test-ret* '12) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a 3) (b 4)) (let1 c 5 (+ a b c))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a 3) (b 4)) (let1 c 5 (+ a b c)))))))(display "test ")
(display '((let ((a 3) (b 4)) (+ (let1 c 5 (+ a b c)) 1))))
(display ", expects ")
(display '13)
(set! *test-ret* (let ((a 3) (b 4)) (+ (let1 c 5 (+ a b c)) 1)))(if (equal? *test-ret* '13) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a 3) (b 4)) (+ (let1 c 5 (+ a b c)) 1)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a 3) (b 4)) (+ (let1 c 5 (+ a b c)) 1))))))(display "test ")
(display '((let1 a 3 (let1 a 4 a))))
(display ", expects ")
(display '4)
(set! *test-ret* (let1 a 3 (let1 a 4 a)))(if (equal? *test-ret* '4) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 a 3 (let1 a 4 a)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 a 3 (let1 a 4 a))))))(display "test ")
(display '((let1 a 3 (set! a (+ a 1)) (+ a 1))))
(display ", expects ")
(display '5)
(set! *test-ret* (let1 a 3 (set! a (+ a 1)) (+ a 1)))(if (equal? *test-ret* '5) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 a 3 (set! a (+ a 1)) (+ a 1)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 a 3 (set! a (+ a 1)) (+ a 1))))))(display "test ")
(display '((let1 a 3 (let1 b 4 (set! b a) b))))
(display ", expects ")
(display '3)
(set! *test-ret* (let1 a 3 (let1 b 4 (set! b a) b)))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 a 3 (let1 b 4 (set! b a) b)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 a 3 (let1 b 4 (set! b a) b))))))(display "test ")
(display '((let ((a 2) (b 3)) a)))
(display ", expects ")
(display '2)
(set! *test-ret* (let ((a 2) (b 3)) a))(if (equal? *test-ret* '2) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a 2) (b 3)) a) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a 2) (b 3)) a)))))(display "test ")
(display '((let ((a 0) (b 1) (c 2)) c)))
(display ", expects ")
(display '2)
(set! *test-ret* (let ((a 0) (b 1) (c 2)) c))(if (equal? *test-ret* '2) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a 0) (b 1) (c 2)) c) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a 0) (b 1) (c 2)) c)))))(display "test ")
(display '((let1 a 1 (let1 b 2 (let1 c a (+ a b c))))))
(display ", expects ")
(display '4)
(set! *test-ret* (let1 a 1 (let1 b 2 (let1 c a (+ a b c)))))(if (equal? *test-ret* '4) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 a 1 (let1 b 2 (let1 c a (+ a b c)))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 a 1 (let1 b 2 (let1 c a (+ a b c))))))))(display "test ")
(display '((let ((a 3)) a)))
(display ", expects ")
(display '3)
(set! *test-ret* (let ((a 3)) a))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a 3)) a) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a 3)) a)))))(display "test ")
(display '((let ((a 3) (b 4)) (+ a b))))
(display ", expects ")
(display '7)
(set! *test-ret* (let ((a 3) (b 4)) (+ a b)))(if (equal? *test-ret* '7) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a 3) (b 4)) (+ a b)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a 3) (b 4)) (+ a b))))))(display "test ")
(display '((let* ((a 3) (b (+ a 1))) b)))
(display ", expects ")
(display '4)
(set! *test-ret* (let* ((a 3) (b (+ a 1))) b))(if (equal? *test-ret* '4) (display " ===> ok\n") (begin (set! *test-error* (cons '(let* ((a 3) (b (+ a 1))) b) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let* ((a 3) (b (+ a 1))) b)))))(display "test ")
(display '((let1 a 3 (let1 b 4 (let1 c (lambda () b) (set! a c))) (a))))
(display ", expects ")
(display '4)
(set! *test-ret* (let1 a 3 (let1 b 4 (let1 c (lambda () b) (set! a c))) (a)))(if (equal? *test-ret* '4) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 a 3 (let1 b 4 (let1 c (lambda () b) (set! a c))) (a)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 a 3 (let1 b 4 (let1 c (lambda () b) (set! a c))) (a))))))(display "test ")
(display '((let ((a 0) (b 1)) (let ((c (lambda () b))) (c)))))
(display ", expects ")
(display '1)
(set! *test-ret* (let ((a 0) (b 1)) (let ((c (lambda () b))) (c))))(if (equal? *test-ret* '1) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a 0) (b 1)) (let ((c (lambda () b))) (c))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a 0) (b 1)) (let ((c (lambda () b))) (c)))))))(display "test ")
(display '((let ((a 0) (b 1)) ((lambda () b)))))
(display ", expects ")
(display '1)
(set! *test-ret* (let ((a 0) (b 1)) ((lambda () b))))(if (equal? *test-ret* '1) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a 0) (b 1)) ((lambda () b))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a 0) (b 1)) ((lambda () b)))))))(display "test ")
(display '((let ((a 0) (b 1)) (let ((c (lambda () (set! b 3) b))) (c)))))
(display ", expects ")
(display '3)
(set! *test-ret* (let ((a 0) (b 1)) (let ((c (lambda () (set! b 3) b))) (c))))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a 0) (b 1)) (let ((c (lambda () (set! b 3) b))) (c))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a 0) (b 1)) (let ((c (lambda () (set! b 3) b))) (c)))))))(display "test ")
(display '((let ((a 0) (b 1)) (let1 c (lambda () (set! b 3) b) (c)))))
(display ", expects ")
(display '3)
(set! *test-ret* (let ((a 0) (b 1)) (let1 c (lambda () (set! b 3) b) (c))))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a 0) (b 1)) (let1 c (lambda () (set! b 3) b) (c))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a 0) (b 1)) (let1 c (lambda () (set! b 3) b) (c)))))))(display "test ")
(display '((let1 a 100 (let1 c (let1 d (lambda () a) d) (c)))))
(display ", expects ")
(display '100)
(set! *test-ret* (let1 a 100 (let1 c (let1 d (lambda () a) d) (c))))(if (equal? *test-ret* '100) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 a 100 (let1 c (let1 d (lambda () a) d) (c))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 a 100 (let1 c (let1 d (lambda () a) d) (c)))))))(display "test ")
(display '((let ((a '())) (let ((G68 (lambda (i) (if (>= i 1000) i (a (+ i 1)))))) (set! a G68) (a 0)))))
(display ", expects ")
(display '1000)
(set! *test-ret* (let ((a '())) (let ((G68 (lambda (i) (if (>= i 1000) i (a (+ i 1)))))) (set! a G68) (a 0))))(if (equal? *test-ret* '1000) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a '())) (let ((G68 (lambda (i) (if (>= i 1000) i (a (+ i 1)))))) (set! a G68) (a 0))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a '())) (let ((G68 (lambda (i) (if (>= i 1000) i (a (+ i 1)))))) (set! a G68) (a 0)))))))(display "test ")
(display '((letrec ((a (lambda (i) (if (>= i 1000) i (a (+ i 1)))))) (a 0))))
(display ", expects ")
(display '1000)
(set! *test-ret* (letrec ((a (lambda (i) (if (>= i 1000) i (a (+ i 1)))))) (a 0)))(if (equal? *test-ret* '1000) (display " ===> ok\n") (begin (set! *test-error* (cons '(letrec ((a (lambda (i) (if (>= i 1000) i (a (+ i 1)))))) (a 0)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((letrec ((a (lambda (i) (if (>= i 1000) i (a (+ i 1)))))) (a 0))))))(display "test ")
(display '((letrec ((a 1) (b (lambda () a))) (b))))
(display ", expects ")
(display '1)
(set! *test-ret* (letrec ((a 1) (b (lambda () a))) (b)))(if (equal? *test-ret* '1) (display " ===> ok\n") (begin (set! *test-error* (cons '(letrec ((a 1) (b (lambda () a))) (b)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((letrec ((a 1) (b (lambda () a))) (b))))))(display "test ")
(display '((letrec ((even? (lambda (n) (if (= 0 n) #t (odd? (- n 1))))) (odd? (lambda (n) (if (= 0 n) #f (even? (- n 1)))))) (cons (even? 88) (odd? 88)))))
(display ", expects ")
(display '(#t . #f))
(set! *test-ret* (letrec ((even? (lambda (n) (if (= 0 n) #t (odd? (- n 1))))) (odd? (lambda (n) (if (= 0 n) #f (even? (- n 1)))))) (cons (even? 88) (odd? 88))))(if (equal? *test-ret* '(#t . #f)) (display " ===> ok\n") (begin (set! *test-error* (cons '(letrec ((even? (lambda (n) (if (= 0 n) #t (odd? (- n 1))))) (odd? (lambda (n) (if (= 0 n) #f (even? (- n 1)))))) (cons (even? 88) (odd? 88))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((letrec ((even? (lambda (n) (if (= 0 n) #t (odd? (- n 1))))) (odd? (lambda (n) (if (= 0 n) #f (even? (- n 1)))))) (cons (even? 88) (odd? 88)))))))(display "test ")
(display '((letrec ((a (lambda (i) (if (= i 10) i (a (+ i 1)))))) (a 0))))
(display ", expects ")
(display '10)
(set! *test-ret* (letrec ((a (lambda (i) (if (= i 10) i (a (+ i 1)))))) (a 0)))(if (equal? *test-ret* '10) (display " ===> ok\n") (begin (set! *test-error* (cons '(letrec ((a (lambda (i) (if (= i 10) i (a (+ i 1)))))) (a 0)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((letrec ((a (lambda (i) (if (= i 10) i (a (+ i 1)))))) (a 0))))))(display "test ")
(display '(((lambda (a) (set! a 1000) a) '())))
(display ", expects ")
(display '1000)
(set! *test-ret* ((lambda (a) (set! a 1000) a) '()))(if (equal? *test-ret* '1000) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda (a) (set! a 1000) a) '()) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda (a) (set! a 1000) a) '())))))(display "test ")
(display '(((lambda (a) (set! a (lambda (i) (if (= i 20) i (a (+ i 1))))) (a 0)) '())))
(display ", expects ")
(display '20)
(set! *test-ret* ((lambda (a) (set! a (lambda (i) (if (= i 20) i (a (+ i 1))))) (a 0)) '()))(if (equal? *test-ret* '20) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda (a) (set! a (lambda (i) (if (= i 20) i (a (+ i 1))))) (a 0)) '()) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda (a) (set! a (lambda (i) (if (= i 20) i (a (+ i 1))))) (a 0)) '())))))(display "test ")
(display '((or #f 3 4)))
(display ", expects ")
(display '3)
(set! *test-ret* (or #f 3 4))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(or #f 3 4) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((or #f 3 4)))))(display "test ")
(display '((define a 3)))
(display ", expects ")
(display '3)
(set! *test-ret* (define a 3))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(define a 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((define a 3)))))(display "test ")
(display '(a))
(display ", expects ")
(display '3)
(set! *test-ret* a)(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons 'a *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(a))))(display "test ")
(display '((= 3 4)))
(display ", expects ")
(display '#f)
(set! *test-ret* (= 3 4))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(= 3 4) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((= 3 4)))))(display "test ")
(display '((= 3 3 3)))
(display ", expects ")
(display '#t)
(set! *test-ret* (= 3 3 3))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(= 3 3 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((= 3 3 3)))))(display "test ")
(display '((= 3 4 5)))
(display ", expects ")
(display '#f)
(set! *test-ret* (= 3 4 5))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(= 3 4 5) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((= 3 4 5)))))(display "test ")
(display '((((lambda (a) (lambda () a)) 101))))
(display ", expects ")
(display '101)
(set! *test-ret* (((lambda (a) (lambda () a)) 101)))(if (equal? *test-ret* '101) (display " ===> ok\n") (begin (set! *test-error* (cons '(((lambda (a) (lambda () a)) 101)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((((lambda (a) (lambda () a)) 101))))))(display "test ")
(display '((((lambda (a) (lambda (b) (+ a b))) 101) 1)))
(display ", expects ")
(display '102)
(set! *test-ret* (((lambda (a) (lambda (b) (+ a b))) 101) 1))(if (equal? *test-ret* '102) (display " ===> ok\n") (begin (set! *test-error* (cons '(((lambda (a) (lambda (b) (+ a b))) 101) 1) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((((lambda (a) (lambda (b) (+ a b))) 101) 1)))))(display "test ")
(display '((null? '())))
(display ", expects ")
(display '#t)
(set! *test-ret* (null? '()))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(null? '()) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((null? '())))))(display "test ")
(display '((null? 3)))
(display ", expects ")
(display '#f)
(set! *test-ret* (null? 3))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(null? 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((null? 3)))))(display "test ")
(display '((cons 1 2)))
(display ", expects ")
(display '(1 . 2))
(set! *test-ret* (cons 1 2))(if (equal? *test-ret* '(1 . 2)) (display " ===> ok\n") (begin (set! *test-error* (cons '(cons 1 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((cons 1 2)))))(display "test ")
(display '((cons 1 (cons 2 '()))))
(display ", expects ")
(display '(1 2))
(set! *test-ret* (cons 1 (cons 2 '())))(if (equal? *test-ret* '(1 2)) (display " ===> ok\n") (begin (set! *test-error* (cons '(cons 1 (cons 2 '())) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((cons 1 (cons 2 '()))))))(display "test ")
(display '((begin 1 2 3)))
(display ", expects ")
(display '3)
(set! *test-ret* (begin 1 2 3))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(begin 1 2 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((begin 1 2 3)))))(display "test ")
(display '(((lambda () (set! a 4) a))))
(display ", expects ")
(display '4)
(set! *test-ret* ((lambda () (set! a 4) a)))(if (equal? *test-ret* '4) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda () (set! a 4) a)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda () (set! a 4) a))))))(display "test ")
(display '(((lambda () ((lambda () 3))))))
(display ", expects ")
(display '3)
(set! *test-ret* ((lambda () ((lambda () 3)))))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda () ((lambda () 3)))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda () ((lambda () 3))))))))(display "test ")
(display '(((lambda () ((lambda (x) x) 3)))))
(display ", expects ")
(display '3)
(set! *test-ret* ((lambda () ((lambda (x) x) 3))))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda () ((lambda (x) x) 3))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda () ((lambda (x) x) 3)))))))(display "test ")
(display '(((lambda (y) ((lambda (x) x) 3)) 4)))
(display ", expects ")
(display '3)
(set! *test-ret* ((lambda (y) ((lambda (x) x) 3)) 4))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda (y) ((lambda (x) x) 3)) 4) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda (y) ((lambda (x) x) 3)) 4)))))(display "test ")
(display '(((lambda () (let1 a 1 ((lambda () 3)))))))
(display ", expects ")
(display '3)
(set! *test-ret* ((lambda () (let1 a 1 ((lambda () 3))))))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda () (let1 a 1 ((lambda () 3))))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda () (let1 a 1 ((lambda () 3)))))))))(display "test ")
(display '(((lambda () (let1 b 2 (let1 a 1 ((lambda () 3))))))))
(display ", expects ")
(display '3)
(set! *test-ret* ((lambda () (let1 b 2 (let1 a 1 ((lambda () 3)))))))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda () (let1 b 2 (let1 a 1 ((lambda () 3)))))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda () (let1 b 2 (let1 a 1 ((lambda () 3))))))))))(display "test ")
(display '(((lambda () (if 3 ((lambda () 3)))))))
(display ", expects ")
(display '3)
(set! *test-ret* ((lambda () (if 3 ((lambda () 3))))))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda () (if 3 ((lambda () 3))))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda () (if 3 ((lambda () 3)))))))))(display "test ")
(display '(((lambda () (if ((lambda () 3)) 4 5)))))
(display ", expects ")
(display '4)
(set! *test-ret* ((lambda () (if ((lambda () 3)) 4 5))))(if (equal? *test-ret* '4) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda () (if ((lambda () 3)) 4 5))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda () (if ((lambda () 3)) 4 5)))))))(display "test ")
(display '((let loop ((i 0)) (if (= i 10) i (let1 a 1 (let1 b 0 (loop (+ i a b))))))))
(display ", expects ")
(display '10)
(set! *test-ret* (let loop ((i 0)) (if (= i 10) i (let1 a 1 (let1 b 0 (loop (+ i a b)))))))(if (equal? *test-ret* '10) (display " ===> ok\n") (begin (set! *test-error* (cons '(let loop ((i 0)) (if (= i 10) i (let1 a 1 (let1 b 0 (loop (+ i a b)))))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let loop ((i 0)) (if (= i 10) i (let1 a 1 (let1 b 0 (loop (+ i a b))))))))))(display "test ")
(display '((let loop ((i 0)) (if (= i 10) i (let1 a 1 (let1 b 0 (loop (+ i a b))))))))
(display ", expects ")
(display '10)
(set! *test-ret* (let loop ((i 0)) (if (= i 10) i (let1 a 1 (let1 b 0 (loop (+ i a b)))))))(if (equal? *test-ret* '10) (display " ===> ok\n") (begin (set! *test-error* (cons '(let loop ((i 0)) (if (= i 10) i (let1 a 1 (let1 b 0 (loop (+ i a b)))))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let loop ((i 0)) (if (= i 10) i (let1 a 1 (let1 b 0 (loop (+ i a b))))))))))(display "test ")
(display '(((lambda () (define d (lambda (x y z) (+ x y z))) (d 1 2 3)))))
(display ", expects ")
(display '6)
(set! *test-ret* ((lambda () (define d (lambda (x y z) (+ x y z))) (d 1 2 3))))(if (equal? *test-ret* '6) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda () (define d (lambda (x y z) (+ x y z))) (d 1 2 3))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda () (define d (lambda (x y z) (+ x y z))) (d 1 2 3)))))))(display "test ")
(display '(((lambda () (define b (lambda () 3)) (b)))))
(display ", expects ")
(display '3)
(set! *test-ret* ((lambda () (define b (lambda () 3)) (b))))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda () (define b (lambda () 3)) (b))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda () (define b (lambda () 3)) (b)))))))(display "test ")
(display '((apply car '((3 2)))))
(display ", expects ")
(display '3)
(set! *test-ret* (apply car '((3 2))))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply car '((3 2))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply car '((3 2)))))))(display "test ")
(display '(((lambda a a) 1 2 3)))
(display ", expects ")
(display '(1 2 3))
(set! *test-ret* ((lambda a a) 1 2 3))(if (equal? *test-ret* '(1 2 3)) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda a a) 1 2 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda a a) 1 2 3)))))(display "test ")
(display '(((lambda (a . b) b) 1 2 3)))
(display ", expects ")
(display '(2 3))
(set! *test-ret* ((lambda (a . b) b) 1 2 3))(if (equal? *test-ret* '(2 3)) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda (a . b) b) 1 2 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda (a . b) b) 1 2 3)))))(display "test ")
(display '(((lambda (a . b) b) 1 2 3 4)))
(display ", expects ")
(display '(2 3 4))
(set! *test-ret* ((lambda (a . b) b) 1 2 3 4))(if (equal? *test-ret* '(2 3 4)) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda (a . b) b) 1 2 3 4) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda (a . b) b) 1 2 3 4)))))(display "test ")
(display '(((lambda (a b . c) c) 1 2 3 4)))
(display ", expects ")
(display '(3 4))
(set! *test-ret* ((lambda (a b . c) c) 1 2 3 4))(if (equal? *test-ret* '(3 4)) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda (a b . c) c) 1 2 3 4) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda (a b . c) c) 1 2 3 4)))))(display "test ")
(display '(((lambda (a b c . d) d) 1 2 3 4)))
(display ", expects ")
(display '(4))
(set! *test-ret* ((lambda (a b c . d) d) 1 2 3 4))(if (equal? *test-ret* '(4)) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda (a b c . d) d) 1 2 3 4) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda (a b c . d) d) 1 2 3 4)))))(display "test ")
(display '(((lambda (a b c . d) d) 1 2 3)))
(display ", expects ")
(display '())
(set! *test-ret* ((lambda (a b c . d) d) 1 2 3))(if (equal? *test-ret* '()) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda (a b c . d) d) 1 2 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda (a b c . d) d) 1 2 3)))))(display "test ")
(display '(((lambda a a))))
(display ", expects ")
(display '())
(set! *test-ret* ((lambda a a)))(if (equal? *test-ret* '()) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda a a)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda a a))))))(display "test ")
(display '(((lambda a a) 1)))
(display ", expects ")
(display '(1))
(set! *test-ret* ((lambda a a) 1))(if (equal? *test-ret* '(1)) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda a a) 1) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda a a) 1)))))(display "test ")
(display '((when #t 1 2 34)))
(display ", expects ")
(display '34)
(set! *test-ret* (when #t 1 2 34))(if (equal? *test-ret* '34) (display " ===> ok\n") (begin (set! *test-error* (cons '(when #t 1 2 34) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((when #t 1 2 34)))))(display "test ")
(display '((not 3)))
(display ", expects ")
(display '#f)
(set! *test-ret* (not 3))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(not 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((not 3)))))(display "test ")
(display '((unless #f 1 2 48)))
(display ", expects ")
(display '48)
(set! *test-ret* (unless #f 1 2 48))(if (equal? *test-ret* '48) (display " ===> ok\n") (begin (set! *test-error* (cons '(unless #f 1 2 48) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((unless #f 1 2 48)))))(display "test ")
(display '((and 3 4 5)))
(display ", expects ")
(display '5)
(set! *test-ret* (and 3 4 5))(if (equal? *test-ret* '5) (display " ===> ok\n") (begin (set! *test-error* (cons '(and 3 4 5) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((and 3 4 5)))))(display "test ")
(display '((let1 a 0 (and (set! a (+ a 1))) a)))
(display ", expects ")
(display '1)
(set! *test-ret* (let1 a 0 (and (set! a (+ a 1))) a))(if (equal? *test-ret* '1) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 a 0 (and (set! a (+ a 1))) a) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 a 0 (and (set! a (+ a 1))) a)))))(display "test ")
(display '((let1 a 0 (or (set! a (+ a 1))) a)))
(display ", expects ")
(display '1)
(set! *test-ret* (let1 a 0 (or (set! a (+ a 1))) a))(if (equal? *test-ret* '1) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 a 0 (or (set! a (+ a 1))) a) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 a 0 (or (set! a (+ a 1))) a)))))(display "test ")
(display '((and 3 #f 5)))
(display ", expects ")
(display '#f)
(set! *test-ret* (and 3 #f 5))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(and 3 #f 5) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((and 3 #f 5)))))(display "test ")
(display '((or 3 4 5)))
(display ", expects ")
(display '3)
(set! *test-ret* (or 3 4 5))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(or 3 4 5) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((or 3 4 5)))))(display "test ")
(display '((or #f #f #f)))
(display ", expects ")
(display '#f)
(set! *test-ret* (or #f #f #f))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(or #f #f #f) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((or #f #f #f)))))(display "test ")
(display '((> 4 3)))
(display ", expects ")
(display '#t)
(set! *test-ret* (> 4 3))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(> 4 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((> 4 3)))))(display "test ")
(display '((> 4 3 2)))
(display ", expects ")
(display '#t)
(set! *test-ret* (> 4 3 2))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(> 4 3 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((> 4 3 2)))))(display "test ")
(display '((> 4 3 1 2)))
(display ", expects ")
(display '#f)
(set! *test-ret* (> 4 3 1 2))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(> 4 3 1 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((> 4 3 1 2)))))(display "test ")
(display '((>= 3 3 3)))
(display ", expects ")
(display '#t)
(set! *test-ret* (>= 3 3 3))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(>= 3 3 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((>= 3 3 3)))))(display "test ")
(display '((>= 4 3 3)))
(display ", expects ")
(display '#t)
(set! *test-ret* (>= 4 3 3))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(>= 4 3 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((>= 4 3 3)))))(display "test ")
(display '((>= 4 3)))
(display ", expects ")
(display '#t)
(set! *test-ret* (>= 4 3))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(>= 4 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((>= 4 3)))))(display "test ")
(display '((< 1 2)))
(display ", expects ")
(display '#t)
(set! *test-ret* (< 1 2))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(< 1 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((< 1 2)))))(display "test ")
(display '((< 1 2 3)))
(display ", expects ")
(display '#t)
(set! *test-ret* (< 1 2 3))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(< 1 2 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((< 1 2 3)))))(display "test ")
(display '((< 1 5 3)))
(display ", expects ")
(display '#f)
(set! *test-ret* (< 1 5 3))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(< 1 5 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((< 1 5 3)))))(display "test ")
(display '((<= 1 2)))
(display ", expects ")
(display '#t)
(set! *test-ret* (<= 1 2))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(<= 1 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((<= 1 2)))))(display "test ")
(display '((<= 1 2 3)))
(display ", expects ")
(display '#t)
(set! *test-ret* (<= 1 2 3))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(<= 1 2 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((<= 1 2 3)))))(display "test ")
(display '((<= 1 3 3)))
(display ", expects ")
(display '#t)
(set! *test-ret* (<= 1 3 3))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(<= 1 3 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((<= 1 3 3)))))(display "test ")
(display '((<= 1 5 3)))
(display ", expects ")
(display '#f)
(set! *test-ret* (<= 1 5 3))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(<= 1 5 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((<= 1 5 3)))))(display "test ")
(display '((eq? #t #t)))
(display ", expects ")
(display '#t)
(set! *test-ret* (eq? #t #t))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(eq? #t #t) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((eq? #t #t)))))(display "test ")
(display '((eq? #t #f)))
(display ", expects ")
(display '#f)
(set! *test-ret* (eq? #t #f))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(eq? #t #f) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((eq? #t #f)))))(display "test ")
(display '((eq? 'a 'a)))
(display ", expects ")
(display '#t)
(set! *test-ret* (eq? 'a 'a))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(eq? 'a 'a) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((eq? 'a 'a)))))(display "test ")
(display '((eq? 'a 'b)))
(display ", expects ")
(display '#f)
(set! *test-ret* (eq? 'a 'b))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(eq? 'a 'b) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((eq? 'a 'b)))))(display "test ")
(display '((pair? (cons 1 2))))
(display ", expects ")
(display '#t)
(set! *test-ret* (pair? (cons 1 2)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(pair? (cons 1 2)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((pair? (cons 1 2))))))(display "test ")
(display '((pair? 3)))
(display ", expects ")
(display '#f)
(set! *test-ret* (pair? 3))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(pair? 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((pair? 3)))))(display "test ")
(display '((symbol? 'a)))
(display ", expects ")
(display '#t)
(set! *test-ret* (symbol? 'a))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(symbol? 'a) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((symbol? 'a)))))(display "test ")
(display '((symbol? 3)))
(display ", expects ")
(display '#f)
(set! *test-ret* (symbol? 3))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(symbol? 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((symbol? 3)))))(display "test ")
(display '((cond (#f 1) (#t 3))))
(display ", expects ")
(display '3)
(set! *test-ret* (cond (#f 1) (#t 3)))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(cond (#f 1) (#t 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((cond (#f 1) (#t 3))))))(display "test ")
(display '((cond (#f 1) (#f 2) (else 3))))
(display ", expects ")
(display '3)
(set! *test-ret* (cond (#f 1) (#f 2) (else 3)))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(cond (#f 1) (#f 2) (else 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((cond (#f 1) (#f 2) (else 3))))))(display "test ")
(display '((cond (#t 3) (#f 2) (else 1))))
(display ", expects ")
(display '3)
(set! *test-ret* (cond (#t 3) (#f 2) (else 1)))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(cond (#t 3) (#f 2) (else 1)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((cond (#t 3) (#f 2) (else 1))))))(display "test ")
(display '((cond ((cons 1 2) => car) (#f 2) (else 3))))
(display ", expects ")
(display '1)
(set! *test-ret* (cond ((cons 1 2) => car) (#f 2) (else 3)))(if (equal? *test-ret* '1) (display " ===> ok\n") (begin (set! *test-error* (cons '(cond ((cons 1 2) => car) (#f 2) (else 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((cond ((cons 1 2) => car) (#f 2) (else 3))))))(display "test ")
(display '((apply (lambda (a) a) '(3))))
(display ", expects ")
(display '3)
(set! *test-ret* (apply (lambda (a) a) '(3)))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply (lambda (a) a) '(3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply (lambda (a) a) '(3))))))(display "test ")
(display '((apply (lambda (a b) (+ a b)) '(5 2))))
(display ", expects ")
(display '7)
(set! *test-ret* (apply (lambda (a b) (+ a b)) '(5 2)))(if (equal? *test-ret* '7) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply (lambda (a b) (+ a b)) '(5 2)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply (lambda (a b) (+ a b)) '(5 2))))))(display "test ")
(display '((apply (lambda (a b c) (+ a b c)) '(5 2 1))))
(display ", expects ")
(display '8)
(set! *test-ret* (apply (lambda (a b c) (+ a b c)) '(5 2 1)))(if (equal? *test-ret* '8) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply (lambda (a b c) (+ a b c)) '(5 2 1)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply (lambda (a b c) (+ a b c)) '(5 2 1))))))(display "test ")
(display '((let ((a 0)) `(,a b c))))
(display ", expects ")
(display '(0 b c))
(set! *test-ret* (let ((a 0)) `(,a b c)))(if (equal? *test-ret* '(0 b c)) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a 0)) `(,a b c)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a 0)) `(,a b c))))))(display "test ")
(display '((let ((a '(1 2 3))) `(,a b c))))
(display ", expects ")
(display '((1 2 3) b c))
(set! *test-ret* (let ((a '(1 2 3))) `(,a b c)))(if (equal? *test-ret* '((1 2 3) b c)) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a '(1 2 3))) `(,a b c)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a '(1 2 3))) `(,a b c))))))(display "test ")
(display '((let ((a '(1 2 3))) `(,@a b c))))
(display ", expects ")
(display '(1 2 3 b c))
(set! *test-ret* (let ((a '(1 2 3))) `(,@a b c)))(if (equal? *test-ret* '(1 2 3 b c)) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a '(1 2 3))) `(,@a b c)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a '(1 2 3))) `(,@a b c))))))(display "test ")
(display '((let ((name 'a)) `(list ,name ',name))))
(display ", expects ")
(display '(list a 'a))
(set! *test-ret* (let ((name 'a)) `(list ,name ',name)))(if (equal? *test-ret* '(list a 'a)) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((name 'a)) `(list ,name ',name)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((name 'a)) `(list ,name ',name))))))(display "test ")
(display '(`(list ,(+ 1 2) 4)))
(display ", expects ")
(display '(list 3 4))
(set! *test-ret* `(list ,(+ 1 2) 4))(if (equal? *test-ret* '(list 3 4)) (display " ===> ok\n") (begin (set! *test-error* (cons '`(list ,(+ 1 2) 4) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(`(list ,(+ 1 2) 4)))))(display "test ")
(display '((let ((a '(1 2 3))) `(1 unquote a))))
(display ", expects ")
(display '(1 1 2 3))
(set! *test-ret* (let ((a '(1 2 3))) `(1 unquote a)))(if (equal? *test-ret* '(1 1 2 3)) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a '(1 2 3))) `(1 unquote a)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a '(1 2 3))) `(1 unquote a))))))(display "test ")
(display '((let ((a '(1 2 3))) `,a)))
(display ", expects ")
(display '(1 2 3))
(set! *test-ret* (let ((a '(1 2 3))) `,a))(if (equal? *test-ret* '(1 2 3)) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a '(1 2 3))) `,a) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a '(1 2 3))) `,a)))))(display "test ")
(display '((let ((a '(1 2 3))) `(,@a))))
(display ", expects ")
(display '(1 2 3))
(set! *test-ret* (let ((a '(1 2 3))) `(,@a)))(if (equal? *test-ret* '(1 2 3)) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a '(1 2 3))) `(,@a)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a '(1 2 3))) `(,@a))))))(display "test ")
(display '((let ((a '(1 2 3))) `(0 ,@a))))
(display ", expects ")
(display '(0 1 2 3))
(set! *test-ret* (let ((a '(1 2 3))) `(0 ,@a)))(if (equal? *test-ret* '(0 1 2 3)) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a '(1 2 3))) `(0 ,@a)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a '(1 2 3))) `(0 ,@a))))))(display "test ")
(display '((let ((a '(1 2 3))) `(0 ,a 4))))
(display ", expects ")
(display '(0 (1 2 3) 4))
(set! *test-ret* (let ((a '(1 2 3))) `(0 ,a 4)))(if (equal? *test-ret* '(0 (1 2 3) 4)) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a '(1 2 3))) `(0 ,a 4)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a '(1 2 3))) `(0 ,a 4))))))(display "test ")
(display '((let ((a '(1 2 3))) `(,@a 4))))
(display ", expects ")
(display '(1 2 3 4))
(set! *test-ret* (let ((a '(1 2 3))) `(,@a 4)))(if (equal? *test-ret* '(1 2 3 4)) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a '(1 2 3))) `(,@a 4)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a '(1 2 3))) `(,@a 4))))))(display "test ")
(display '((let ((a '(1 2 3))) `((,@a) 4))))
(display ", expects ")
(display '((1 2 3) 4))
(set! *test-ret* (let ((a '(1 2 3))) `((,@a) 4)))(if (equal? *test-ret* '((1 2 3) 4)) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a '(1 2 3))) `((,@a) 4)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a '(1 2 3))) `((,@a) 4))))))(display "test ")
(display '((let ((a '(1 2 3))) `((,a) 4))))
(display ", expects ")
(display '(((1 2 3)) 4))
(set! *test-ret* (let ((a '(1 2 3))) `((,a) 4)))(if (equal? *test-ret* '(((1 2 3)) 4)) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a '(1 2 3))) `((,a) 4)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a '(1 2 3))) `((,a) 4))))))(display "test ")
(display '(`b))
(display ", expects ")
(display 'b)
(set! *test-ret* `b)(if (equal? *test-ret* 'b) (display " ===> ok\n") (begin (set! *test-error* (cons '`b *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(`b))))(display "test ")
(display '((list 1 2 3)))
(display ", expects ")
(display '(1 2 3))
(set! *test-ret* (list 1 2 3))(if (equal? *test-ret* '(1 2 3)) (display " ===> ok\n") (begin (set! *test-error* (cons '(list 1 2 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((list 1 2 3)))))(display "test ")
(display '((aif (+ 1 2) it #f)))
(display ", expects ")
(display '3)
(set! *test-ret* (aif (+ 1 2) it #f))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(aif (+ 1 2) it #f) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((aif (+ 1 2) it #f)))))(display "test ")
(display '((string-length "abc")))
(display ", expects ")
(display '3)
(set! *test-ret* (string-length "abc"))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(string-length "abc") *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((string-length "abc")))))(display "test ")
(display '((string-length "あいう")))
(display ", expects ")
(display '3)
(set! *test-ret* (string-length "あいう"))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(string-length "あいう") *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((string-length "あいう")))))(display "test ")
(display '((string->symbol "abc")))
(display ", expects ")
(display 'abc)
(set! *test-ret* (string->symbol "abc"))(if (equal? *test-ret* 'abc) (display " ===> ok\n") (begin (set! *test-error* (cons '(string->symbol "abc") *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((string->symbol "abc")))))(display "test ")
(display '((number->string 123)))
(display ", expects ")
(display '"123")
(set! *test-ret* (number->string 123))(if (equal? *test-ret* '"123") (display " ===> ok\n") (begin (set! *test-error* (cons '(number->string 123) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((number->string 123)))))(display "test ")
(display '((begin (define (proc1 . a) a) (proc1 1 2 3 4))))
(display ", expects ")
(display '(1 2 3 4))
(set! *test-ret* (begin (define (proc1 . a) a) (proc1 1 2 3 4)))(if (equal? *test-ret* '(1 2 3 4)) (display " ===> ok\n") (begin (set! *test-error* (cons '(begin (define (proc1 . a) a) (proc1 1 2 3 4)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((begin (define (proc1 . a) a) (proc1 1 2 3 4))))))(display "test ")
(display '(((lambda (a . b) b) 1 2 3)))
(display ", expects ")
(display '(2 3))
(set! *test-ret* ((lambda (a . b) b) 1 2 3))(if (equal? *test-ret* '(2 3)) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda (a . b) b) 1 2 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda (a . b) b) 1 2 3)))))(display "test ")
(display '(((lambda (a . b) a) 1 2 3 4 5)))
(display ", expects ")
(display '1)
(set! *test-ret* ((lambda (a . b) a) 1 2 3 4 5))(if (equal? *test-ret* '1) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda (a . b) a) 1 2 3 4 5) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda (a . b) a) 1 2 3 4 5)))))(display "test ")
(display '(((lambda (a . b) b) 1 2 3 4 5)))
(display ", expects ")
(display '(2 3 4 5))
(set! *test-ret* ((lambda (a . b) b) 1 2 3 4 5))(if (equal? *test-ret* '(2 3 4 5)) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda (a . b) b) 1 2 3 4 5) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda (a . b) b) 1 2 3 4 5)))))(display "test ")
(display '(((lambda (a b c d . e) e) 1 2 3 4)))
(display ", expects ")
(display '())
(set! *test-ret* ((lambda (a b c d . e) e) 1 2 3 4))(if (equal? *test-ret* '()) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda (a b c d . e) e) 1 2 3 4) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda (a b c d . e) e) 1 2 3 4)))))(display "test ")
(display '(((lambda (a b c d . e) a) 1 2 3 4)))
(display ", expects ")
(display '1)
(set! *test-ret* ((lambda (a b c d . e) a) 1 2 3 4))(if (equal? *test-ret* '1) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda (a b c d . e) a) 1 2 3 4) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda (a b c d . e) a) 1 2 3 4)))))(display "test ")
(display '(((lambda (a b c d . e) b) 1 2 3 4)))
(display ", expects ")
(display '2)
(set! *test-ret* ((lambda (a b c d . e) b) 1 2 3 4))(if (equal? *test-ret* '2) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda (a b c d . e) b) 1 2 3 4) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda (a b c d . e) b) 1 2 3 4)))))(display "test ")
(display '(((lambda (a b c d . e) c) 1 2 3 4)))
(display ", expects ")
(display '3)
(set! *test-ret* ((lambda (a b c d . e) c) 1 2 3 4))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda (a b c d . e) c) 1 2 3 4) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda (a b c d . e) c) 1 2 3 4)))))(display "test ")
(display '(((lambda (a b c d . e) d) 1 2 3 4)))
(display ", expects ")
(display '4)
(set! *test-ret* ((lambda (a b c d . e) d) 1 2 3 4))(if (equal? *test-ret* '4) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda (a b c d . e) d) 1 2 3 4) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda (a b c d . e) d) 1 2 3 4)))))(display "test ")
(display '((append '(1 2) '(3 4))))
(display ", expects ")
(display '(1 2 3 4))
(set! *test-ret* (append '(1 2) '(3 4)))(if (equal? *test-ret* '(1 2 3 4)) (display " ===> ok\n") (begin (set! *test-error* (cons '(append '(1 2) '(3 4)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((append '(1 2) '(3 4))))))(display "test ")
(display '((begin (define x 3) x)))
(display ", expects ")
(display '3)
(set! *test-ret* (begin (define x 3) x))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(begin (define x 3) x) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((begin (define x 3) x)))))(display "test ")
(display '((begin (define (hoge . a) a) (hoge 1 2 3))))
(display ", expects ")
(display '(1 2 3))
(set! *test-ret* (begin (define (hoge . a) a) (hoge 1 2 3)))(if (equal? *test-ret* '(1 2 3)) (display " ===> ok\n") (begin (set! *test-error* (cons '(begin (define (hoge . a) a) (hoge 1 2 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((begin (define (hoge . a) a) (hoge 1 2 3))))))(display "test ")
(display '((begin (define (hige a . b) b) (hige 1 2 3))))
(display ", expects ")
(display '(2 3))
(set! *test-ret* (begin (define (hige a . b) b) (hige 1 2 3)))(if (equal? *test-ret* '(2 3)) (display " ===> ok\n") (begin (set! *test-error* (cons '(begin (define (hige a . b) b) (hige 1 2 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((begin (define (hige a . b) b) (hige 1 2 3))))))(display "test ")
(display '((apply (lambda a a) '(3 2))))
(display ", expects ")
(display '(3 2))
(set! *test-ret* (apply (lambda a a) '(3 2)))(if (equal? *test-ret* '(3 2)) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply (lambda a a) '(3 2)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply (lambda a a) '(3 2))))))(display "test ")
(display '((equal? '(1 2 (3)) '(1 2 (3)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? '(1 2 (3)) '(1 2 (3))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? '(1 2 (3)) '(1 2 (3))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? '(1 2 (3)) '(1 2 (3)))))))(display "test ")
(display '((let ((a 3)) 3 2 1)))
(display ", expects ")
(display '1)
(set! *test-ret* (let ((a 3)) 3 2 1))(if (equal? *test-ret* '1) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a 3)) 3 2 1) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a 3)) 3 2 1)))))(display "test ")
(display '((make-string 3)))
(display ", expects ")
(display '"   ")
(set! *test-ret* (make-string 3))(if (equal? *test-ret* '"   ") (display " ===> ok\n") (begin (set! *test-error* (cons '(make-string 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((make-string 3)))))(display "test ")
(display '((make-string 3 #\c)))
(display ", expects ")
(display '"ccc")
(set! *test-ret* (make-string 3 #\c))(if (equal? *test-ret* '"ccc") (display " ===> ok\n") (begin (set! *test-error* (cons '(make-string 3 #\c) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((make-string 3 #\c)))))(display "test ")
(display '((apply car '((3)))))
(display ", expects ")
(display '3)
(set! *test-ret* (apply car '((3))))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply car '((3))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply car '((3)))))))(display "test ")
(display '((apply (lambda (a) (car a)) '((3)))))
(display ", expects ")
(display '3)
(set! *test-ret* (apply (lambda (a) (car a)) '((3))))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply (lambda (a) (car a)) '((3))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply (lambda (a) (car a)) '((3)))))))(display "test ")
(display '((apply (lambda (a . b) (+ a (car b))) '(1 2))))
(display ", expects ")
(display '3)
(set! *test-ret* (apply (lambda (a . b) (+ a (car b))) '(1 2)))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply (lambda (a . b) (+ a (car b))) '(1 2)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply (lambda (a . b) (+ a (car b))) '(1 2))))))(display "test ")
(display '((string-append "12" "345" "6")))
(display ", expects ")
(display '"123456")
(set! *test-ret* (string-append "12" "345" "6"))(if (equal? *test-ret* '"123456") (display " ===> ok\n") (begin (set! *test-error* (cons '(string-append "12" "345" "6") *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((string-append "12" "345" "6")))))(display "test ")
(display '((find (lambda (e) (= e 3)) (list 1 2 3))))
(display ", expects ")
(display '3)
(set! *test-ret* (find (lambda (e) (= e 3)) (list 1 2 3)))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(find (lambda (e) (= e 3)) (list 1 2 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((find (lambda (e) (= e 3)) (list 1 2 3))))))(display "test ")
(display '((string? "hige")))
(display ", expects ")
(display '#t)
(set! *test-ret* (string? "hige"))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(string? "hige") *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((string? "hige")))))(display "test ")
(display '((assoc "key" '(("key" "value")))))
(display ", expects ")
(display '("key" "value"))
(set! *test-ret* (assoc "key" '(("key" "value"))))(if (equal? *test-ret* '("key" "value")) (display " ===> ok\n") (begin (set! *test-error* (cons '(assoc "key" '(("key" "value"))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((assoc "key" '(("key" "value")))))))(display "test ")
(display '((string-split "12\n34\n56" #\newline)))
(display ", expects ")
(display '("12" "34" "56"))
(set! *test-ret* (string-split "12\n34\n56" #\newline))(if (equal? *test-ret* '("12" "34" "56")) (display " ===> ok\n") (begin (set! *test-error* (cons '(string-split "12\n34\n56" #\newline) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((string-split "12\n34\n56" #\newline)))))(display "test ")
(display '((let ((p (open-string-input-port "12345"))) (read-char p) (read-char p))))
(display ", expects ")
(display '#\2)
(set! *test-ret* (let ((p (open-string-input-port "12345"))) (read-char p) (read-char p)))(if (equal? *test-ret* '#\2) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((p (open-string-input-port "12345"))) (read-char p) (read-char p)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((p (open-string-input-port "12345"))) (read-char p) (read-char p))))))(display "test ")
(display '((eof-object? (let ((p (open-string-input-port "1"))) (read-char p) (read-char p)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (eof-object? (let ((p (open-string-input-port "1"))) (read-char p) (read-char p))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(eof-object? (let ((p (open-string-input-port "1"))) (read-char p) (read-char p))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((eof-object? (let ((p (open-string-input-port "1"))) (read-char p) (read-char p)))))))(display "test ")
(display '((let ((p (open-string-input-port "123 456"))) (read p))))
(display ", expects ")
(display '123)
(set! *test-ret* (let ((p (open-string-input-port "123 456"))) (read p)))(if (equal? *test-ret* '123) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((p (open-string-input-port "123 456"))) (read p)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((p (open-string-input-port "123 456"))) (read p))))))(display "test ")
(display '((rxmatch #/123/ "12")))
(display ", expects ")
(display '#f)
(set! *test-ret* (rxmatch #/123/ "12"))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch #/123/ "12") *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch #/123/ "12")))))(display "test ")
(display '((if (rxmatch #/123/ "123") #t #f)))
(display ", expects ")
(display '#t)
(set! *test-ret* (if (rxmatch #/123/ "123") #t #f))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(if (rxmatch #/123/ "123") #t #f) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((if (rxmatch #/123/ "123") #t #f)))))(display "test ")
(display '((regexp? #/abc/)))
(display ", expects ")
(display '#t)
(set! *test-ret* (regexp? #/abc/))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(regexp? #/abc/) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((regexp? #/abc/)))))(display "test ")
(display '((regexp? "abc")))
(display ", expects ")
(display '#f)
(set! *test-ret* (regexp? "abc"))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(regexp? "abc") *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((regexp? "abc")))))(display "test ")
(display '((rxmatch-start (rxmatch #/\d+/ "a345a"))))
(display ", expects ")
(display '1)
(set! *test-ret* (rxmatch-start (rxmatch #/\d+/ "a345a")))(if (equal? *test-ret* '1) (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-start (rxmatch #/\d+/ "a345a")) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-start (rxmatch #/\d+/ "a345a"))))))(display "test ")
(display '((rxmatch-start (rxmatch #/\d+/ "ab345a"))))
(display ", expects ")
(display '2)
(set! *test-ret* (rxmatch-start (rxmatch #/\d+/ "ab345a")))(if (equal? *test-ret* '2) (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-start (rxmatch #/\d+/ "ab345a")) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-start (rxmatch #/\d+/ "ab345a"))))))(display "test ")
(display '((rxmatch-start (rxmatch #/\d+/ "abあ345a"))))
(display ", expects ")
(display '3)
(set! *test-ret* (rxmatch-start (rxmatch #/\d+/ "abあ345a")))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-start (rxmatch #/\d+/ "abあ345a")) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-start (rxmatch #/\d+/ "abあ345a"))))))(display "test ")
(display '((rxmatch-start (rxmatch #/(\d+)(a)/ "a345a") 1)))
(display ", expects ")
(display '1)
(set! *test-ret* (rxmatch-start (rxmatch #/(\d+)(a)/ "a345a") 1))(if (equal? *test-ret* '1) (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-start (rxmatch #/(\d+)(a)/ "a345a") 1) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-start (rxmatch #/(\d+)(a)/ "a345a") 1)))))(display "test ")
(display '((rxmatch-start (rxmatch #/(\d+)(a)/ "a345a") 2)))
(display ", expects ")
(display '4)
(set! *test-ret* (rxmatch-start (rxmatch #/(\d+)(a)/ "a345a") 2))(if (equal? *test-ret* '4) (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-start (rxmatch #/(\d+)(a)/ "a345a") 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-start (rxmatch #/(\d+)(a)/ "a345a") 2)))))(display "test ")
(display '((rxmatch-end (rxmatch #/\d+/ "a345a"))))
(display ", expects ")
(display '4)
(set! *test-ret* (rxmatch-end (rxmatch #/\d+/ "a345a")))(if (equal? *test-ret* '4) (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-end (rxmatch #/\d+/ "a345a")) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-end (rxmatch #/\d+/ "a345a"))))))(display "test ")
(display '((rxmatch-end (rxmatch #/(\d+)(a)/ "a345a") 1)))
(display ", expects ")
(display '4)
(set! *test-ret* (rxmatch-end (rxmatch #/(\d+)(a)/ "a345a") 1))(if (equal? *test-ret* '4) (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-end (rxmatch #/(\d+)(a)/ "a345a") 1) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-end (rxmatch #/(\d+)(a)/ "a345a") 1)))))(display "test ")
(display '((rxmatch-end (rxmatch #/(\d+)(a)/ "a345a") 2)))
(display ", expects ")
(display '5)
(set! *test-ret* (rxmatch-end (rxmatch #/(\d+)(a)/ "a345a") 2))(if (equal? *test-ret* '5) (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-end (rxmatch #/(\d+)(a)/ "a345a") 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-end (rxmatch #/(\d+)(a)/ "a345a") 2)))))(display "test ")
(display '((rxmatch-end (rxmatch #/\d+/ "aaaa"))))
(display ", expects ")
(display '#f)
(set! *test-ret* (rxmatch-end (rxmatch #/\d+/ "aaaa")))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-end (rxmatch #/\d+/ "aaaa")) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-end (rxmatch #/\d+/ "aaaa"))))))(display "test ")
(display '((#/123/ "12")))
(display ", expects ")
(display '#f)
(set! *test-ret* (#/123/ "12"))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(#/123/ "12") *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((#/123/ "12")))))(display "test ")
(display '((rxmatch-start (#/\d+/ "a345a"))))
(display ", expects ")
(display '1)
(set! *test-ret* (rxmatch-start (#/\d+/ "a345a")))(if (equal? *test-ret* '1) (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-start (#/\d+/ "a345a")) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-start (#/\d+/ "a345a"))))))(display "test ")
(display '((rxmatch-start (#/\d+/ "ab345a"))))
(display ", expects ")
(display '2)
(set! *test-ret* (rxmatch-start (#/\d+/ "ab345a")))(if (equal? *test-ret* '2) (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-start (#/\d+/ "ab345a")) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-start (#/\d+/ "ab345a"))))))(display "test ")
(display '((rxmatch-start (#/\d+/ "abあ345a"))))
(display ", expects ")
(display '3)
(set! *test-ret* (rxmatch-start (#/\d+/ "abあ345a")))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-start (#/\d+/ "abあ345a")) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-start (#/\d+/ "abあ345a"))))))(display "test ")
(display '((rxmatch-start (#/(\d+)(a)/ "a345a") 1)))
(display ", expects ")
(display '1)
(set! *test-ret* (rxmatch-start (#/(\d+)(a)/ "a345a") 1))(if (equal? *test-ret* '1) (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-start (#/(\d+)(a)/ "a345a") 1) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-start (#/(\d+)(a)/ "a345a") 1)))))(display "test ")
(display '((rxmatch-start (#/(\d+)(a)/ "a345a") 2)))
(display ", expects ")
(display '4)
(set! *test-ret* (rxmatch-start (#/(\d+)(a)/ "a345a") 2))(if (equal? *test-ret* '4) (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-start (#/(\d+)(a)/ "a345a") 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-start (#/(\d+)(a)/ "a345a") 2)))))(display "test ")
(display '((rxmatch-after (#/abc/ "123abcdef"))))
(display ", expects ")
(display '"def")
(set! *test-ret* (rxmatch-after (#/abc/ "123abcdef")))(if (equal? *test-ret* '"def") (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-after (#/abc/ "123abcdef")) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-after (#/abc/ "123abcdef"))))))(display "test ")
(display '((rxmatch-after (#/abc/ "123abcあいうえ"))))
(display ", expects ")
(display '"あいうえ")
(set! *test-ret* (rxmatch-after (#/abc/ "123abcあいうえ")))(if (equal? *test-ret* '"あいうえ") (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-after (#/abc/ "123abcあいうえ")) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-after (#/abc/ "123abcあいうえ"))))))(display "test ")
(display '((rxmatch-after (#/かきく/ "123かきくあいうえ"))))
(display ", expects ")
(display '"あいうえ")
(set! *test-ret* (rxmatch-after (#/かきく/ "123かきくあいうえ")))(if (equal? *test-ret* '"あいうえ") (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-after (#/かきく/ "123かきくあいうえ")) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-after (#/かきく/ "123かきくあいうえ"))))))(display "test ")
(display '((rxmatch-before (#/abc/ "123abcdef"))))
(display ", expects ")
(display '"123")
(set! *test-ret* (rxmatch-before (#/abc/ "123abcdef")))(if (equal? *test-ret* '"123") (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-before (#/abc/ "123abcdef")) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-before (#/abc/ "123abcdef"))))))(display "test ")
(display '(((#/abc/ "123abcdef") 0)))
(display ", expects ")
(display '"abc")
(set! *test-ret* ((#/abc/ "123abcdef") 0))(if (equal? *test-ret* '"abc") (display " ===> ok\n") (begin (set! *test-error* (cons '((#/abc/ "123abcdef") 0) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((#/abc/ "123abcdef") 0)))))(display "test ")
(display '(((#/abc/ "123abcdef"))))
(display ", expects ")
(display '"abc")
(set! *test-ret* ((#/abc/ "123abcdef")))(if (equal? *test-ret* '"abc") (display " ===> ok\n") (begin (set! *test-error* (cons '((#/abc/ "123abcdef")) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((#/abc/ "123abcdef"))))))(display "test ")
(display '(((#/abc/ "123abcdef") 'after)))
(display ", expects ")
(display '"def")
(set! *test-ret* ((#/abc/ "123abcdef") 'after))(if (equal? *test-ret* '"def") (display " ===> ok\n") (begin (set! *test-error* (cons '((#/abc/ "123abcdef") 'after) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((#/abc/ "123abcdef") 'after)))))(display "test ")
(display '(((#/abc/ "123abcdef") 'before)))
(display ", expects ")
(display '"123")
(set! *test-ret* ((#/abc/ "123abcdef") 'before))(if (equal? *test-ret* '"123") (display " ===> ok\n") (begin (set! *test-error* (cons '((#/abc/ "123abcdef") 'before) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((#/abc/ "123abcdef") 'before)))))(display "test ")
(display '((rxmatch #/123/ "12")))
(display ", expects ")
(display '#f)
(set! *test-ret* (rxmatch #/123/ "12"))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch #/123/ "12") *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch #/123/ "12")))))(display "test ")
(display '((#/123/ "12")))
(display ", expects ")
(display '#f)
(set! *test-ret* (#/123/ "12"))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(#/123/ "12") *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((#/123/ "12")))))(display "test ")
(display '((if (#/^abc/ "abc") #t #f)))
(display ", expects ")
(display '#t)
(set! *test-ret* (if (#/^abc/ "abc") #t #f))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(if (#/^abc/ "abc") #t #f) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((if (#/^abc/ "abc") #t #f)))))(display "test ")
(display '((regexp->string #/abc/)))
(display ", expects ")
(display '"abc")
(set! *test-ret* (regexp->string #/abc/))(if (equal? *test-ret* '"abc") (display " ===> ok\n") (begin (set! *test-error* (cons '(regexp->string #/abc/) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((regexp->string #/abc/)))))(display "test ")
(display '((rxmatch-start (#/\d+/ "aaaa"))))
(display ", expects ")
(display '#f)
(set! *test-ret* (rxmatch-start (#/\d+/ "aaaa")))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-start (#/\d+/ "aaaa")) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-start (#/\d+/ "aaaa"))))))(display "test ")
(display '((rxmatch-end (#/\d+/ "a345a"))))
(display ", expects ")
(display '4)
(set! *test-ret* (rxmatch-end (#/\d+/ "a345a")))(if (equal? *test-ret* '4) (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-end (#/\d+/ "a345a")) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-end (#/\d+/ "a345a"))))))(display "test ")
(display '((rxmatch-end (#/(\d+)(a)/ "a345a") 1)))
(display ", expects ")
(display '4)
(set! *test-ret* (rxmatch-end (#/(\d+)(a)/ "a345a") 1))(if (equal? *test-ret* '4) (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-end (#/(\d+)(a)/ "a345a") 1) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-end (#/(\d+)(a)/ "a345a") 1)))))(display "test ")
(display '((rxmatch-end (#/(\d+)(a)/ "a345a") 2)))
(display ", expects ")
(display '5)
(set! *test-ret* (rxmatch-end (#/(\d+)(a)/ "a345a") 2))(if (equal? *test-ret* '5) (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-end (#/(\d+)(a)/ "a345a") 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-end (#/(\d+)(a)/ "a345a") 2)))))(display "test ")
(display '((rxmatch-end (#/\d+/ "aaaa"))))
(display ", expects ")
(display '#f)
(set! *test-ret* (rxmatch-end (#/\d+/ "aaaa")))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-end (#/\d+/ "aaaa")) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-end (#/\d+/ "aaaa"))))))(display "test ")
(display '((rxmatch #/123/ "12")))
(display ", expects ")
(display '#f)
(set! *test-ret* (rxmatch #/123/ "12"))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch #/123/ "12") *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch #/123/ "12")))))(display "test ")
(display '((if (rxmatch #/123/ "123") #t #f)))
(display ", expects ")
(display '#t)
(set! *test-ret* (if (rxmatch #/123/ "123") #t #f))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(if (rxmatch #/123/ "123") #t #f) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((if (rxmatch #/123/ "123") #t #f)))))(display "test ")
(display '((#/123/ "12")))
(display ", expects ")
(display '#f)
(set! *test-ret* (#/123/ "12"))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(#/123/ "12") *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((#/123/ "12")))))(display "test ")
(display '((if (#/^abc/ "abc") #t #f)))
(display ", expects ")
(display '#t)
(set! *test-ret* (if (#/^abc/ "abc") #t #f))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(if (#/^abc/ "abc") #t #f) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((if (#/^abc/ "abc") #t #f)))))(display "test ")
(display '((regexp? #/abc/)))
(display ", expects ")
(display '#t)
(set! *test-ret* (regexp? #/abc/))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(regexp? #/abc/) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((regexp? #/abc/)))))(display "test ")
(display '((regexp? "abc")))
(display ", expects ")
(display '#f)
(set! *test-ret* (regexp? "abc"))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(regexp? "abc") *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((regexp? "abc")))))(display "test ")
(display '((regexp->string #/abc/)))
(display ", expects ")
(display '"abc")
(set! *test-ret* (regexp->string #/abc/))(if (equal? *test-ret* '"abc") (display " ===> ok\n") (begin (set! *test-error* (cons '(regexp->string #/abc/) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((regexp->string #/abc/)))))(display "test ")
(display '((rxmatch-start (#/\d+/ "a345a"))))
(display ", expects ")
(display '1)
(set! *test-ret* (rxmatch-start (#/\d+/ "a345a")))(if (equal? *test-ret* '1) (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-start (#/\d+/ "a345a")) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-start (#/\d+/ "a345a"))))))(display "test ")
(display '((rxmatch-substring (#/\d+/ "a345a"))))
(display ", expects ")
(display '"345")
(set! *test-ret* (rxmatch-substring (#/\d+/ "a345a")))(if (equal? *test-ret* '"345") (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-substring (#/\d+/ "a345a")) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-substring (#/\d+/ "a345a"))))))(display "test ")
(display '((rxmatch-substring (#/(\d+)(a)/ "a345a") 1)))
(display ", expects ")
(display '"345")
(set! *test-ret* (rxmatch-substring (#/(\d+)(a)/ "a345a") 1))(if (equal? *test-ret* '"345") (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-substring (#/(\d+)(a)/ "a345a") 1) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-substring (#/(\d+)(a)/ "a345a") 1)))))(display "test ")
(display '((rxmatch-substring (#/(\d+)(a)/ "a345a") 2)))
(display ", expects ")
(display '"a")
(set! *test-ret* (rxmatch-substring (#/(\d+)(a)/ "a345a") 2))(if (equal? *test-ret* '"a") (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-substring (#/(\d+)(a)/ "a345a") 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-substring (#/(\d+)(a)/ "a345a") 2)))))(display "test ")
(display '((rxmatch-substring (#/\d+/ "aaaa"))))
(display ", expects ")
(display '#f)
(set! *test-ret* (rxmatch-substring (#/\d+/ "aaaa")))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(rxmatch-substring (#/\d+/ "aaaa")) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((rxmatch-substring (#/\d+/ "aaaa"))))))(display "test ")
(display '(((#/あ/ "あ"))))
(display ", expects ")
(display '"あ")
(set! *test-ret* ((#/あ/ "あ")))(if (equal? *test-ret* '"あ") (display " ===> ok\n") (begin (set! *test-error* (cons '((#/あ/ "あ")) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((#/あ/ "あ"))))))(display "test ")
(display '((string->regexp "abc")))
(display ", expects ")
(display '#/abc/)
(set! *test-ret* (string->regexp "abc"))(if (equal? *test-ret* '#/abc/) (display " ===> ok\n") (begin (set! *test-error* (cons '(string->regexp "abc") *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((string->regexp "abc")))))(display "test ")
(display '((let1 m (#/^#([^(^)^\s]+)(?:\(([^\)]+)\))?/ "#comment") (m 2))))
(display ", expects ")
(display '#f)
(set! *test-ret* (let1 m (#/^#([^(^)^\s]+)(?:\(([^\)]+)\))?/ "#comment") (m 2)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 m (#/^#([^(^)^\s]+)(?:\(([^\)]+)\))?/ "#comment") (m 2)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 m (#/^#([^(^)^\s]+)(?:\(([^\)]+)\))?/ "#comment") (m 2))))))(display "test ")
(display '((begin (let ((xxx 'a)) (case xxx ((b) 'b) ((a) 'a))))))
(display ", expects ")
(display 'a)
(set! *test-ret* (begin (let ((xxx 'a)) (case xxx ((b) 'b) ((a) 'a)))))(if (equal? *test-ret* 'a) (display " ===> ok\n") (begin (set! *test-error* (cons '(begin (let ((xxx 'a)) (case xxx ((b) 'b) ((a) 'a)))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((begin (let ((xxx 'a)) (case xxx ((b) 'b) ((a) 'a))))))))(display "test ")
(display '((begin (let ((xxy 'a)) (case xxy ((b) 'b) ((c) 'c) (else 3))))))
(display ", expects ")
(display '3)
(set! *test-ret* (begin (let ((xxy 'a)) (case xxy ((b) 'b) ((c) 'c) (else 3)))))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(begin (let ((xxy 'a)) (case xxy ((b) 'b) ((c) 'c) (else 3)))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((begin (let ((xxy 'a)) (case xxy ((b) 'b) ((c) 'c) (else 3))))))))(display "test ")
(display '(((lambda (a) (call/cc (lambda (c) (c -1) 4))) 2)))
(display ", expects ")
(display '-1)
(set! *test-ret* ((lambda (a) (call/cc (lambda (c) (c -1) 4))) 2))(if (equal? *test-ret* '-1) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda (a) (call/cc (lambda (c) (c -1) 4))) 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda (a) (call/cc (lambda (c) (c -1) 4))) 2)))))(display "test ")
(display '((* 2 3)))
(display ", expects ")
(display '6)
(set! *test-ret* (* 2 3))(if (equal? *test-ret* '6) (display " ===> ok\n") (begin (set! *test-error* (cons '(* 2 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((* 2 3)))))(display "test ")
(display '((* 2 3 4)))
(display ", expects ")
(display '24)
(set! *test-ret* (* 2 3 4))(if (equal? *test-ret* '24) (display " ===> ok\n") (begin (set! *test-error* (cons '(* 2 3 4) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((* 2 3 4)))))(display "test ")
(display '((call/cc (lambda (c) (c 4)))))
(display ", expects ")
(display '4)
(set! *test-ret* (call/cc (lambda (c) (c 4))))(if (equal? *test-ret* '4) (display " ===> ok\n") (begin (set! *test-error* (cons '(call/cc (lambda (c) (c 4))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((call/cc (lambda (c) (c 4)))))))(display "test ")
(display '((string->number "123")))
(display ", expects ")
(display '123)
(set! *test-ret* (string->number "123"))(if (equal? *test-ret* '123) (display " ===> ok\n") (begin (set! *test-error* (cons '(string->number "123") *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((string->number "123")))))(display "test ")
(display '((let ((p (open-string-input-port "123 456"))) (read p))))
(display ", expects ")
(display '123)
(set! *test-ret* (let ((p (open-string-input-port "123 456"))) (read p)))(if (equal? *test-ret* '123) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((p (open-string-input-port "123 456"))) (read p)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((p (open-string-input-port "123 456"))) (read p))))))(display "test ")
(display '((let ((p (open-string-input-port "123 456"))) (read-char p))))
(display ", expects ")
(display '#\1)
(set! *test-ret* (let ((p (open-string-input-port "123 456"))) (read-char p)))(if (equal? *test-ret* '#\1) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((p (open-string-input-port "123 456"))) (read-char p)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((p (open-string-input-port "123 456"))) (read-char p))))))(display "test ")
(display '((reverse '(1 2 3 4))))
(display ", expects ")
(display '(4 3 2 1))
(set! *test-ret* (reverse '(1 2 3 4)))(if (equal? *test-ret* '(4 3 2 1)) (display " ===> ok\n") (begin (set! *test-error* (cons '(reverse '(1 2 3 4)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((reverse '(1 2 3 4))))))(display "test ")
(display '((string-split "wiki&cmd" #\&)))
(display ", expects ")
(display '("wiki" "cmd"))
(set! *test-ret* (string-split "wiki&cmd" #\&))(if (equal? *test-ret* '("wiki" "cmd")) (display " ===> ok\n") (begin (set! *test-error* (cons '(string-split "wiki&cmd" #\&) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((string-split "wiki&cmd" #\&)))))(display "test ")
(display '((begin (define str1 (make-string 3 #\c)) (string-set! str1 1 #\b) str1)))
(display ", expects ")
(display '"cbc")
(set! *test-ret* (begin (define str1 (make-string 3 #\c)) (string-set! str1 1 #\b) str1))(if (equal? *test-ret* '"cbc") (display " ===> ok\n") (begin (set! *test-error* (cons '(begin (define str1 (make-string 3 #\c)) (string-set! str1 1 #\b) str1) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((begin (define str1 (make-string 3 #\c)) (string-set! str1 1 #\b) str1)))))(display "test ")
(display '(((lambda (a) (call/cc (lambda (c) (c -1)))) 2)))
(display ", expects ")
(display '-1)
(set! *test-ret* ((lambda (a) (call/cc (lambda (c) (c -1)))) 2))(if (equal? *test-ret* '-1) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda (a) (call/cc (lambda (c) (c -1)))) 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda (a) (call/cc (lambda (c) (c -1)))) 2)))))(display "test ")
(display '((let* ((a 0) (b (lambda (x y) a))) (b (begin (set! a 1)) (begin (set! a 2))))))
(display ", expects ")
(display '2)
(set! *test-ret* (let* ((a 0) (b (lambda (x y) a))) (b (begin (set! a 1)) (begin (set! a 2)))))(if (equal? *test-ret* '2) (display " ===> ok\n") (begin (set! *test-error* (cons '(let* ((a 0) (b (lambda (x y) a))) (b (begin (set! a 1)) (begin (set! a 2)))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let* ((a 0) (b (lambda (x y) a))) (b (begin (set! a 1)) (begin (set! a 2))))))))(display "test ")
(display '(#\a))
(display ", expects ")
(display '#\a)
(set! *test-ret* #\a)(if (equal? *test-ret* '#\a) (display " ===> ok\n") (begin (set! *test-error* (cons '#\a *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(#\a))))(display "test ")
(display '((eof-object? 3)))
(display ", expects ")
(display '#f)
(set! *test-ret* (eof-object? 3))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(eof-object? 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((eof-object? 3)))))(display "test ")
(display '(101))
(display ", expects ")
(display '101)
(set! *test-ret* 101)(if (equal? *test-ret* '101) (display " ===> ok\n") (begin (set! *test-error* (cons '101 *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(101))))(display "test ")
(display '((define val 3) (define (func8) (define val 4) val) (func8)))
(display ", expects ")
(display '4)
(define val 3)(define (func8) (define val 4) val)(set! *test-ret* (func8))(if (equal? *test-ret* '4) (display " ===> ok\n") (begin (set! *test-error* (cons (quote (define val 3) (define (func8) (define val 4) val) (func8)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((define val 3) (define (func8) (define val 4) val) (func8)))))(display "test ")
(display '(((lambda () (define p (cons 1 2)) (set-cdr! p 3) p))))
(display ", expects ")
(display '(1 . 3))
(set! *test-ret* ((lambda () (define p (cons 1 2)) (set-cdr! p 3) p)))(if (equal? *test-ret* '(1 . 3)) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda () (define p (cons 1 2)) (set-cdr! p 3) p)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda () (define p (cons 1 2)) (set-cdr! p 3) p))))))(display "test ")
(display '(((lambda () (define q (cons 1 2)) (set-car! q 3) q))))
(display ", expects ")
(display '(3 . 2))
(set! *test-ret* ((lambda () (define q (cons 1 2)) (set-car! q 3) q)))(if (equal? *test-ret* '(3 . 2)) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda () (define q (cons 1 2)) (set-car! q 3) q)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda () (define q (cons 1 2)) (set-car! q 3) q))))))(display "test ")
(display '((begin (display "test done") #t)))
(display ", expects ")
(display '#t)
(set! *test-ret* (begin (display "test done") #t))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(begin (display "test done") #t) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((begin (display "test done") #t)))))(display "test ")
(display '((vector-length (make-vector 3))))
(display ", expects ")
(display '3)
(set! *test-ret* (vector-length (make-vector 3)))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(vector-length (make-vector 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((vector-length (make-vector 3))))))(display "test ")
(display '((let loop ((i 0)) (if (= i 100) (+ i 1) (loop (+ i 1))))))
(display ", expects ")
(display '101)
(set! *test-ret* (let loop ((i 0)) (if (= i 100) (+ i 1) (loop (+ i 1)))))(if (equal? *test-ret* '101) (display " ===> ok\n") (begin (set! *test-error* (cons '(let loop ((i 0)) (if (= i 100) (+ i 1) (loop (+ i 1)))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let loop ((i 0)) (if (= i 100) (+ i 1) (loop (+ i 1))))))))(display "test ")
(display '(((lambda (cont) (if (call/cc (lambda (c) (set! cont c))) (cont #f) 3)) '())))
(display ", expects ")
(display '3)
(set! *test-ret* ((lambda (cont) (if (call/cc (lambda (c) (set! cont c))) (cont #f) 3)) '()))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda (cont) (if (call/cc (lambda (c) (set! cont c))) (cont #f) 3)) '()) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda (cont) (if (call/cc (lambda (c) (set! cont c))) (cont #f) 3)) '())))))(display "test ")
(display '(((lambda (cont) (if (call/cc (lambda (c) (set! cont c))) ((lambda () ((lambda () (cont #f))))) 102)) '())))
(display ", expects ")
(display '102)
(set! *test-ret* ((lambda (cont) (if (call/cc (lambda (c) (set! cont c))) ((lambda () ((lambda () (cont #f))))) 102)) '()))(if (equal? *test-ret* '102) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda (cont) (if (call/cc (lambda (c) (set! cont c))) ((lambda () ((lambda () (cont #f))))) 102)) '()) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda (cont) (if (call/cc (lambda (c) (set! cont c))) ((lambda () ((lambda () (cont #f))))) 102)) '())))))(display "test ")
(display '((let ((a 0)) (cond (#t (set! a (+ a 1)) (set! a (+ a 1)) a)))))
(display ", expects ")
(display '2)
(set! *test-ret* (let ((a 0)) (cond (#t (set! a (+ a 1)) (set! a (+ a 1)) a))))(if (equal? *test-ret* '2) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((a 0)) (cond (#t (set! a (+ a 1)) (set! a (+ a 1)) a))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((a 0)) (cond (#t (set! a (+ a 1)) (set! a (+ a 1)) a)))))))(display "test ")
(display '((char? #\あ)))
(display ", expects ")
(display '#t)
(set! *test-ret* (char? #\あ))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(char? #\あ) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((char? #\あ)))))(display "test ")
(display '((eq? (list 'a) (list 'a))))
(display ", expects ")
(display '#f)
(set! *test-ret* (eq? (list 'a) (list 'a)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(eq? (list 'a) (list 'a)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((eq? (list 'a) (list 'a))))))(display "test ")
(display '((let ((x (list 'a))) (eq? x x))))
(display ", expects ")
(display '#t)
(set! *test-ret* (let ((x (list 'a))) (eq? x x)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((x (list 'a))) (eq? x x)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((x (list 'a))) (eq? x x))))))(display "test ")
(display '((map1 (lambda (s) (string-append s "123")) '("ABC" "DEF"))))
(display ", expects ")
(display '("ABC123" "DEF123"))
(set! *test-ret* (map1 (lambda (s) (string-append s "123")) '("ABC" "DEF")))(if (equal? *test-ret* '("ABC123" "DEF123")) (display " ===> ok\n") (begin (set! *test-error* (cons '(map1 (lambda (s) (string-append s "123")) '("ABC" "DEF")) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((map1 (lambda (s) (string-append s "123")) '("ABC" "DEF"))))))(display "test ")
(display '((map (lambda (s) (string-append s "123")) '("ABC" "DEF"))))
(display ", expects ")
(display '("ABC123" "DEF123"))
(set! *test-ret* (map (lambda (s) (string-append s "123")) '("ABC" "DEF")))(if (equal? *test-ret* '("ABC123" "DEF123")) (display " ===> ok\n") (begin (set! *test-error* (cons '(map (lambda (s) (string-append s "123")) '("ABC" "DEF")) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((map (lambda (s) (string-append s "123")) '("ABC" "DEF"))))))(display "test ")
(display '((map (lambda (a b) (string-append a b)) '("ABC" "DEF") '("GHI" "JKL"))))
(display ", expects ")
(display '("ABCGHI" "DEFJKL"))
(set! *test-ret* (map (lambda (a b) (string-append a b)) '("ABC" "DEF") '("GHI" "JKL")))(if (equal? *test-ret* '("ABCGHI" "DEFJKL")) (display " ===> ok\n") (begin (set! *test-error* (cons '(map (lambda (a b) (string-append a b)) '("ABC" "DEF") '("GHI" "JKL")) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((map (lambda (a b) (string-append a b)) '("ABC" "DEF") '("GHI" "JKL"))))))(display "test ")
(display '((map (lambda (a b) (* a b)) '(1 2 3) '(4 5 6))))
(display ", expects ")
(display '(4 10 18))
(set! *test-ret* (map (lambda (a b) (* a b)) '(1 2 3) '(4 5 6)))(if (equal? *test-ret* '(4 10 18)) (display " ===> ok\n") (begin (set! *test-error* (cons '(map (lambda (a b) (* a b)) '(1 2 3) '(4 5 6)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((map (lambda (a b) (* a b)) '(1 2 3) '(4 5 6))))))(display "test ")
(display '((let1 a '() (let1 G68 (lambda (i) (if (>= i 10000) i (a (+ i 1)))) (set! a G68) (a 0)))))
(display ", expects ")
(display '10000)
(set! *test-ret* (let1 a '() (let1 G68 (lambda (i) (if (>= i 10000) i (a (+ i 1)))) (set! a G68) (a 0))))(if (equal? *test-ret* '10000) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 a '() (let1 G68 (lambda (i) (if (>= i 10000) i (a (+ i 1)))) (set! a G68) (a 0))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 a '() (let1 G68 (lambda (i) (if (>= i 10000) i (a (+ i 1)))) (set! a G68) (a 0)))))))(display "test ")
(display '(`(list ,(+ 1 2) 4)))
(display ", expects ")
(display '(list 3 4))
(set! *test-ret* `(list ,(+ 1 2) 4))(if (equal? *test-ret* '(list 3 4)) (display " ===> ok\n") (begin (set! *test-error* (cons '`(list ,(+ 1 2) 4) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(`(list ,(+ 1 2) 4)))))(display "test ")
(display '((let ((name 'a)) `(list ,name ',name))))
(display ", expects ")
(display '(list a 'a))
(set! *test-ret* (let ((name 'a)) `(list ,name ',name)))(if (equal? *test-ret* '(list a 'a)) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((name 'a)) `(list ,name ',name)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((name 'a)) `(list ,name ',name))))))(display "test ")
(display '(`(a ,(+ 1 2) ,@(map abs '(4 -5 6)) b)))
(display ", expects ")
(display '(a 3 4 5 6 b))
(set! *test-ret* `(a ,(+ 1 2) ,@(map abs '(4 -5 6)) b))(if (equal? *test-ret* '(a 3 4 5 6 b)) (display " ===> ok\n") (begin (set! *test-error* (cons '`(a ,(+ 1 2) ,@(map abs '(4 -5 6)) b) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(`(a ,(+ 1 2) ,@(map abs '(4 -5 6)) b)))))(display "test ")
(display '((vector? #(3))))
(display ", expects ")
(display '#t)
(set! *test-ret* (vector? #(3)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(vector? #(3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((vector? #(3))))))(display "test ")
(display '((begin (define (proc-01) 3) (proc-01))))
(display ", expects ")
(display '3)
(set! *test-ret* (begin (define (proc-01) 3) (proc-01)))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(begin (define (proc-01) 3) (proc-01)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((begin (define (proc-01) 3) (proc-01))))))(display "test ")
(display '((begin (define (add3 a b) (+ a b)) (add3 1 2))))
(display ", expects ")
(display '3)
(set! *test-ret* (begin (define (add3 a b) (+ a b)) (add3 1 2)))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(begin (define (add3 a b) (+ a b)) (add3 1 2)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((begin (define (add3 a b) (+ a b)) (add3 1 2))))))(display "test ")
(display '((begin (define add2 (lambda (a b) (+ a b))) (add2 1 2))))
(display ", expects ")
(display '3)
(set! *test-ret* (begin (define add2 (lambda (a b) (+ a b))) (add2 1 2)))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(begin (define add2 (lambda (a b) (+ a b))) (add2 1 2)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((begin (define add2 (lambda (a b) (+ a b))) (add2 1 2))))))(display "test ")
(display '((begin (define z (make-vector 2)) (vector-set! z 0 1) (vector-set! z 1 2) (make-vector 3) (null? 3) (vector-set! z 1 3) (vector-ref z 1))))
(display ", expects ")
(display '3)
(set! *test-ret* (begin (define z (make-vector 2)) (vector-set! z 0 1) (vector-set! z 1 2) (make-vector 3) (null? 3) (vector-set! z 1 3) (vector-ref z 1)))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(begin (define z (make-vector 2)) (vector-set! z 0 1) (vector-set! z 1 2) (make-vector 3) (null? 3) (vector-set! z 1 3) (vector-ref z 1)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((begin (define z (make-vector 2)) (vector-set! z 0 1) (vector-set! z 1 2) (make-vector 3) (null? 3) (vector-set! z 1 3) (vector-ref z 1))))))(display "test ")
(display '((begin (define (proc-2) (define (rec) 3) (rec)) (proc-2))))
(display ", expects ")
(display '3)
(set! *test-ret* (begin (define (proc-2) (define (rec) 3) (rec)) (proc-2)))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(begin (define (proc-2) (define (rec) 3) (rec)) (proc-2)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((begin (define (proc-2) (define (rec) 3) (rec)) (proc-2))))))(display "test ")
(display '((begin (define (func2) (define val 4) val) (func2))))
(display ", expects ")
(display '4)
(set! *test-ret* (begin (define (func2) (define val 4) val) (func2)))(if (equal? *test-ret* '4) (display " ===> ok\n") (begin (set! *test-error* (cons '(begin (define (func2) (define val 4) val) (func2)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((begin (define (func2) (define val 4) val) (func2))))))(display "test ")
(display '((if (values 1 2 3) #t #f)))
(display ", expects ")
(display '#t)
(set! *test-ret* (if (values 1 2 3) #t #f))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(if (values 1 2 3) #t #f) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((if (values 1 2 3) #t #f)))))(display "test ")
(display '((call-with-values (lambda () (values 4 5)) (lambda (a b) b))))
(display ", expects ")
(display '5)
(set! *test-ret* (call-with-values (lambda () (values 4 5)) (lambda (a b) b)))(if (equal? *test-ret* '5) (display " ===> ok\n") (begin (set! *test-error* (cons '(call-with-values (lambda () (values 4 5)) (lambda (a b) b)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((call-with-values (lambda () (values 4 5)) (lambda (a b) b))))))(display "test ")
(display '((call-with-values (lambda () (values 1 2 3)) (lambda (a b c) (+ a b c)))))
(display ", expects ")
(display '6)
(set! *test-ret* (call-with-values (lambda () (values 1 2 3)) (lambda (a b c) (+ a b c))))(if (equal? *test-ret* '6) (display " ===> ok\n") (begin (set! *test-error* (cons '(call-with-values (lambda () (values 1 2 3)) (lambda (a b c) (+ a b c))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((call-with-values (lambda () (values 1 2 3)) (lambda (a b c) (+ a b c)))))))(display "test ")
(display '((call-with-values (lambda () (values 1 2 3)) list)))
(display ", expects ")
(display '(1 2 3))
(set! *test-ret* (call-with-values (lambda () (values 1 2 3)) list))(if (equal? *test-ret* '(1 2 3)) (display " ===> ok\n") (begin (set! *test-error* (cons '(call-with-values (lambda () (values 1 2 3)) list) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((call-with-values (lambda () (values 1 2 3)) list)))))(display "test ")
(display '((call-with-values (lambda () 1) (lambda (x) (+ x 1234)))))
(display ", expects ")
(display '1235)
(set! *test-ret* (call-with-values (lambda () 1) (lambda (x) (+ x 1234))))(if (equal? *test-ret* '1235) (display " ===> ok\n") (begin (set! *test-error* (cons '(call-with-values (lambda () 1) (lambda (x) (+ x 1234))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((call-with-values (lambda () 1) (lambda (x) (+ x 1234)))))))(display "test ")
(display '((receive (a b c) (values 1 2 3) (+ a b c))))
(display ", expects ")
(display '6)
(set! *test-ret* (receive (a b c) (values 1 2 3) (+ a b c)))(if (equal? *test-ret* '6) (display " ===> ok\n") (begin (set! *test-error* (cons '(receive (a b c) (values 1 2 3) (+ a b c)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((receive (a b c) (values 1 2 3) (+ a b c))))))(display "test ")
(display '((receive z (values 'x 'y) z)))
(display ", expects ")
(display '(x y))
(set! *test-ret* (receive z (values 'x 'y) z))(if (equal? *test-ret* '(x y)) (display " ===> ok\n") (begin (set! *test-error* (cons '(receive z (values 'x 'y) z) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((receive z (values 'x 'y) z)))))(display "test ")
(display '((receive (a . b) (values 'x 'y 'z) b)))
(display ", expects ")
(display '(y z))
(set! *test-ret* (receive (a . b) (values 'x 'y 'z) b))(if (equal? *test-ret* '(y z)) (display " ===> ok\n") (begin (set! *test-error* (cons '(receive (a . b) (values 'x 'y 'z) b) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((receive (a . b) (values 'x 'y 'z) b)))))(display "test ")
(display '((receive (a . b) (values 'x 'y 'z) a)))
(display ", expects ")
(display 'x)
(set! *test-ret* (receive (a . b) (values 'x 'y 'z) a))(if (equal? *test-ret* 'x) (display " ===> ok\n") (begin (set! *test-error* (cons '(receive (a . b) (values 'x 'y 'z) a) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((receive (a . b) (values 'x 'y 'z) a)))))(display "test ")
(display '((receive x (apply values '(1 2 3)) x)))
(display ", expects ")
(display '(1 2 3))
(set! *test-ret* (receive x (apply values '(1 2 3)) x))(if (equal? *test-ret* '(1 2 3)) (display " ===> ok\n") (begin (set! *test-error* (cons '(receive x (apply values '(1 2 3)) x) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((receive x (apply values '(1 2 3)) x)))))(display "test ")
(display '((call-with-values (lambda () (values 1 2)) cons)))
(display ", expects ")
(display '(1 . 2))
(set! *test-ret* (call-with-values (lambda () (values 1 2)) cons))(if (equal? *test-ret* '(1 . 2)) (display " ===> ok\n") (begin (set! *test-error* (cons '(call-with-values (lambda () (values 1 2)) cons) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((call-with-values (lambda () (values 1 2)) cons)))))(display "test ")
(display '((receive (port proc) (open-string-output-port) (display "hige" port) (display "pon" port) (proc))))
(display ", expects ")
(display '"higepon")
(set! *test-ret* (receive (port proc) (open-string-output-port) (display "hige" port) (display "pon" port) (proc)))(if (equal? *test-ret* '"higepon") (display " ===> ok\n") (begin (set! *test-error* (cons '(receive (port proc) (open-string-output-port) (display "hige" port) (display "pon" port) (proc)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((receive (port proc) (open-string-output-port) (display "hige" port) (display "pon" port) (proc))))))(display "test ")
(display '((call-with-string-output-port (lambda (port) (write "string" port)))))
(display ", expects ")
(display '"\"string\"")
(set! *test-ret* (call-with-string-output-port (lambda (port) (write "string" port))))(if (equal? *test-ret* '"\"string\"") (display " ===> ok\n") (begin (set! *test-error* (cons '(call-with-string-output-port (lambda (port) (write "string" port))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((call-with-string-output-port (lambda (port) (write "string" port)))))))(display "test ")
(display '((regexp-replace #/abc/ "123abc456" "ABC")))
(display ", expects ")
(display '"123ABC456")
(set! *test-ret* (regexp-replace #/abc/ "123abc456" "ABC"))(if (equal? *test-ret* '"123ABC456") (display " ===> ok\n") (begin (set! *test-error* (cons '(regexp-replace #/abc/ "123abc456" "ABC") *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((regexp-replace #/abc/ "123abc456" "ABC")))))(init-library-table)
(display "test ")
(display '((library (higepon) (export hello) (import) (define hello "hello higepon\n")) (import (higepon)) hello))
(display ", expects ")
(display '"hello higepon\n")
(library (higepon) (export hello) (import) (define hello "hello higepon\n"))(import (higepon))(set! *test-ret* hello)(if (equal? *test-ret* '"hello higepon\n") (display " ===> ok\n") (begin (set! *test-error* (cons (quote (library (higepon) (export hello) (import) (define hello "hello higepon\n")) (import (higepon)) hello) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((library (higepon) (export hello) (import) (define hello "hello higepon\n")) (import (higepon)) hello))))(init-library-table)
(display "test ")
(display '((library (higepon2) (export hello) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (higepon2)) hello))
(display ", expects ")
(display '"hello higepon\n")
(library (higepon2) (export hello) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n"))(import (higepon2))(set! *test-ret* hello)(if (equal? *test-ret* '"hello higepon\n") (display " ===> ok\n") (begin (set! *test-error* (cons (quote (library (higepon2) (export hello) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (higepon2)) hello) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((library (higepon2) (export hello) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (higepon2)) hello))))(init-library-table)
(display "test ")
(display '((library (higepon3) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (higepon3)) hello goodbye))
(display ", expects ")
(display '"goodbye higepon\n")
(library (higepon3) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n"))(import (higepon3))hello(set! *test-ret* goodbye)(if (equal? *test-ret* '"goodbye higepon\n") (display " ===> ok\n") (begin (set! *test-error* (cons (quote (library (higepon3) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (higepon3)) hello goodbye) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((library (higepon3) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (higepon3)) hello goodbye))))(init-library-table)
(display "test ")
(display '((library (higepon4) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (only (higepon4) hello)) hello))
(display ", expects ")
(display '"hello higepon\n")
(library (higepon4) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n"))(import (only (higepon4) hello))(set! *test-ret* hello)(if (equal? *test-ret* '"hello higepon\n") (display " ===> ok\n") (begin (set! *test-error* (cons (quote (library (higepon4) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (only (higepon4) hello)) hello) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((library (higepon4) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (only (higepon4) hello)) hello))))(init-library-table)
(display "test ")
(display '((library (higepon5) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (except (higepon5) hello)) goodbye))
(display ", expects ")
(display '"goodbye higepon\n")
(library (higepon5) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n"))(import (except (higepon5) hello))(set! *test-ret* goodbye)(if (equal? *test-ret* '"goodbye higepon\n") (display " ===> ok\n") (begin (set! *test-error* (cons (quote (library (higepon5) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (except (higepon5) hello)) goodbye) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((library (higepon5) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (except (higepon5) hello)) goodbye))))(init-library-table)
(display "test ")
(display '((library (higepon6) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (rename (higepon6) (hello hige:hello))) hige:hello))
(display ", expects ")
(display '"hello higepon\n")
(library (higepon6) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n"))(import (rename (higepon6) (hello hige:hello)))(set! *test-ret* hige:hello)(if (equal? *test-ret* '"hello higepon\n") (display " ===> ok\n") (begin (set! *test-error* (cons (quote (library (higepon6) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (rename (higepon6) (hello hige:hello))) hige:hello) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((library (higepon6) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (rename (higepon6) (hello hige:hello))) hige:hello))))(init-library-table)
(display "test ")
(display '((library (higepon7) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (prefix (higepon7) higepon.)) higepon.goodbye))
(display ", expects ")
(display '"goodbye higepon\n")
(library (higepon7) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n"))(import (prefix (higepon7) higepon.))(set! *test-ret* higepon.goodbye)(if (equal? *test-ret* '"goodbye higepon\n") (display " ===> ok\n") (begin (set! *test-error* (cons (quote (library (higepon7) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (prefix (higepon7) higepon.)) higepon.goodbye) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((library (higepon7) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (prefix (higepon7) higepon.)) higepon.goodbye))))(init-library-table)
(display "test ")
(display '((library (higepon8) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (library (ipod (3)) (export play) (import) (define play "lulululu")) (import (prefix (higepon8) higepon.) (ipod)) (string-append play higepon.hello)))
(display ", expects ")
(display '"lulululuhello higepon\n")
(library (higepon8) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n"))(library (ipod (3)) (export play) (import) (define play "lulululu"))(import (prefix (higepon8) higepon.) (ipod))(set! *test-ret* (string-append play higepon.hello))(if (equal? *test-ret* '"lulululuhello higepon\n") (display " ===> ok\n") (begin (set! *test-error* (cons (quote (library (higepon8) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (library (ipod (3)) (export play) (import) (define play "lulululu")) (import (prefix (higepon8) higepon.) (ipod)) (string-append play higepon.hello)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((library (higepon8) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (library (ipod (3)) (export play) (import) (define play "lulululu")) (import (prefix (higepon8) higepon.) (ipod)) (string-append play higepon.hello)))))(init-library-table)
(display "test ")
(display '((library (higepon9 (7)) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (prefix (higepon9 (6)) higepon.)) higepon.goodbye))
(display ", expects ")
(display '"goodbye higepon\n")
(library (higepon9 (7)) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n"))(import (prefix (higepon9 (6)) higepon.))(set! *test-ret* higepon.goodbye)(if (equal? *test-ret* '"goodbye higepon\n") (display " ===> ok\n") (begin (set! *test-error* (cons (quote (library (higepon9 (7)) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (prefix (higepon9 (6)) higepon.)) higepon.goodbye) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((library (higepon9 (7)) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (prefix (higepon9 (6)) higepon.)) higepon.goodbye))))(init-library-table)
(display "test ")
(display '((library (higepon10) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (prefix (higepon10) higepon.)) higepon.goodbye))
(display ", expects ")
(display '"goodbye higepon\n")
(library (higepon10) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n"))(import (prefix (higepon10) higepon.))(set! *test-ret* higepon.goodbye)(if (equal? *test-ret* '"goodbye higepon\n") (display " ===> ok\n") (begin (set! *test-error* (cons (quote (library (higepon10) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (prefix (higepon10) higepon.)) higepon.goodbye) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((library (higepon10) (export hello goodbye) (import) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (prefix (higepon10) higepon.)) higepon.goodbye))))(init-library-table)
(display "test ")
(display '((library (higepon11) (export hi hello (rename (goodbye bye) (call c))) (import) (define hello "hello higepon\n") (define hi "hi higepon\n") (define goodbye "goodbye higepon\n") (define call "call\n")) (import (higepon11)) (string-append bye hi c)))
(display ", expects ")
(display '"goodbye higepon\nhi higepon\ncall\n")
(library (higepon11) (export hi hello (rename (goodbye bye) (call c))) (import) (define hello "hello higepon\n") (define hi "hi higepon\n") (define goodbye "goodbye higepon\n") (define call "call\n"))(import (higepon11))(set! *test-ret* (string-append bye hi c))(if (equal? *test-ret* '"goodbye higepon\nhi higepon\ncall\n") (display " ===> ok\n") (begin (set! *test-error* (cons (quote (library (higepon11) (export hi hello (rename (goodbye bye) (call c))) (import) (define hello "hello higepon\n") (define hi "hi higepon\n") (define goodbye "goodbye higepon\n") (define call "call\n")) (import (higepon11)) (string-append bye hi c)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((library (higepon11) (export hi hello (rename (goodbye bye) (call c))) (import) (define hello "hello higepon\n") (define hi "hi higepon\n") (define goodbye "goodbye higepon\n") (define call "call\n")) (import (higepon11)) (string-append bye hi c)))))(init-library-table)
(display "test ")
(display '((library (ipod0 (3)) (export play) (import) (define play "lulululu")) (library (higepon12) (export hello goodby play) (import (ipod0)) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (higepon12)) (string-append play hello)))
(display ", expects ")
(display '"lulululuhello higepon\n")
(library (ipod0 (3)) (export play) (import) (define play "lulululu"))(library (higepon12) (export hello goodby play) (import (ipod0)) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n"))(import (higepon12))(set! *test-ret* (string-append play hello))(if (equal? *test-ret* '"lulululuhello higepon\n") (display " ===> ok\n") (begin (set! *test-error* (cons (quote (library (ipod0 (3)) (export play) (import) (define play "lulululu")) (library (higepon12) (export hello goodby play) (import (ipod0)) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (higepon12)) (string-append play hello)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((library (ipod0 (3)) (export play) (import) (define play "lulululu")) (library (higepon12) (export hello goodby play) (import (ipod0)) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (higepon12)) (string-append play hello)))))(init-library-table)
(display "test ")
(display '((library (ipod2 (3)) (export play) (import) (define play "lulululu")) (library (higepon13) (export hello goodby play) (import (ipod2)) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (library (hagepon) (export hello) (import (ipod2) (higepon13))) (import (hagepon)) (string-append hello)))
(display ", expects ")
(display '"hello higepon\n")
(library (ipod2 (3)) (export play) (import) (define play "lulululu"))(library (higepon13) (export hello goodby play) (import (ipod2)) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n"))(library (hagepon) (export hello) (import (ipod2) (higepon13)))(import (hagepon))(set! *test-ret* (string-append hello))(if (equal? *test-ret* '"hello higepon\n") (display " ===> ok\n") (begin (set! *test-error* (cons (quote (library (ipod2 (3)) (export play) (import) (define play "lulululu")) (library (higepon13) (export hello goodby play) (import (ipod2)) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (library (hagepon) (export hello) (import (ipod2) (higepon13))) (import (hagepon)) (string-append hello)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((library (ipod2 (3)) (export play) (import) (define play "lulululu")) (library (higepon13) (export hello goodby play) (import (ipod2)) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (library (hagepon) (export hello) (import (ipod2) (higepon13))) (import (hagepon)) (string-append hello)))))(init-library-table)
(display "test ")
(display '((library (ipod4 (3)) (export play) (import) (define play "lulululu")) (library (higepon14) (export hello goodby play) (import (for (ipod4) run)) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (higepon14)) (string-append play hello)))
(display ", expects ")
(display '"lulululuhello higepon\n")
(library (ipod4 (3)) (export play) (import) (define play "lulululu"))(library (higepon14) (export hello goodby play) (import (for (ipod4) run)) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n"))(import (higepon14))(set! *test-ret* (string-append play hello))(if (equal? *test-ret* '"lulululuhello higepon\n") (display " ===> ok\n") (begin (set! *test-error* (cons (quote (library (ipod4 (3)) (export play) (import) (define play "lulululu")) (library (higepon14) (export hello goodby play) (import (for (ipod4) run)) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (higepon14)) (string-append play hello)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((library (ipod4 (3)) (export play) (import) (define play "lulululu")) (library (higepon14) (export hello goodby play) (import (for (ipod4) run)) (define hello "hello higepon\n") (define goodbye "goodbye higepon\n")) (import (higepon14)) (string-append play hello)))))(init-library-table)
(display "test ")
(display '((library (my-macro-lib) (export add3) (import) (define-macro (add3 v) `(+ 3 ,v))) (library (test) (export val) (import (my-macro-lib)) (define val (add3 2))) (import (test)) val))
(display ", expects ")
(display '5)
(library (my-macro-lib) (export add3) (import) (define-macro (add3 v) `(+ 3 ,v)))(library (test) (export val) (import (my-macro-lib)) (define val (add3 2)))(import (test))(set! *test-ret* val)(if (equal? *test-ret* '5) (display " ===> ok\n") (begin (set! *test-error* (cons (quote (library (my-macro-lib) (export add3) (import) (define-macro (add3 v) `(+ 3 ,v))) (library (test) (export val) (import (my-macro-lib)) (define val (add3 2))) (import (test)) val) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((library (my-macro-lib) (export add3) (import) (define-macro (add3 v) `(+ 3 ,v))) (library (test) (export val) (import (my-macro-lib)) (define val (add3 2))) (import (test)) val))))(display "test ")
(display '((cons 'a '())))
(display ", expects ")
(display '(a))
(set! *test-ret* (cons 'a '()))(if (equal? *test-ret* '(a)) (display " ===> ok\n") (begin (set! *test-error* (cons '(cons 'a '()) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((cons 'a '())))))(display "test ")
(display '((cons '(a) '(b c d))))
(display ", expects ")
(display '((a) b c d))
(set! *test-ret* (cons '(a) '(b c d)))(if (equal? *test-ret* '((a) b c d)) (display " ===> ok\n") (begin (set! *test-error* (cons '(cons '(a) '(b c d)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((cons '(a) '(b c d))))))(display "test ")
(display '((cons "a" '(b c))))
(display ", expects ")
(display '("a" b c))
(set! *test-ret* (cons "a" '(b c)))(if (equal? *test-ret* '("a" b c)) (display " ===> ok\n") (begin (set! *test-error* (cons '(cons "a" '(b c)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((cons "a" '(b c))))))(display "test ")
(display '((cons 'a 3)))
(display ", expects ")
(display '(a . 3))
(set! *test-ret* (cons 'a 3))(if (equal? *test-ret* '(a . 3)) (display " ===> ok\n") (begin (set! *test-error* (cons '(cons 'a 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((cons 'a 3)))))(display "test ")
(display '((cons '(a b) 'c)))
(display ", expects ")
(display '((a b) . c))
(set! *test-ret* (cons '(a b) 'c))(if (equal? *test-ret* '((a b) . c)) (display " ===> ok\n") (begin (set! *test-error* (cons '(cons '(a b) 'c) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((cons '(a b) 'c)))))(display "test ")
(display '((car '(a b c))))
(display ", expects ")
(display 'a)
(set! *test-ret* (car '(a b c)))(if (equal? *test-ret* 'a) (display " ===> ok\n") (begin (set! *test-error* (cons '(car '(a b c)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((car '(a b c))))))(display "test ")
(display '((car '((a) b c d))))
(display ", expects ")
(display '(a))
(set! *test-ret* (car '((a) b c d)))(if (equal? *test-ret* '(a)) (display " ===> ok\n") (begin (set! *test-error* (cons '(car '((a) b c d)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((car '((a) b c d))))))(display "test ")
(display '((car '(1 . 2))))
(display ", expects ")
(display '1)
(set! *test-ret* (car '(1 . 2)))(if (equal? *test-ret* '1) (display " ===> ok\n") (begin (set! *test-error* (cons '(car '(1 . 2)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((car '(1 . 2))))))(display "test ")
(display '((cdr '((a) b c d))))
(display ", expects ")
(display '(b c d))
(set! *test-ret* (cdr '((a) b c d)))(if (equal? *test-ret* '(b c d)) (display " ===> ok\n") (begin (set! *test-error* (cons '(cdr '((a) b c d)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((cdr '((a) b c d))))))(display "test ")
(display '((cdr '(1 . 2))))
(display ", expects ")
(display '2)
(set! *test-ret* (cdr '(1 . 2)))(if (equal? *test-ret* '2) (display " ===> ok\n") (begin (set! *test-error* (cons '(cdr '(1 . 2)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((cdr '(1 . 2))))))(display "test ")
(display '((reverse '(a b c))))
(display ", expects ")
(display '(c b a))
(set! *test-ret* (reverse '(a b c)))(if (equal? *test-ret* '(c b a)) (display " ===> ok\n") (begin (set! *test-error* (cons '(reverse '(a b c)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((reverse '(a b c))))))(display "test ")
(display '((reverse '(a (b c) d (e (f))))))
(display ", expects ")
(display '((e (f)) d (b c) a))
(set! *test-ret* (reverse '(a (b c) d (e (f)))))(if (equal? *test-ret* '((e (f)) d (b c) a)) (display " ===> ok\n") (begin (set! *test-error* (cons '(reverse '(a (b c) d (e (f)))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((reverse '(a (b c) d (e (f))))))))(display "test ")
(display '((equal? 'a 'a)))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'a 'a))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'a 'a) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'a 'a)))))(display "test ")
(display '((equal? '(a) '(a))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? '(a) '(a)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? '(a) '(a)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? '(a) '(a))))))(display "test ")
(display '((equal? '(a (b) c) '(a (b) c))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? '(a (b) c) '(a (b) c)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? '(a (b) c) '(a (b) c)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? '(a (b) c) '(a (b) c))))))(display "test ")
(display '((equal? "abc" "abc")))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? "abc" "abc"))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? "abc" "abc") *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? "abc" "abc")))))(display "test ")
(display '((equal? 2 2)))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 2 2))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 2 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 2 2)))))(display "test ")
(display '((equal? (make-vector 5 'a) (make-vector 5 'a))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? (make-vector 5 'a) (make-vector 5 'a)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? (make-vector 5 'a) (make-vector 5 'a)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? (make-vector 5 'a) (make-vector 5 'a))))))(display "test ")
(display '((eq? 'a 'a)))
(display ", expects ")
(display '#t)
(set! *test-ret* (eq? 'a 'a))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(eq? 'a 'a) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((eq? 'a 'a)))))(display "test ")
(display '((eq? '(a) '(a))))
(display ", expects ")
(display '#f)
(set! *test-ret* (eq? '(a) '(a)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(eq? '(a) '(a)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((eq? '(a) '(a))))))(display "test ")
(display '((eq? (list 'a) (list 'a))))
(display ", expects ")
(display '#f)
(set! *test-ret* (eq? (list 'a) (list 'a)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(eq? (list 'a) (list 'a)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((eq? (list 'a) (list 'a))))))(display "test ")
(display '((eq? "a" "a")))
(display ", expects ")
(display '#f)
(set! *test-ret* (eq? "a" "a"))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(eq? "a" "a") *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((eq? "a" "a")))))(display "test ")
(display '((eq? "" "")))
(display ", expects ")
(display '#f)
(set! *test-ret* (eq? "" ""))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(eq? "" "") *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((eq? "" "")))))(display "test ")
(display '((eq? '() '())))
(display ", expects ")
(display '#t)
(set! *test-ret* (eq? '() '()))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(eq? '() '()) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((eq? '() '())))))(display "test ")
(display '((eq? 2 2)))
(display ", expects ")
(display '#t)
(set! *test-ret* (eq? 2 2))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(eq? 2 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((eq? 2 2)))))(display "test ")
(display '((eq? #\A #\A)))
(display ", expects ")
(display '#t)
(set! *test-ret* (eq? #\A #\A))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(eq? #\A #\A) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((eq? #\A #\A)))))(display "test ")
(display '((eq? car car)))
(display ", expects ")
(display '#t)
(set! *test-ret* (eq? car car))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(eq? car car) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((eq? car car)))))(display "test ")
(display '((let ((n (+ 2 3))) (eq? n n))))
(display ", expects ")
(display '#t)
(set! *test-ret* (let ((n (+ 2 3))) (eq? n n)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((n (+ 2 3))) (eq? n n)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((n (+ 2 3))) (eq? n n))))))(display "test ")
(display '((let ((x '(a))) (eq? x x))))
(display ", expects ")
(display '#t)
(set! *test-ret* (let ((x '(a))) (eq? x x)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((x '(a))) (eq? x x)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((x '(a))) (eq? x x))))))(display "test ")
(display '((let ((x '#())) (eq? x x))))
(display ", expects ")
(display '#t)
(set! *test-ret* (let ((x '#())) (eq? x x)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((x '#())) (eq? x x)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((x '#())) (eq? x x))))))(display "test ")
(display '((let ((p (lambda (x) x))) (eq? p p))))
(display ", expects ")
(display '#t)
(set! *test-ret* (let ((p (lambda (x) x))) (eq? p p)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((p (lambda (x) x))) (eq? p p)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((p (lambda (x) x))) (eq? p p))))))(display "test ")
(display '((- 3 4)))
(display ", expects ")
(display '-1)
(set! *test-ret* (- 3 4))(if (equal? *test-ret* '-1) (display " ===> ok\n") (begin (set! *test-error* (cons '(- 3 4) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((- 3 4)))))(display "test ")
(display '((- 3 4 5)))
(display ", expects ")
(display '-6)
(set! *test-ret* (- 3 4 5))(if (equal? *test-ret* '-6) (display " ===> ok\n") (begin (set! *test-error* (cons '(- 3 4 5) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((- 3 4 5)))))(display "test ")
(display '((- 3)))
(display ", expects ")
(display '-3)
(set! *test-ret* (- 3))(if (equal? *test-ret* '-3) (display " ===> ok\n") (begin (set! *test-error* (cons '(- 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((- 3)))))(display "test ")
(display '((cond ((> 3 2) 'greater) ((< 3 2) 'less))))
(display ", expects ")
(display 'greater)
(set! *test-ret* (cond ((> 3 2) 'greater) ((< 3 2) 'less)))(if (equal? *test-ret* 'greater) (display " ===> ok\n") (begin (set! *test-error* (cons '(cond ((> 3 2) 'greater) ((< 3 2) 'less)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((cond ((> 3 2) 'greater) ((< 3 2) 'less))))))(display "test ")
(display '((cond ((> 3 3) 'greater) ((< 3 3) 'less) (else 'equal))))
(display ", expects ")
(display 'equal)
(set! *test-ret* (cond ((> 3 3) 'greater) ((< 3 3) 'less) (else 'equal)))(if (equal? *test-ret* 'equal) (display " ===> ok\n") (begin (set! *test-error* (cons '(cond ((> 3 3) 'greater) ((< 3 3) 'less) (else 'equal)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((cond ((> 3 3) 'greater) ((< 3 3) 'less) (else 'equal))))))(display "test ")
(display '((cond ('(1 2 3) => cadr) (else #f))))
(display ", expects ")
(display '2)
(set! *test-ret* (cond ('(1 2 3) => cadr) (else #f)))(if (equal? *test-ret* '2) (display " ===> ok\n") (begin (set! *test-error* (cons '(cond ('(1 2 3) => cadr) (else #f)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((cond ('(1 2 3) => cadr) (else #f))))))(display "test ")
(display '((do ((vec (make-vector 5)) (i 0 (+ i 1))) ((= i 5) vec) (vector-set! vec i i))))
(display ", expects ")
(display '#(0 1 2 3 4))
(set! *test-ret* (do ((vec (make-vector 5)) (i 0 (+ i 1))) ((= i 5) vec) (vector-set! vec i i)))(if (equal? *test-ret* '#(0 1 2 3 4)) (display " ===> ok\n") (begin (set! *test-error* (cons '(do ((vec (make-vector 5)) (i 0 (+ i 1))) ((= i 5) vec) (vector-set! vec i i)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((do ((vec (make-vector 5)) (i 0 (+ i 1))) ((= i 5) vec) (vector-set! vec i i))))))(display "test ")
(display '((let ((x '(1 3 5 7 9))) (do ((x x (cdr x)) (sum 0 (+ sum (car x)))) ((null? x) sum)))))
(display ", expects ")
(display '25)
(set! *test-ret* (let ((x '(1 3 5 7 9))) (do ((x x (cdr x)) (sum 0 (+ sum (car x)))) ((null? x) sum))))(if (equal? *test-ret* '25) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((x '(1 3 5 7 9))) (do ((x x (cdr x)) (sum 0 (+ sum (car x)))) ((null? x) sum))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((x '(1 3 5 7 9))) (do ((x x (cdr x)) (sum 0 (+ sum (car x)))) ((null? x) sum)))))))(display "test ")
(display '((let ((vec (vector 0 '(2 2 2 2) "Anna"))) (vector-set! vec 1 '("Sue" "Sue")) vec)))
(display ", expects ")
(display '#(0 ("Sue" "Sue") "Anna"))
(set! *test-ret* (let ((vec (vector 0 '(2 2 2 2) "Anna"))) (vector-set! vec 1 '("Sue" "Sue")) vec))(if (equal? *test-ret* '#(0 ("Sue" "Sue") "Anna")) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((vec (vector 0 '(2 2 2 2) "Anna"))) (vector-set! vec 1 '("Sue" "Sue")) vec) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((vec (vector 0 '(2 2 2 2) "Anna"))) (vector-set! vec 1 '("Sue" "Sue")) vec)))))(display "test ")
(display '((vector-ref '#(1 1 2 3 5 8 13 21) 5)))
(display ", expects ")
(display '8)
(set! *test-ret* (vector-ref '#(1 1 2 3 5 8 13 21) 5))(if (equal? *test-ret* '8) (display " ===> ok\n") (begin (set! *test-error* (cons '(vector-ref '#(1 1 2 3 5 8 13 21) 5) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((vector-ref '#(1 1 2 3 5 8 13 21) 5)))))(display "test ")
(display '((or (= 2 2) (> 2 1))))
(display ", expects ")
(display '#t)
(set! *test-ret* (or (= 2 2) (> 2 1)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(or (= 2 2) (> 2 1)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((or (= 2 2) (> 2 1))))))(display "test ")
(display '((or (= 2 2) (< 2 1))))
(display ", expects ")
(display '#t)
(set! *test-ret* (or (= 2 2) (< 2 1)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(or (= 2 2) (< 2 1)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((or (= 2 2) (< 2 1))))))(display "test ")
(display '((or #f #f #f)))
(display ", expects ")
(display '#f)
(set! *test-ret* (or #f #f #f))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(or #f #f #f) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((or #f #f #f)))))(display "test ")
(display '((or '(b c) (/ 3 0))))
(display ", expects ")
(display '(b c))
(set! *test-ret* (or '(b c) (/ 3 0)))(if (equal? *test-ret* '(b c)) (display " ===> ok\n") (begin (set! *test-error* (cons '(or '(b c) (/ 3 0)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((or '(b c) (/ 3 0))))))(display "test ")
(display '((not #t)))
(display ", expects ")
(display '#f)
(set! *test-ret* (not #t))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(not #t) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((not #t)))))(display "test ")
(display '((not 3)))
(display ", expects ")
(display '#f)
(set! *test-ret* (not 3))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(not 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((not 3)))))(display "test ")
(display '((not (list 3))))
(display ", expects ")
(display '#f)
(set! *test-ret* (not (list 3)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(not (list 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((not (list 3))))))(display "test ")
(display '((not #f)))
(display ", expects ")
(display '#t)
(set! *test-ret* (not #f))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(not #f) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((not #f)))))(display "test ")
(display '((not '())))
(display ", expects ")
(display '#f)
(set! *test-ret* (not '()))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(not '()) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((not '())))))(display "test ")
(display '((not (list))))
(display ", expects ")
(display '#f)
(set! *test-ret* (not (list)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(not (list)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((not (list))))))(display "test ")
(display '((not 'nil)))
(display ", expects ")
(display '#f)
(set! *test-ret* (not 'nil))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(not 'nil) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((not 'nil)))))(display "test ")
(display '((let ((x 2) (y 3)) (* x y))))
(display ", expects ")
(display '6)
(set! *test-ret* (let ((x 2) (y 3)) (* x y)))(if (equal? *test-ret* '6) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((x 2) (y 3)) (* x y)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((x 2) (y 3)) (* x y))))))(display "test ")
(display '((let ((x 2) (y 3)) (let ((x 7) (z (+ x y))) (* z x)))))
(display ", expects ")
(display '35)
(set! *test-ret* (let ((x 2) (y 3)) (let ((x 7) (z (+ x y))) (* z x))))(if (equal? *test-ret* '35) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((x 2) (y 3)) (let ((x 7) (z (+ x y))) (* z x))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((x 2) (y 3)) (let ((x 7) (z (+ x y))) (* z x)))))))(display "test ")
(display '((let ((x 2) (y 3)) (let* ((x 7) (z (+ x y))) (* z x)))))
(display ", expects ")
(display '70)
(set! *test-ret* (let ((x 2) (y 3)) (let* ((x 7) (z (+ x y))) (* z x))))(if (equal? *test-ret* '70) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((x 2) (y 3)) (let* ((x 7) (z (+ x y))) (* z x))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((x 2) (y 3)) (let* ((x 7) (z (+ x y))) (* z x)))))))(display "test ")
(display '((eqv? 'a 'a)))
(display ", expects ")
(display '#t)
(set! *test-ret* (eqv? 'a 'a))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(eqv? 'a 'a) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((eqv? 'a 'a)))))(display "test ")
(display '((eqv? 'a 'b)))
(display ", expects ")
(display '#f)
(set! *test-ret* (eqv? 'a 'b))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(eqv? 'a 'b) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((eqv? 'a 'b)))))(display "test ")
(display '((eqv? 2 2)))
(display ", expects ")
(display '#t)
(set! *test-ret* (eqv? 2 2))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(eqv? 2 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((eqv? 2 2)))))(display "test ")
(display '((eqv? '() '())))
(display ", expects ")
(display '#t)
(set! *test-ret* (eqv? '() '()))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(eqv? '() '()) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((eqv? '() '())))))(display "test ")
(display '((eqv? 100000000 100000000)))
(display ", expects ")
(display '#t)
(set! *test-ret* (eqv? 100000000 100000000))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(eqv? 100000000 100000000) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((eqv? 100000000 100000000)))))(display "test ")
(display '((eqv? (cons 1 2) (cons 1 2))))
(display ", expects ")
(display '#f)
(set! *test-ret* (eqv? (cons 1 2) (cons 1 2)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(eqv? (cons 1 2) (cons 1 2)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((eqv? (cons 1 2) (cons 1 2))))))(display "test ")
(display '((eqv? (lambda () 1) (lambda () 2))))
(display ", expects ")
(display '#f)
(set! *test-ret* (eqv? (lambda () 1) (lambda () 2)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(eqv? (lambda () 1) (lambda () 2)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((eqv? (lambda () 1) (lambda () 2))))))(display "test ")
(display '((eqv? #f 'nil)))
(display ", expects ")
(display '#f)
(set! *test-ret* (eqv? #f 'nil))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(eqv? #f 'nil) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((eqv? #f 'nil)))))(display "test ")
(display '((define (foo n) (let loop ((n n)) (cond ((null? n)) (else (loop (cdr n)))))) (and (foo '()) (foo '(1 2 3)))))
(display ", expects ")
(display '#t)
(define (foo n) (let loop ((n n)) (cond ((null? n)) (else (loop (cdr n))))))(set! *test-ret* (and (foo '()) (foo '(1 2 3))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons (quote (define (foo n) (let loop ((n n)) (cond ((null? n)) (else (loop (cdr n)))))) (and (foo '()) (foo '(1 2 3)))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((define (foo n) (let loop ((n n)) (cond ((null? n)) (else (loop (cdr n)))))) (and (foo '()) (foo '(1 2 3)))))))(display "test ")
(display '((digit->integer #\3 10)))
(display ", expects ")
(display '3)
(set! *test-ret* (digit->integer #\3 10))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(digit->integer #\3 10) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((digit->integer #\3 10)))))(display "test ")
(display '((+)))
(display ", expects ")
(display '0)
(set! *test-ret* (+))(if (equal? *test-ret* '0) (display " ===> ok\n") (begin (set! *test-error* (cons '(+) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((+)))))(display "test ")
(display '((*)))
(display ", expects ")
(display '1)
(set! *test-ret* (*))(if (equal? *test-ret* '1) (display " ===> ok\n") (begin (set! *test-error* (cons '(*) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((*)))))(display "test ")
(display '((apply (lambda (a b c) (+ a b c)) 1 2 '(3))))
(display ", expects ")
(display '6)
(set! *test-ret* (apply (lambda (a b c) (+ a b c)) 1 2 '(3)))(if (equal? *test-ret* '6) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply (lambda (a b c) (+ a b c)) 1 2 '(3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply (lambda (a b c) (+ a b c)) 1 2 '(3))))))(display "test ")
(display '((apply (lambda (a b c) (+ a b c)) '(1 2 3))))
(display ", expects ")
(display '6)
(set! *test-ret* (apply (lambda (a b c) (+ a b c)) '(1 2 3)))(if (equal? *test-ret* '6) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply (lambda (a b c) (+ a b c)) '(1 2 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply (lambda (a b c) (+ a b c)) '(1 2 3))))))(display "test ")
(display '((apply (lambda (a b c) (+ a b c)) 1 '(2 3))))
(display ", expects ")
(display '6)
(set! *test-ret* (apply (lambda (a b c) (+ a b c)) 1 '(2 3)))(if (equal? *test-ret* '6) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply (lambda (a b c) (+ a b c)) 1 '(2 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply (lambda (a b c) (+ a b c)) 1 '(2 3))))))(display "test ")
(display '((apply (lambda (x y) (apply y '((3 2)))) `(,car ,cdr))))
(display ", expects ")
(display '(2))
(set! *test-ret* (apply (lambda (x y) (apply y '((3 2)))) `(,car ,cdr)))(if (equal? *test-ret* '(2)) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply (lambda (x y) (apply y '((3 2)))) `(,car ,cdr)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply (lambda (x y) (apply y '((3 2)))) `(,car ,cdr))))))(display "test ")
(display '((/ 6 2)))
(display ", expects ")
(display '3)
(set! *test-ret* (/ 6 2))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(/ 6 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((/ 6 2)))))(display "test ")
(display '((mod 23 10)))
(display ", expects ")
(display '3)
(set! *test-ret* (mod 23 10))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(mod 23 10) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((mod 23 10)))))(display "test ")
(display '((even? 2)))
(display ", expects ")
(display '#t)
(set! *test-ret* (even? 2))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(even? 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((even? 2)))))(display "test ")
(display '((even? 3)))
(display ", expects ")
(display '#f)
(set! *test-ret* (even? 3))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(even? 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((even? 3)))))(display "test ")
(display '((for-all even? '(3 1 4 1 5 9))))
(display ", expects ")
(display '#f)
(set! *test-ret* (for-all even? '(3 1 4 1 5 9)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(for-all even? '(3 1 4 1 5 9)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((for-all even? '(3 1 4 1 5 9))))))(display "test ")
(display '((for-all even? '(3 1 4 1 5 9 . 2))))
(display ", expects ")
(display '#f)
(set! *test-ret* (for-all even? '(3 1 4 1 5 9 . 2)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(for-all even? '(3 1 4 1 5 9 . 2)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((for-all even? '(3 1 4 1 5 9 . 2))))))(display "test ")
(display '((for-all even? '(2 4 14))))
(display ", expects ")
(display '#t)
(set! *test-ret* (for-all even? '(2 4 14)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(for-all even? '(2 4 14)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((for-all even? '(2 4 14))))))(display "test ")
(display '((for-all (lambda (a b) (< a b)) '(1 2 3) '(2 3 4))))
(display ", expects ")
(display '#t)
(set! *test-ret* (for-all (lambda (a b) (< a b)) '(1 2 3) '(2 3 4)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(for-all (lambda (a b) (< a b)) '(1 2 3) '(2 3 4)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((for-all (lambda (a b) (< a b)) '(1 2 3) '(2 3 4))))))(display "test ")
(display '((for-all (lambda (a b) (< a b)) '(1 2 4) '(2 3 4))))
(display ", expects ")
(display '#f)
(set! *test-ret* (for-all (lambda (a b) (< a b)) '(1 2 4) '(2 3 4)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(for-all (lambda (a b) (< a b)) '(1 2 4) '(2 3 4)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((for-all (lambda (a b) (< a b)) '(1 2 4) '(2 3 4))))))(display "test ")
(display '((/ 2)))
(display ", expects ")
(display '0)
(set! *test-ret* (/ 2))(if (equal? *test-ret* '0) (display " ===> ok\n") (begin (set! *test-error* (cons '(/ 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((/ 2)))))(display "test ")
(display '((/ 3)))
(display ", expects ")
(display '0)
(set! *test-ret* (/ 3))(if (equal? *test-ret* '0) (display " ===> ok\n") (begin (set! *test-error* (cons '(/ 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((/ 3)))))(display "test ")
(display '((mod 123 10)))
(display ", expects ")
(display '3)
(set! *test-ret* (mod 123 10))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(mod 123 10) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((mod 123 10)))))(display "test ")
(display '((mod 123 -10)))
(display ", expects ")
(display '3)
(set! *test-ret* (mod 123 -10))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(mod 123 -10) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((mod 123 -10)))))(display "test ")
(display '((mod -123 10)))
(display ", expects ")
(display '7)
(set! *test-ret* (mod -123 10))(if (equal? *test-ret* '7) (display " ===> ok\n") (begin (set! *test-error* (cons '(mod -123 10) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((mod -123 10)))))(display "test ")
(display '((mod -123 -10)))
(display ", expects ")
(display '7)
(set! *test-ret* (mod -123 -10))(if (equal? *test-ret* '7) (display " ===> ok\n") (begin (set! *test-error* (cons '(mod -123 -10) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((mod -123 -10)))))(display "test ")
(display '((div 123 10)))
(display ", expects ")
(display '12)
(set! *test-ret* (div 123 10))(if (equal? *test-ret* '12) (display " ===> ok\n") (begin (set! *test-error* (cons '(div 123 10) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((div 123 10)))))(display "test ")
(display '((div 123 -10)))
(display ", expects ")
(display '-12)
(set! *test-ret* (div 123 -10))(if (equal? *test-ret* '-12) (display " ===> ok\n") (begin (set! *test-error* (cons '(div 123 -10) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((div 123 -10)))))(display "test ")
(display '((div -123 10)))
(display ", expects ")
(display '-13)
(set! *test-ret* (div -123 10))(if (equal? *test-ret* '-13) (display " ===> ok\n") (begin (set! *test-error* (cons '(div -123 10) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((div -123 10)))))(display "test ")
(display '((div -123 -10)))
(display ", expects ")
(display '13)
(set! *test-ret* (div -123 -10))(if (equal? *test-ret* '13) (display " ===> ok\n") (begin (set! *test-error* (cons '(div -123 -10) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((div -123 -10)))))(display "test ")
(display '((string-ref "abc" 2)))
(display ", expects ")
(display '#\c)
(set! *test-ret* (string-ref "abc" 2))(if (equal? *test-ret* '#\c) (display " ===> ok\n") (begin (set! *test-error* (cons '(string-ref "abc" 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((string-ref "abc" 2)))))(display "test ")
(display '((list? '(a b c))))
(display ", expects ")
(display '#t)
(set! *test-ret* (list? '(a b c)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(list? '(a b c)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((list? '(a b c))))))(display "test ")
(display '((list? '())))
(display ", expects ")
(display '#t)
(set! *test-ret* (list? '()))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(list? '()) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((list? '())))))(display "test ")
(display '((list? '(a . b))))
(display ", expects ")
(display '#f)
(set! *test-ret* (list? '(a . b)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(list? '(a . b)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((list? '(a . b))))))(display "test ")
(display '((match '(0 (1 2) (3 4 5)) ((a (b c) (d e f)) (list a b c d e f)))))
(display ", expects ")
(display '(0 1 2 3 4 5))
(set! *test-ret* (match '(0 (1 2) (3 4 5)) ((a (b c) (d e f)) (list a b c d e f))))(if (equal? *test-ret* '(0 1 2 3 4 5)) (display " ===> ok\n") (begin (set! *test-error* (cons '(match '(0 (1 2) (3 4 5)) ((a (b c) (d e f)) (list a b c d e f))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((match '(0 (1 2) (3 4 5)) ((a (b c) (d e f)) (list a b c d e f)))))))(display "test ")
(display '((match 123 ((? string? x) (list 'string x)) ((? number? x) (list 'number x)))))
(display ", expects ")
(display '(number 123))
(set! *test-ret* (match 123 ((? string? x) (list 'string x)) ((? number? x) (list 'number x))))(if (equal? *test-ret* '(number 123)) (display " ===> ok\n") (begin (set! *test-error* (cons '(match 123 ((? string? x) (list 'string x)) ((? number? x) (list 'number x))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((match 123 ((? string? x) (list 'string x)) ((? number? x) (list 'number x)))))))(display "test ")
(display '((define let-analyzer (match-lambda (('let (? symbol?) ((var expr) |...|) body |...|) (format "named let, vars=~s exprs=~s" var expr)) (('let ((var expr) |...|) body |...|) (format "normal let, vars=~s exprs=~s" var expr)) (_ (format "malformed let")))) (let-analyzer '(let ((a b) (c d)) e f g))))
(display ", expects ")
(display '"normal let, vars=(a c) exprs=(b d)")
(define let-analyzer (match-lambda (('let (? symbol?) ((var expr) |...|) body |...|) (format "named let, vars=~s exprs=~s" var expr)) (('let ((var expr) |...|) body |...|) (format "normal let, vars=~s exprs=~s" var expr)) (_ (format "malformed let"))))(set! *test-ret* (let-analyzer '(let ((a b) (c d)) e f g)))(if (equal? *test-ret* '"normal let, vars=(a c) exprs=(b d)") (display " ===> ok\n") (begin (set! *test-error* (cons (quote (define let-analyzer (match-lambda (('let (? symbol?) ((var expr) |...|) body |...|) (format "named let, vars=~s exprs=~s" var expr)) (('let ((var expr) |...|) body |...|) (format "normal let, vars=~s exprs=~s" var expr)) (_ (format "malformed let")))) (let-analyzer '(let ((a b) (c d)) e f g))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((define let-analyzer (match-lambda (('let (? symbol?) ((var expr) |...|) body |...|) (format "named let, vars=~s exprs=~s" var expr)) (('let ((var expr) |...|) body |...|) (format "normal let, vars=~s exprs=~s" var expr)) (_ (format "malformed let")))) (let-analyzer '(let ((a b) (c d)) e f g))))))(display "test ")
(display '((let-analyzer '(let foo ((x (f a b)) (y (f c d))) e f g))))
(display ", expects ")
(display '"named let, vars=(x y) exprs=((f a b) (f c d))")
(set! *test-ret* (let-analyzer '(let foo ((x (f a b)) (y (f c d))) e f g)))(if (equal? *test-ret* '"named let, vars=(x y) exprs=((f a b) (f c d))") (display " ===> ok\n") (begin (set! *test-error* (cons '(let-analyzer '(let foo ((x (f a b)) (y (f c d))) e f g)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let-analyzer '(let foo ((x (f a b)) (y (f c d))) e f g))))))(display "test ")
(display '((let-analyzer '(let (a) b c d))))
(display ", expects ")
(display '"malformed let")
(set! *test-ret* (let-analyzer '(let (a) b c d)))(if (equal? *test-ret* '"malformed let") (display " ===> ok\n") (begin (set! *test-error* (cons '(let-analyzer '(let (a) b c d)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let-analyzer '(let (a) b c d))))))(display "test ")
(display '((match '(the answer is 42) (`(the answer is ,value) value) (else #f))))
(display ", expects ")
(display '42)
(set! *test-ret* (match '(the answer is 42) (`(the answer is ,value) value) (else #f)))(if (equal? *test-ret* '42) (display " ===> ok\n") (begin (set! *test-error* (cons '(match '(the answer is 42) (`(the answer is ,value) value) (else #f)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((match '(the answer is 42) (`(the answer is ,value) value) (else #f))))))(display "test ")
(display '((match '(the answer was 42) (`(the answer is ,value) value) (else #f))))
(display ", expects ")
(display '#f)
(set! *test-ret* (match '(the answer was 42) (`(the answer is ,value) value) (else #f)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(match '(the answer was 42) (`(the answer is ,value) value) (else #f)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((match '(the answer was 42) (`(the answer is ,value) value) (else #f))))))(display "test ")
(display '((match '(a b c d) ((the answer is value) value) (else #f))))
(display ", expects ")
(display 'd)
(set! *test-ret* (match '(a b c d) ((the answer is value) value) (else #f)))(if (equal? *test-ret* 'd) (display " ===> ok\n") (begin (set! *test-error* (cons '(match '(a b c d) ((the answer is value) value) (else #f)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((match '(a b c d) ((the answer is value) value) (else #f))))))(display "test ")
(display '((match "mosh.scm" ((? string? (= #/(.*)\.([^.]+)$/ m)) (format "base=~a suffix=~a" (m 1) (m 2))))))
(display ", expects ")
(display '"base=mosh suffix=scm")
(set! *test-ret* (match "mosh.scm" ((? string? (= #/(.*)\.([^.]+)$/ m)) (format "base=~a suffix=~a" (m 1) (m 2)))))(if (equal? *test-ret* '"base=mosh suffix=scm") (display " ===> ok\n") (begin (set! *test-error* (cons '(match "mosh.scm" ((? string? (= #/(.*)\.([^.]+)$/ m)) (format "base=~a suffix=~a" (m 1) (m 2)))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((match "mosh.scm" ((? string? (= #/(.*)\.([^.]+)$/ m)) (format "base=~a suffix=~a" (m 1) (m 2))))))))(display "test ")
(display '((do ((i 0) (j 0)) ((zero? j) (set! i 1) (set! i 2) i))))
(display ", expects ")
(display '2)
(set! *test-ret* (do ((i 0) (j 0)) ((zero? j) (set! i 1) (set! i 2) i)))(if (equal? *test-ret* '2) (display " ===> ok\n") (begin (set! *test-error* (cons '(do ((i 0) (j 0)) ((zero? j) (set! i 1) (set! i 2) i)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((do ((i 0) (j 0)) ((zero? j) (set! i 1) (set! i 2) i))))))(display "test ")
(display '((case (* 2 3) ((2 3 5 7) 'prime) ((1 4 6 8 9) 'composite))))
(display ", expects ")
(display 'composite)
(set! *test-ret* (case (* 2 3) ((2 3 5 7) 'prime) ((1 4 6 8 9) 'composite)))(if (equal? *test-ret* 'composite) (display " ===> ok\n") (begin (set! *test-error* (cons '(case (* 2 3) ((2 3 5 7) 'prime) ((1 4 6 8 9) 'composite)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((case (* 2 3) ((2 3 5 7) 'prime) ((1 4 6 8 9) 'composite))))))(display "test ")
(display '((case (car '(c d)) ((a e i o u) 'vowel) ((w y) 'semivowel) (else 'consonant))))
(display ", expects ")
(display 'consonant)
(set! *test-ret* (case (car '(c d)) ((a e i o u) 'vowel) ((w y) 'semivowel) (else 'consonant)))(if (equal? *test-ret* 'consonant) (display " ===> ok\n") (begin (set! *test-error* (cons '(case (car '(c d)) ((a e i o u) 'vowel) ((w y) 'semivowel) (else 'consonant)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((case (car '(c d)) ((a e i o u) 'vowel) ((w y) 'semivowel) (else 'consonant))))))(display "test ")
(display '((case 1 ((2 1) 0))))
(display ", expects ")
(display '0)
(set! *test-ret* (case 1 ((2 1) 0)))(if (equal? *test-ret* '0) (display " ===> ok\n") (begin (set! *test-error* (cons '(case 1 ((2 1) 0)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((case 1 ((2 1) 0))))))(display "test ")
(display '((case 2 ((2 1) 0))))
(display ", expects ")
(display '0)
(set! *test-ret* (case 2 ((2 1) 0)))(if (equal? *test-ret* '0) (display " ===> ok\n") (begin (set! *test-error* (cons '(case 2 ((2 1) 0)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((case 2 ((2 1) 0))))))(display "test ")
(display '((procedure? car)))
(display ", expects ")
(display '#t)
(set! *test-ret* (procedure? car))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(procedure? car) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((procedure? car)))))(display "test ")
(display '((procedure? 'car)))
(display ", expects ")
(display '#f)
(set! *test-ret* (procedure? 'car))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(procedure? 'car) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((procedure? 'car)))))(display "test ")
(display '((procedure? (lambda (x) (* x x)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (procedure? (lambda (x) (* x x))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(procedure? (lambda (x) (* x x))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((procedure? (lambda (x) (* x x)))))))(display "test ")
(display '((procedure? '(lambda (x) (* x x)))))
(display ", expects ")
(display '#f)
(set! *test-ret* (procedure? '(lambda (x) (* x x))))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(procedure? '(lambda (x) (* x x))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((procedure? '(lambda (x) (* x x)))))))(display "test ")
(display '((char>=? #\b #\a)))
(display ", expects ")
(display '#t)
(set! *test-ret* (char>=? #\b #\a))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(char>=? #\b #\a) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((char>=? #\b #\a)))))(display "test ")
(display '((char>=? #\c #\b #\a)))
(display ", expects ")
(display '#t)
(set! *test-ret* (char>=? #\c #\b #\a))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(char>=? #\c #\b #\a) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((char>=? #\c #\b #\a)))))(display "test ")
(display '((char>=? #\b #\b)))
(display ", expects ")
(display '#t)
(set! *test-ret* (char>=? #\b #\b))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(char>=? #\b #\b) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((char>=? #\b #\b)))))(display "test ")
(display '((char>=? #\b #\c)))
(display ", expects ")
(display '#f)
(set! *test-ret* (char>=? #\b #\c))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(char>=? #\b #\c) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((char>=? #\b #\c)))))(display "test ")
(display '((char>? #\b #\a)))
(display ", expects ")
(display '#t)
(set! *test-ret* (char>? #\b #\a))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(char>? #\b #\a) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((char>? #\b #\a)))))(display "test ")
(display '((char>? #\b #\b)))
(display ", expects ")
(display '#f)
(set! *test-ret* (char>? #\b #\b))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(char>? #\b #\b) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((char>? #\b #\b)))))(display "test ")
(display '((char>? #\b #\c)))
(display ", expects ")
(display '#f)
(set! *test-ret* (char>? #\b #\c))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(char>? #\b #\c) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((char>? #\b #\c)))))(display "test ")
(display '((char<=? #\a #\b)))
(display ", expects ")
(display '#t)
(set! *test-ret* (char<=? #\a #\b))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(char<=? #\a #\b) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((char<=? #\a #\b)))))(display "test ")
(display '((char<=? #\b #\b)))
(display ", expects ")
(display '#t)
(set! *test-ret* (char<=? #\b #\b))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(char<=? #\b #\b) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((char<=? #\b #\b)))))(display "test ")
(display '((char<=? #\c #\b)))
(display ", expects ")
(display '#f)
(set! *test-ret* (char<=? #\c #\b))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(char<=? #\c #\b) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((char<=? #\c #\b)))))(display "test ")
(display '((char<? #\a #\b)))
(display ", expects ")
(display '#t)
(set! *test-ret* (char<? #\a #\b))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(char<? #\a #\b) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((char<? #\a #\b)))))(display "test ")
(display '((char<? #\b #\b)))
(display ", expects ")
(display '#f)
(set! *test-ret* (char<? #\b #\b))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(char<? #\b #\b) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((char<? #\b #\b)))))(display "test ")
(display '((char<? #\c #\b)))
(display ", expects ")
(display '#f)
(set! *test-ret* (char<? #\c #\b))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(char<? #\c #\b) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((char<? #\c #\b)))))(display "test ")
(display '((cons* 1 2 3 4)))
(display ", expects ")
(display '(1 2 3 . 4))
(set! *test-ret* (cons* 1 2 3 4))(if (equal? *test-ret* '(1 2 3 . 4)) (display " ===> ok\n") (begin (set! *test-error* (cons '(cons* 1 2 3 4) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((cons* 1 2 3 4)))))(display "test ")
(display '((cons* 1)))
(display ", expects ")
(display '1)
(set! *test-ret* (cons* 1))(if (equal? *test-ret* '1) (display " ===> ok\n") (begin (set! *test-error* (cons '(cons* 1) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((cons* 1)))))(display "test ")
(display '((receive (x y) (car+cdr '(1 . 3)) (cons x y))))
(display ", expects ")
(display '(1 . 3))
(set! *test-ret* (receive (x y) (car+cdr '(1 . 3)) (cons x y)))(if (equal? *test-ret* '(1 . 3)) (display " ===> ok\n") (begin (set! *test-error* (cons '(receive (x y) (car+cdr '(1 . 3)) (cons x y)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((receive (x y) (car+cdr '(1 . 3)) (cons x y))))))(display "test ")
(display '((append 1)))
(display ", expects ")
(display '1)
(set! *test-ret* (append 1))(if (equal? *test-ret* '1) (display " ===> ok\n") (begin (set! *test-error* (cons '(append 1) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((append 1)))))(display "test ")
(display '((append '(1) 2)))
(display ", expects ")
(display '(1 . 2))
(set! *test-ret* (append '(1) 2))(if (equal? *test-ret* '(1 . 2)) (display " ===> ok\n") (begin (set! *test-error* (cons '(append '(1) 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((append '(1) 2)))))(display "test ")
(display '((append '(1 2) 3)))
(display ", expects ")
(display '(1 2 . 3))
(set! *test-ret* (append '(1 2) 3))(if (equal? *test-ret* '(1 2 . 3)) (display " ===> ok\n") (begin (set! *test-error* (cons '(append '(1 2) 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((append '(1 2) 3)))))(display "test ")
(display '((append '(1 2) '(3))))
(display ", expects ")
(display '(1 2 3))
(set! *test-ret* (append '(1 2) '(3)))(if (equal? *test-ret* '(1 2 3)) (display " ===> ok\n") (begin (set! *test-error* (cons '(append '(1 2) '(3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((append '(1 2) '(3))))))(display "test ")
(display '((append '(1 2) '(3) 4)))
(display ", expects ")
(display '(1 2 3 . 4))
(set! *test-ret* (append '(1 2) '(3) 4))(if (equal? *test-ret* '(1 2 3 . 4)) (display " ===> ok\n") (begin (set! *test-error* (cons '(append '(1 2) '(3) 4) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((append '(1 2) '(3) 4)))))(display "test ")
(display '((append '(1 2) '(3) 4)))
(display ", expects ")
(display '(1 2 3 . 4))
(set! *test-ret* (append '(1 2) '(3) 4))(if (equal? *test-ret* '(1 2 3 . 4)) (display " ===> ok\n") (begin (set! *test-error* (cons '(append '(1 2) '(3) 4) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((append '(1 2) '(3) 4)))))(display "test ")
(display '((append '() 1)))
(display ", expects ")
(display '1)
(set! *test-ret* (append '() 1))(if (equal? *test-ret* '1) (display " ===> ok\n") (begin (set! *test-error* (cons '(append '() 1) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((append '() 1)))))(display "test ")
(display '((append '(1) '())))
(display ", expects ")
(display '(1))
(set! *test-ret* (append '(1) '()))(if (equal? *test-ret* '(1)) (display " ===> ok\n") (begin (set! *test-error* (cons '(append '(1) '()) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((append '(1) '())))))(display "test ")
(display '((append! 1)))
(display ", expects ")
(display '1)
(set! *test-ret* (append! 1))(if (equal? *test-ret* '1) (display " ===> ok\n") (begin (set! *test-error* (cons '(append! 1) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((append! 1)))))(display "test ")
(display '((append! '(1) 2)))
(display ", expects ")
(display '(1 . 2))
(set! *test-ret* (append! '(1) 2))(if (equal? *test-ret* '(1 . 2)) (display " ===> ok\n") (begin (set! *test-error* (cons '(append! '(1) 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((append! '(1) 2)))))(display "test ")
(display '((append! '(1 2) 3)))
(display ", expects ")
(display '(1 2 . 3))
(set! *test-ret* (append! '(1 2) 3))(if (equal? *test-ret* '(1 2 . 3)) (display " ===> ok\n") (begin (set! *test-error* (cons '(append! '(1 2) 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((append! '(1 2) 3)))))(display "test ")
(display '((append! '(1 2) '(3))))
(display ", expects ")
(display '(1 2 3))
(set! *test-ret* (append! '(1 2) '(3)))(if (equal? *test-ret* '(1 2 3)) (display " ===> ok\n") (begin (set! *test-error* (cons '(append! '(1 2) '(3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((append! '(1 2) '(3))))))(display "test ")
(display '((append! '(1 2) '(3) 4)))
(display ", expects ")
(display '(1 2 3 . 4))
(set! *test-ret* (append! '(1 2) '(3) 4))(if (equal? *test-ret* '(1 2 3 . 4)) (display " ===> ok\n") (begin (set! *test-error* (cons '(append! '(1 2) '(3) 4) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((append! '(1 2) '(3) 4)))))(display "test ")
(display '((append! '(1 2) '(3) 4)))
(display ", expects ")
(display '(1 2 3 . 4))
(set! *test-ret* (append! '(1 2) '(3) 4))(if (equal? *test-ret* '(1 2 3 . 4)) (display " ===> ok\n") (begin (set! *test-error* (cons '(append! '(1 2) '(3) 4) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((append! '(1 2) '(3) 4)))))(display "test ")
(display '((append! '() 1)))
(display ", expects ")
(display '1)
(set! *test-ret* (append! '() 1))(if (equal? *test-ret* '1) (display " ===> ok\n") (begin (set! *test-error* (cons '(append! '() 1) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((append! '() 1)))))(display "test ")
(display '((append! '(1) '())))
(display ", expects ")
(display '(1))
(set! *test-ret* (append! '(1) '()))(if (equal? *test-ret* '(1)) (display " ===> ok\n") (begin (set! *test-error* (cons '(append! '(1) '()) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((append! '(1) '())))))(display "test ")
(display '((take '(a b c d e) 2)))
(display ", expects ")
(display '(a b))
(set! *test-ret* (take '(a b c d e) 2))(if (equal? *test-ret* '(a b)) (display " ===> ok\n") (begin (set! *test-error* (cons '(take '(a b c d e) 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((take '(a b c d e) 2)))))(display "test ")
(display '((drop '(a b c d e) 2)))
(display ", expects ")
(display '(c d e))
(set! *test-ret* (drop '(a b c d e) 2))(if (equal? *test-ret* '(c d e)) (display " ===> ok\n") (begin (set! *test-error* (cons '(drop '(a b c d e) 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((drop '(a b c d e) 2)))))(display "test ")
(display '((take '(1 2 3 . d) 2)))
(display ", expects ")
(display '(1 2))
(set! *test-ret* (take '(1 2 3 . d) 2))(if (equal? *test-ret* '(1 2)) (display " ===> ok\n") (begin (set! *test-error* (cons '(take '(1 2 3 . d) 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((take '(1 2 3 . d) 2)))))(display "test ")
(display '((drop '(1 2 3 . d) 2)))
(display ", expects ")
(display '(3 . d))
(set! *test-ret* (drop '(1 2 3 . d) 2))(if (equal? *test-ret* '(3 . d)) (display " ===> ok\n") (begin (set! *test-error* (cons '(drop '(1 2 3 . d) 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((drop '(1 2 3 . d) 2)))))(display "test ")
(display '((take '(1 2 3 . d) 3)))
(display ", expects ")
(display '(1 2 3))
(set! *test-ret* (take '(1 2 3 . d) 3))(if (equal? *test-ret* '(1 2 3)) (display " ===> ok\n") (begin (set! *test-error* (cons '(take '(1 2 3 . d) 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((take '(1 2 3 . d) 3)))))(display "test ")
(display '((drop '(1 2 3 . d) 3)))
(display ", expects ")
(display 'd)
(set! *test-ret* (drop '(1 2 3 . d) 3))(if (equal? *test-ret* 'd) (display " ===> ok\n") (begin (set! *test-error* (cons '(drop '(1 2 3 . d) 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((drop '(1 2 3 . d) 3)))))(display "test ")
(display '((take-right '(a b c d e) 2)))
(display ", expects ")
(display '(d e))
(set! *test-ret* (take-right '(a b c d e) 2))(if (equal? *test-ret* '(d e)) (display " ===> ok\n") (begin (set! *test-error* (cons '(take-right '(a b c d e) 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((take-right '(a b c d e) 2)))))(display "test ")
(display '((drop-right '(a b c d e) 2)))
(display ", expects ")
(display '(a b c))
(set! *test-ret* (drop-right '(a b c d e) 2))(if (equal? *test-ret* '(a b c)) (display " ===> ok\n") (begin (set! *test-error* (cons '(drop-right '(a b c d e) 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((drop-right '(a b c d e) 2)))))(display "test ")
(display '((take-right '(1 2 3 . d) 2)))
(display ", expects ")
(display '(2 3 . d))
(set! *test-ret* (take-right '(1 2 3 . d) 2))(if (equal? *test-ret* '(2 3 . d)) (display " ===> ok\n") (begin (set! *test-error* (cons '(take-right '(1 2 3 . d) 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((take-right '(1 2 3 . d) 2)))))(display "test ")
(display '((drop-right '(1 2 3 . d) 2)))
(display ", expects ")
(display '(1))
(set! *test-ret* (drop-right '(1 2 3 . d) 2))(if (equal? *test-ret* '(1)) (display " ===> ok\n") (begin (set! *test-error* (cons '(drop-right '(1 2 3 . d) 2) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((drop-right '(1 2 3 . d) 2)))))(display "test ")
(display '((take-right '(1 2 3 . d) 0)))
(display ", expects ")
(display 'd)
(set! *test-ret* (take-right '(1 2 3 . d) 0))(if (equal? *test-ret* 'd) (display " ===> ok\n") (begin (set! *test-error* (cons '(take-right '(1 2 3 . d) 0) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((take-right '(1 2 3 . d) 0)))))(display "test ")
(display '((drop-right '(1 2 3 . d) 0)))
(display ", expects ")
(display '(1 2 3))
(set! *test-ret* (drop-right '(1 2 3 . d) 0))(if (equal? *test-ret* '(1 2 3)) (display " ===> ok\n") (begin (set! *test-error* (cons '(drop-right '(1 2 3 . d) 0) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((drop-right '(1 2 3 . d) 0)))))(display "test ")
(display '((xcons '(b c) 'a)))
(display ", expects ")
(display '(a b c))
(set! *test-ret* (xcons '(b c) 'a))(if (equal? *test-ret* '(a b c)) (display " ===> ok\n") (begin (set! *test-error* (cons '(xcons '(b c) 'a) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((xcons '(b c) 'a)))))(display "test ")
(display '((make-list 4 'c)))
(display ", expects ")
(display '(c c c c))
(set! *test-ret* (make-list 4 'c))(if (equal? *test-ret* '(c c c c)) (display " ===> ok\n") (begin (set! *test-error* (cons '(make-list 4 'c) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((make-list 4 'c)))))(display "test ")
(display '((list-tabulate 4 values)))
(display ", expects ")
(display '(0 1 2 3))
(set! *test-ret* (list-tabulate 4 values))(if (equal? *test-ret* '(0 1 2 3)) (display " ===> ok\n") (begin (set! *test-error* (cons '(list-tabulate 4 values) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((list-tabulate 4 values)))))(display "test ")
(display '((list-copy '(1 2 3 4))))
(display ", expects ")
(display '(1 2 3 4))
(set! *test-ret* (list-copy '(1 2 3 4)))(if (equal? *test-ret* '(1 2 3 4)) (display " ===> ok\n") (begin (set! *test-error* (cons '(list-copy '(1 2 3 4)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((list-copy '(1 2 3 4))))))(display "test ")
(display '((let1 lst (circular-list 'z 'q) (and (eq? (first lst) 'z) (eq? (second lst) 'q) (third lst) 'z))))
(display ", expects ")
(display 'z)
(set! *test-ret* (let1 lst (circular-list 'z 'q) (and (eq? (first lst) 'z) (eq? (second lst) 'q) (third lst) 'z)))(if (equal? *test-ret* 'z) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 lst (circular-list 'z 'q) (and (eq? (first lst) 'z) (eq? (second lst) 'q) (third lst) 'z)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 lst (circular-list 'z 'q) (and (eq? (first lst) 'z) (eq? (second lst) 'q) (third lst) 'z))))))(display "test ")
(display '((proper-list? '())))
(display ", expects ")
(display '#t)
(set! *test-ret* (proper-list? '()))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(proper-list? '()) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((proper-list? '())))))(display "test ")
(display '((proper-list? '(1 2 3))))
(display ", expects ")
(display '#t)
(set! *test-ret* (proper-list? '(1 2 3)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(proper-list? '(1 2 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((proper-list? '(1 2 3))))))(display "test ")
(display '((proper-list? '(1 . 3))))
(display ", expects ")
(display '#f)
(set! *test-ret* (proper-list? '(1 . 3)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(proper-list? '(1 . 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((proper-list? '(1 . 3))))))(display "test ")
(display '((dotted-list? '(1 2 . 3))))
(display ", expects ")
(display '#t)
(set! *test-ret* (dotted-list? '(1 2 . 3)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(dotted-list? '(1 2 . 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((dotted-list? '(1 2 . 3))))))(display "test ")
(display '((dotted-list? '(1 2 3))))
(display ", expects ")
(display '#f)
(set! *test-ret* (dotted-list? '(1 2 3)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(dotted-list? '(1 2 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((dotted-list? '(1 2 3))))))(display "test ")
(display '((last-pair '(a b c))))
(display ", expects ")
(display '(c))
(set! *test-ret* (last-pair '(a b c)))(if (equal? *test-ret* '(c)) (display " ===> ok\n") (begin (set! *test-error* (cons '(last-pair '(a b c)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((last-pair '(a b c))))))(display "test ")
(display '((last '(a b c))))
(display ", expects ")
(display 'c)
(set! *test-ret* (last '(a b c)))(if (equal? *test-ret* 'c) (display " ===> ok\n") (begin (set! *test-error* (cons '(last '(a b c)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((last '(a b c))))))(display "test ")
(display '((not-pair? 3)))
(display ", expects ")
(display '#t)
(set! *test-ret* (not-pair? 3))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(not-pair? 3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((not-pair? 3)))))(display "test ")
(display '((not-pair? '(1 2))))
(display ", expects ")
(display '#f)
(set! *test-ret* (not-pair? '(1 2)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(not-pair? '(1 2)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((not-pair? '(1 2))))))(display "test ")
(display '((list= eq?)))
(display ", expects ")
(display '#t)
(set! *test-ret* (list= eq?))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(list= eq?) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((list= eq?)))))(display "test ")
(display '((list= eq? '(a))))
(display ", expects ")
(display '#t)
(set! *test-ret* (list= eq? '(a)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(list= eq? '(a)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((list= eq? '(a))))))(display "test ")
(display '((list= eq? '(a) '(a))))
(display ", expects ")
(display '#t)
(set! *test-ret* (list= eq? '(a) '(a)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(list= eq? '(a) '(a)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((list= eq? '(a) '(a))))))(display "test ")
(display '((list= eq? '(a) '(a b))))
(display ", expects ")
(display '#f)
(set! *test-ret* (list= eq? '(a) '(a b)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(list= eq? '(a) '(a b)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((list= eq? '(a) '(a b))))))(display "test ")
(display '((receive (x y) (split-at '(a b c d e f g h) 3) (cons x y))))
(display ", expects ")
(display '((a b c) d e f g h))
(set! *test-ret* (receive (x y) (split-at '(a b c d e f g h) 3) (cons x y)))(if (equal? *test-ret* '((a b c) d e f g h)) (display " ===> ok\n") (begin (set! *test-error* (cons '(receive (x y) (split-at '(a b c d e f g h) 3) (cons x y)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((receive (x y) (split-at '(a b c d e f g h) 3) (cons x y))))))(display "test ")
(display '((string #\1 #\2 #\3)))
(display ", expects ")
(display '"123")
(set! *test-ret* (string #\1 #\2 #\3))(if (equal? *test-ret* '"123") (display " ===> ok\n") (begin (set! *test-error* (cons '(string #\1 #\2 #\3) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((string #\1 #\2 #\3)))))(display "test ")
(display '((regexp-replace-all #/&/ "taro&hanako" "&amp;")))
(display ", expects ")
(display '"taro&amp;hanako")
(set! *test-ret* (regexp-replace-all #/&/ "taro&hanako" "&amp;"))(if (equal? *test-ret* '"taro&amp;hanako") (display " ===> ok\n") (begin (set! *test-error* (cons '(regexp-replace-all #/&/ "taro&hanako" "&amp;") *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((regexp-replace-all #/&/ "taro&hanako" "&amp;")))))(display "test ")
(display '((let1 ht (make-hashtable (lambda (x) 2) (lambda (a b) #t)) (hashtable-set! ht 1 1) (hashtable-set! ht 2 2) (hashtable-ref ht 1))))
(display ", expects ")
(display '2)
(set! *test-ret* (let1 ht (make-hashtable (lambda (x) 2) (lambda (a b) #t)) (hashtable-set! ht 1 1) (hashtable-set! ht 2 2) (hashtable-ref ht 1)))(if (equal? *test-ret* '2) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 ht (make-hashtable (lambda (x) 2) (lambda (a b) #t)) (hashtable-set! ht 1 1) (hashtable-set! ht 2 2) (hashtable-ref ht 1)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 ht (make-hashtable (lambda (x) 2) (lambda (a b) #t)) (hashtable-set! ht 1 1) (hashtable-set! ht 2 2) (hashtable-ref ht 1))))))(display "test ")
(display '((let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "my" "apple") (hashtable-set! ht "our" "water") (hashtable-ref ht "my"))))
(display ", expects ")
(display '"apple")
(set! *test-ret* (let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "my" "apple") (hashtable-set! ht "our" "water") (hashtable-ref ht "my")))(if (equal? *test-ret* '"apple") (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "my" "apple") (hashtable-set! ht "our" "water") (hashtable-ref ht "my")) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "my" "apple") (hashtable-set! ht "our" "water") (hashtable-ref ht "my"))))))(display "test ")
(display '((hashtable? (make-hashtable string-hash string=?))))
(display ", expects ")
(display '#t)
(set! *test-ret* (hashtable? (make-hashtable string-hash string=?)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(hashtable? (make-hashtable string-hash string=?)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((hashtable? (make-hashtable string-hash string=?))))))(display "test ")
(display '((hashtable? (make-eq-hashtable))))
(display ", expects ")
(display '#t)
(set! *test-ret* (hashtable? (make-eq-hashtable)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(hashtable? (make-eq-hashtable)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((hashtable? (make-eq-hashtable))))))(display "test ")
(display '((hashtable? '(a . b))))
(display ", expects ")
(display '#f)
(set! *test-ret* (hashtable? '(a . b)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(hashtable? '(a . b)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((hashtable? '(a . b))))))(display "test ")
(display '((let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "my" "apple") (hashtable-set! ht "our" "water") (hashtable-size ht))))
(display ", expects ")
(display '2)
(set! *test-ret* (let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "my" "apple") (hashtable-set! ht "our" "water") (hashtable-size ht)))(if (equal? *test-ret* '2) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "my" "apple") (hashtable-set! ht "our" "water") (hashtable-size ht)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "my" "apple") (hashtable-set! ht "our" "water") (hashtable-size ht))))))(display "test ")
(display '((let1 ht (make-eq-hashtable) (hashtable-set! ht "my" "apple") (hashtable-set! ht "my" "apple") (hashtable-size ht))))
(display ", expects ")
(display '2)
(set! *test-ret* (let1 ht (make-eq-hashtable) (hashtable-set! ht "my" "apple") (hashtable-set! ht "my" "apple") (hashtable-size ht)))(if (equal? *test-ret* '2) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 ht (make-eq-hashtable) (hashtable-set! ht "my" "apple") (hashtable-set! ht "my" "apple") (hashtable-size ht)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 ht (make-eq-hashtable) (hashtable-set! ht "my" "apple") (hashtable-set! ht "my" "apple") (hashtable-size ht))))))(display "test ")
(display '((let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (hashtable-delete! ht 1) (hashtable-ref ht 1 #f))))
(display ", expects ")
(display '#f)
(set! *test-ret* (let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (hashtable-delete! ht 1) (hashtable-ref ht 1 #f)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (hashtable-delete! ht 1) (hashtable-ref ht 1 #f)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (hashtable-delete! ht 1) (hashtable-ref ht 1 #f))))))(display "test ")
(display '((let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" 1) (hashtable-delete! ht "one") (hashtable-ref ht "one" #f))))
(display ", expects ")
(display '#f)
(set! *test-ret* (let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" 1) (hashtable-delete! ht "one") (hashtable-ref ht "one" #f)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" 1) (hashtable-delete! ht "one") (hashtable-ref ht "one" #f)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" 1) (hashtable-delete! ht "one") (hashtable-ref ht "one" #f))))))(display "test ")
(display '((let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (hashtable-contains? ht 2))))
(display ", expects ")
(display '#f)
(set! *test-ret* (let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (hashtable-contains? ht 2)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (hashtable-contains? ht 2)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (hashtable-contains? ht 2))))))(display "test ")
(display '((let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (hashtable-contains? ht 1))))
(display ", expects ")
(display '#t)
(set! *test-ret* (let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (hashtable-contains? ht 1)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (hashtable-contains? ht 1)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (hashtable-contains? ht 1))))))(display "test ")
(display '((let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" 1) (hashtable-contains? ht "two"))))
(display ", expects ")
(display '#f)
(set! *test-ret* (let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" 1) (hashtable-contains? ht "two")))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" 1) (hashtable-contains? ht "two")) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" 1) (hashtable-contains? ht "two"))))))(display "test ")
(display '((let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" 1) (hashtable-contains? ht "one"))))
(display ", expects ")
(display '#t)
(set! *test-ret* (let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" 1) (hashtable-contains? ht "one")))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" 1) (hashtable-contains? ht "one")) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" 1) (hashtable-contains? ht "one"))))))(display "test ")
(display '((let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" "one") (hashtable-update! ht "one" (lambda (x) (string-append "!" x "!")) "hige") (hashtable-update! ht "two" (lambda (x) (string-append "!" x "!")) "hige") (string-append (hashtable-ref ht "one") (hashtable-ref ht "two")))))
(display ", expects ")
(display '"!one!!hige!")
(set! *test-ret* (let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" "one") (hashtable-update! ht "one" (lambda (x) (string-append "!" x "!")) "hige") (hashtable-update! ht "two" (lambda (x) (string-append "!" x "!")) "hige") (string-append (hashtable-ref ht "one") (hashtable-ref ht "two"))))(if (equal? *test-ret* '"!one!!hige!") (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" "one") (hashtable-update! ht "one" (lambda (x) (string-append "!" x "!")) "hige") (hashtable-update! ht "two" (lambda (x) (string-append "!" x "!")) "hige") (string-append (hashtable-ref ht "one") (hashtable-ref ht "two"))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" "one") (hashtable-update! ht "one" (lambda (x) (string-append "!" x "!")) "hige") (hashtable-update! ht "two" (lambda (x) (string-append "!" x "!")) "hige") (string-append (hashtable-ref ht "one") (hashtable-ref ht "two")))))))(display "test ")
(display '((let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (let1 ht-copy (hashtable-copy ht) (and (string=? (hashtable-ref ht-copy 1) "one") (not (hashtable-mutable? ht-copy)))))))
(display ", expects ")
(display '#t)
(set! *test-ret* (let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (let1 ht-copy (hashtable-copy ht) (and (string=? (hashtable-ref ht-copy 1) "one") (not (hashtable-mutable? ht-copy))))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (let1 ht-copy (hashtable-copy ht) (and (string=? (hashtable-ref ht-copy 1) "one") (not (hashtable-mutable? ht-copy))))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (let1 ht-copy (hashtable-copy ht) (and (string=? (hashtable-ref ht-copy 1) "one") (not (hashtable-mutable? ht-copy)))))))))(display "test ")
(display '((let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (let1 ht-copy (hashtable-copy ht #t) (and (string=? (hashtable-ref ht-copy 1) "one") (hashtable-mutable? ht-copy))))))
(display ", expects ")
(display '#t)
(set! *test-ret* (let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (let1 ht-copy (hashtable-copy ht #t) (and (string=? (hashtable-ref ht-copy 1) "one") (hashtable-mutable? ht-copy)))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (let1 ht-copy (hashtable-copy ht #t) (and (string=? (hashtable-ref ht-copy 1) "one") (hashtable-mutable? ht-copy)))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (let1 ht-copy (hashtable-copy ht #t) (and (string=? (hashtable-ref ht-copy 1) "one") (hashtable-mutable? ht-copy))))))))(display "test ")
(display '((let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" "one") (let1 ht-copy (hashtable-copy ht) (and (string=? (hashtable-ref ht-copy "one") "one") (not (hashtable-mutable? ht-copy)))))))
(display ", expects ")
(display '#t)
(set! *test-ret* (let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" "one") (let1 ht-copy (hashtable-copy ht) (and (string=? (hashtable-ref ht-copy "one") "one") (not (hashtable-mutable? ht-copy))))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" "one") (let1 ht-copy (hashtable-copy ht) (and (string=? (hashtable-ref ht-copy "one") "one") (not (hashtable-mutable? ht-copy))))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" "one") (let1 ht-copy (hashtable-copy ht) (and (string=? (hashtable-ref ht-copy "one") "one") (not (hashtable-mutable? ht-copy)))))))))(display "test ")
(display '((let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" "one") (let1 ht-copy (hashtable-copy ht #t) (and (string=? (hashtable-ref ht-copy "one") "one") (hashtable-mutable? ht-copy))))))
(display ", expects ")
(display '#t)
(set! *test-ret* (let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" "one") (let1 ht-copy (hashtable-copy ht #t) (and (string=? (hashtable-ref ht-copy "one") "one") (hashtable-mutable? ht-copy)))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" "one") (let1 ht-copy (hashtable-copy ht #t) (and (string=? (hashtable-ref ht-copy "one") "one") (hashtable-mutable? ht-copy)))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" "one") (let1 ht-copy (hashtable-copy ht #t) (and (string=? (hashtable-ref ht-copy "one") "one") (hashtable-mutable? ht-copy))))))))(display "test ")
(display '((let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (hashtable-set! ht 2 "two") (hashtable-clear! ht) (hashtable-size ht))))
(display ", expects ")
(display '0)
(set! *test-ret* (let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (hashtable-set! ht 2 "two") (hashtable-clear! ht) (hashtable-size ht)))(if (equal? *test-ret* '0) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (hashtable-set! ht 2 "two") (hashtable-clear! ht) (hashtable-size ht)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (hashtable-set! ht 2 "two") (hashtable-clear! ht) (hashtable-size ht))))))(display "test ")
(display '((let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" 1) (hashtable-set! ht "two" 2) (hashtable-clear! ht) (hashtable-size ht))))
(display ", expects ")
(display '0)
(set! *test-ret* (let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" 1) (hashtable-set! ht "two" 2) (hashtable-clear! ht) (hashtable-size ht)))(if (equal? *test-ret* '0) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" 1) (hashtable-set! ht "two" 2) (hashtable-clear! ht) (hashtable-size ht)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" 1) (hashtable-set! ht "two" 2) (hashtable-clear! ht) (hashtable-size ht))))))(display "test ")
(display '((let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (hashtable-set! ht 2 "two") (vector->list (hashtable-keys ht)))))
(display ", expects ")
(display '(1 2))
(set! *test-ret* (let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (hashtable-set! ht 2 "two") (vector->list (hashtable-keys ht))))(if (equal? *test-ret* '(1 2)) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (hashtable-set! ht 2 "two") (vector->list (hashtable-keys ht))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 ht (make-eq-hashtable) (hashtable-set! ht 1 "one") (hashtable-set! ht 2 "two") (vector->list (hashtable-keys ht)))))))(display "test ")
(display '((let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" 1) (hashtable-set! ht "two" 2) (let1 keys (vector->list (hashtable-keys ht)) (and (member "one" keys) (member "two" keys) (= 2 (length keys)))))))
(display ", expects ")
(display '#t)
(set! *test-ret* (let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" 1) (hashtable-set! ht "two" 2) (let1 keys (vector->list (hashtable-keys ht)) (and (member "one" keys) (member "two" keys) (= 2 (length keys))))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" 1) (hashtable-set! ht "two" 2) (let1 keys (vector->list (hashtable-keys ht)) (and (member "one" keys) (member "two" keys) (= 2 (length keys))))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" 1) (hashtable-set! ht "two" 2) (let1 keys (vector->list (hashtable-keys ht)) (and (member "one" keys) (member "two" keys) (= 2 (length keys)))))))))(display "test ")
(display '((let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" 1) (hashtable-set! ht "two" 2) (receive (keys vals) (hashtable-entries ht) (append (vector->list keys) (vector->list vals))))))
(display ", expects ")
(display '("two" "one" 2 1))
(set! *test-ret* (let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" 1) (hashtable-set! ht "two" 2) (receive (keys vals) (hashtable-entries ht) (append (vector->list keys) (vector->list vals)))))(if (equal? *test-ret* '("two" "one" 2 1)) (display " ===> ok\n") (begin (set! *test-error* (cons '(let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" 1) (hashtable-set! ht "two" 2) (receive (keys vals) (hashtable-entries ht) (append (vector->list keys) (vector->list vals)))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let1 ht (make-hashtable string-hash string=?) (hashtable-set! ht "one" 1) (hashtable-set! ht "two" 2) (receive (keys vals) (hashtable-entries ht) (append (vector->list keys) (vector->list vals))))))))(display "test ")
(display '((equal? eq? (hashtable-equivalence-function (make-eq-hashtable)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? eq? (hashtable-equivalence-function (make-eq-hashtable))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? eq? (hashtable-equivalence-function (make-eq-hashtable))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? eq? (hashtable-equivalence-function (make-eq-hashtable)))))))(display "test ")
(display '((hashtable-hash-function (make-eq-hashtable))))
(display ", expects ")
(display '#f)
(set! *test-ret* (hashtable-hash-function (make-eq-hashtable)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(hashtable-hash-function (make-eq-hashtable)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((hashtable-hash-function (make-eq-hashtable))))))(display "test ")
(display '((equal? string=? (hashtable-equivalence-function (make-hashtable string-hash string=?)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? string=? (hashtable-equivalence-function (make-hashtable string-hash string=?))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? string=? (hashtable-equivalence-function (make-hashtable string-hash string=?))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? string=? (hashtable-equivalence-function (make-hashtable string-hash string=?)))))))(display "test ")
(display '((equal? string-hash (hashtable-hash-function (make-hashtable string-hash string=?)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? string-hash (hashtable-hash-function (make-hashtable string-hash string=?))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? string-hash (hashtable-hash-function (make-hashtable string-hash string=?))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? string-hash (hashtable-hash-function (make-hashtable string-hash string=?)))))))(display "test ")
(display '((= (string-ci-hash "abc") (string-ci-hash "AbC"))))
(display ", expects ")
(display '#t)
(set! *test-ret* (= (string-ci-hash "abc") (string-ci-hash "AbC")))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(= (string-ci-hash "abc") (string-ci-hash "AbC")) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((= (string-ci-hash "abc") (string-ci-hash "AbC"))))))(display "test ")
(display '((= (symbol-hash 'abc) (symbol-hash 'abc))))
(display ", expects ")
(display '#t)
(set! *test-ret* (= (symbol-hash 'abc) (symbol-hash 'abc)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(= (symbol-hash 'abc) (symbol-hash 'abc)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((= (symbol-hash 'abc) (symbol-hash 'abc))))))(display "test ")
(display '((= (symbol-hash 'abc) (symbol-hash 'aBc))))
(display ", expects ")
(display '#f)
(set! *test-ret* (= (symbol-hash 'abc) (symbol-hash 'aBc)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(= (symbol-hash 'abc) (symbol-hash 'aBc)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((= (symbol-hash 'abc) (symbol-hash 'aBc))))))(display "test ")
(display '((= (equal-hash '(a b c)) (equal-hash '(a b c)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (= (equal-hash '(a b c)) (equal-hash '(a b c))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(= (equal-hash '(a b c)) (equal-hash '(a b c))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((= (equal-hash '(a b c)) (equal-hash '(a b c)))))))(display "test ")
(display '((equal? eqv? (hashtable-equivalence-function (make-eqv-hashtable)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? eqv? (hashtable-equivalence-function (make-eqv-hashtable))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? eqv? (hashtable-equivalence-function (make-eqv-hashtable))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? eqv? (hashtable-equivalence-function (make-eqv-hashtable)))))))(display "test ")
(display '((let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd)) (point? (record-predicate :point)) (point-x (record-accessor :point 0)) (point-y (record-accessor :point 1)) (point-x-set! (record-mutator :point 0)) (point-y-set! (record-mutator :point 1)) (p1 (make-point 1 2))) (and (point? p1) (record? p1) (= (point-x p1) 1) (= (point-y p1) 2) (point-x-set! p1 5) (= (point-x p1) 5)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd)) (point? (record-predicate :point)) (point-x (record-accessor :point 0)) (point-y (record-accessor :point 1)) (point-x-set! (record-mutator :point 0)) (point-y-set! (record-mutator :point 1)) (p1 (make-point 1 2))) (and (point? p1) (record? p1) (= (point-x p1) 1) (= (point-y p1) 2) (point-x-set! p1 5) (= (point-x p1) 5))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd)) (point? (record-predicate :point)) (point-x (record-accessor :point 0)) (point-y (record-accessor :point 1)) (point-x-set! (record-mutator :point 0)) (point-y-set! (record-mutator :point 1)) (p1 (make-point 1 2))) (and (point? p1) (record? p1) (= (point-x p1) 1) (= (point-y p1) 2) (point-x-set! p1 5) (= (point-x p1) 5))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd)) (point? (record-predicate :point)) (point-x (record-accessor :point 0)) (point-y (record-accessor :point 1)) (point-x-set! (record-mutator :point 0)) (point-y-set! (record-mutator :point 1)) (p1 (make-point 1 2))) (and (point? p1) (record? p1) (= (point-x p1) 1) (= (point-y p1) 2) (point-x-set! p1 5) (= (point-x p1) 5)))))))(display "test ")
(display '((let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point2 (make-record-type-descriptor 'point2 :point #f #f #f '#((mutable x) (mutable y)))) (make-point2 (record-constructor (make-record-constructor-descriptor :point2 #f #f))) (point? (record-predicate :point)) (point-x (record-accessor :point 0)) (point-y (record-accessor :point 1)) (point-x-set! (record-mutator :point 0)) (point-y-set! (record-mutator :point 1)) (point2? (record-predicate :point2)) (point2-xx (record-accessor :point2 0)) (point2-yy (record-accessor :point2 1)) (point2-xx-set! (record-mutator :point2 0)) (point2-yy-set! (record-mutator :point2 1)) (p2 (make-point2 1 2 3 4))) (and (point? p2) (point2? p2) (record? p2) (= (point-x p2) 1) (= (point-y p2) 2) (= (point2-xx p2) 3) (= (point2-yy p2) 4) (point-x-set! p2 5) (= (point-x p2) 5) (point-y-set! p2 6) (= (point-y p2) 6) (point2-xx-set! p2 7) (= (point2-xx p2) 7) (point2-yy-set! p2 8) (= (point2-yy p2) 8)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point2 (make-record-type-descriptor 'point2 :point #f #f #f '#((mutable x) (mutable y)))) (make-point2 (record-constructor (make-record-constructor-descriptor :point2 #f #f))) (point? (record-predicate :point)) (point-x (record-accessor :point 0)) (point-y (record-accessor :point 1)) (point-x-set! (record-mutator :point 0)) (point-y-set! (record-mutator :point 1)) (point2? (record-predicate :point2)) (point2-xx (record-accessor :point2 0)) (point2-yy (record-accessor :point2 1)) (point2-xx-set! (record-mutator :point2 0)) (point2-yy-set! (record-mutator :point2 1)) (p2 (make-point2 1 2 3 4))) (and (point? p2) (point2? p2) (record? p2) (= (point-x p2) 1) (= (point-y p2) 2) (= (point2-xx p2) 3) (= (point2-yy p2) 4) (point-x-set! p2 5) (= (point-x p2) 5) (point-y-set! p2 6) (= (point-y p2) 6) (point2-xx-set! p2 7) (= (point2-xx p2) 7) (point2-yy-set! p2 8) (= (point2-yy p2) 8))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point2 (make-record-type-descriptor 'point2 :point #f #f #f '#((mutable x) (mutable y)))) (make-point2 (record-constructor (make-record-constructor-descriptor :point2 #f #f))) (point? (record-predicate :point)) (point-x (record-accessor :point 0)) (point-y (record-accessor :point 1)) (point-x-set! (record-mutator :point 0)) (point-y-set! (record-mutator :point 1)) (point2? (record-predicate :point2)) (point2-xx (record-accessor :point2 0)) (point2-yy (record-accessor :point2 1)) (point2-xx-set! (record-mutator :point2 0)) (point2-yy-set! (record-mutator :point2 1)) (p2 (make-point2 1 2 3 4))) (and (point? p2) (point2? p2) (record? p2) (= (point-x p2) 1) (= (point-y p2) 2) (= (point2-xx p2) 3) (= (point2-yy p2) 4) (point-x-set! p2 5) (= (point-x p2) 5) (point-y-set! p2 6) (= (point-y p2) 6) (point2-xx-set! p2 7) (= (point2-xx p2) 7) (point2-yy-set! p2 8) (= (point2-yy p2) 8))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point2 (make-record-type-descriptor 'point2 :point #f #f #f '#((mutable x) (mutable y)))) (make-point2 (record-constructor (make-record-constructor-descriptor :point2 #f #f))) (point? (record-predicate :point)) (point-x (record-accessor :point 0)) (point-y (record-accessor :point 1)) (point-x-set! (record-mutator :point 0)) (point-y-set! (record-mutator :point 1)) (point2? (record-predicate :point2)) (point2-xx (record-accessor :point2 0)) (point2-yy (record-accessor :point2 1)) (point2-xx-set! (record-mutator :point2 0)) (point2-yy-set! (record-mutator :point2 1)) (p2 (make-point2 1 2 3 4))) (and (point? p2) (point2? p2) (record? p2) (= (point-x p2) 1) (= (point-y p2) 2) (= (point2-xx p2) 3) (= (point2-yy p2) 4) (point-x-set! p2 5) (= (point-x p2) 5) (point-y-set! p2 6) (= (point-y p2) 6) (point2-xx-set! p2 7) (= (point2-xx p2) 7) (point2-yy-set! p2 8) (= (point2-yy p2) 8)))))))(display "test ")
(display '((let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point-cd/abs (make-record-constructor-descriptor :point #f (lambda (new) (lambda (x y) (new (abs x) (abs y)))))) (point-x (record-accessor :point 0)) (point-y (record-accessor :point 1)) (make-point/abs (record-constructor :point-cd/abs))) (and (= (point-x (make-point/abs -1 -2)) 1) (= (point-y (make-point/abs -1 -2)) 2)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point-cd/abs (make-record-constructor-descriptor :point #f (lambda (new) (lambda (x y) (new (abs x) (abs y)))))) (point-x (record-accessor :point 0)) (point-y (record-accessor :point 1)) (make-point/abs (record-constructor :point-cd/abs))) (and (= (point-x (make-point/abs -1 -2)) 1) (= (point-y (make-point/abs -1 -2)) 2))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point-cd/abs (make-record-constructor-descriptor :point #f (lambda (new) (lambda (x y) (new (abs x) (abs y)))))) (point-x (record-accessor :point 0)) (point-y (record-accessor :point 1)) (make-point/abs (record-constructor :point-cd/abs))) (and (= (point-x (make-point/abs -1 -2)) 1) (= (point-y (make-point/abs -1 -2)) 2))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point-cd/abs (make-record-constructor-descriptor :point #f (lambda (new) (lambda (x y) (new (abs x) (abs y)))))) (point-x (record-accessor :point 0)) (point-y (record-accessor :point 1)) (make-point/abs (record-constructor :point-cd/abs))) (and (= (point-x (make-point/abs -1 -2)) 1) (= (point-y (make-point/abs -1 -2)) 2)))))))(display "test ")
(display '((let* ((color->rgb (lambda (c) (cons 'rgb c))) (:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (:point-cd/abs (make-record-constructor-descriptor :point #f (lambda (new) (lambda (x y) (new (abs x) (abs y)))))) (point-x (record-accessor :point 0)) (:cpoint (make-record-type-descriptor 'cpoint :point #f #f #f '#((mutable rgb)))) (cpoint-rgb (record-accessor :cpoint 0)) (make-cpoint (record-constructor (make-record-constructor-descriptor :cpoint :point-cd (lambda (p) (lambda (x y c) ((p x y) (color->rgb c))))))) (make-cpoint/abs (record-constructor (make-record-constructor-descriptor :cpoint :point-cd/abs (lambda (p) (lambda (x y c) ((p x y) (color->rgb c)))))))) (and (equal? (cpoint-rgb (make-cpoint -1 -3 'red)) '(rgb . red)) (= (point-x (make-cpoint -1 -3 'red)) -1) (= (point-x (make-cpoint/abs -1 -3 'red)) 1)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (let* ((color->rgb (lambda (c) (cons 'rgb c))) (:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (:point-cd/abs (make-record-constructor-descriptor :point #f (lambda (new) (lambda (x y) (new (abs x) (abs y)))))) (point-x (record-accessor :point 0)) (:cpoint (make-record-type-descriptor 'cpoint :point #f #f #f '#((mutable rgb)))) (cpoint-rgb (record-accessor :cpoint 0)) (make-cpoint (record-constructor (make-record-constructor-descriptor :cpoint :point-cd (lambda (p) (lambda (x y c) ((p x y) (color->rgb c))))))) (make-cpoint/abs (record-constructor (make-record-constructor-descriptor :cpoint :point-cd/abs (lambda (p) (lambda (x y c) ((p x y) (color->rgb c)))))))) (and (equal? (cpoint-rgb (make-cpoint -1 -3 'red)) '(rgb . red)) (= (point-x (make-cpoint -1 -3 'red)) -1) (= (point-x (make-cpoint/abs -1 -3 'red)) 1))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(let* ((color->rgb (lambda (c) (cons 'rgb c))) (:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (:point-cd/abs (make-record-constructor-descriptor :point #f (lambda (new) (lambda (x y) (new (abs x) (abs y)))))) (point-x (record-accessor :point 0)) (:cpoint (make-record-type-descriptor 'cpoint :point #f #f #f '#((mutable rgb)))) (cpoint-rgb (record-accessor :cpoint 0)) (make-cpoint (record-constructor (make-record-constructor-descriptor :cpoint :point-cd (lambda (p) (lambda (x y c) ((p x y) (color->rgb c))))))) (make-cpoint/abs (record-constructor (make-record-constructor-descriptor :cpoint :point-cd/abs (lambda (p) (lambda (x y c) ((p x y) (color->rgb c)))))))) (and (equal? (cpoint-rgb (make-cpoint -1 -3 'red)) '(rgb . red)) (= (point-x (make-cpoint -1 -3 'red)) -1) (= (point-x (make-cpoint/abs -1 -3 'red)) 1))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let* ((color->rgb (lambda (c) (cons 'rgb c))) (:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (:point-cd/abs (make-record-constructor-descriptor :point #f (lambda (new) (lambda (x y) (new (abs x) (abs y)))))) (point-x (record-accessor :point 0)) (:cpoint (make-record-type-descriptor 'cpoint :point #f #f #f '#((mutable rgb)))) (cpoint-rgb (record-accessor :cpoint 0)) (make-cpoint (record-constructor (make-record-constructor-descriptor :cpoint :point-cd (lambda (p) (lambda (x y c) ((p x y) (color->rgb c))))))) (make-cpoint/abs (record-constructor (make-record-constructor-descriptor :cpoint :point-cd/abs (lambda (p) (lambda (x y c) ((p x y) (color->rgb c)))))))) (and (equal? (cpoint-rgb (make-cpoint -1 -3 'red)) '(rgb . red)) (= (point-x (make-cpoint -1 -3 'red)) -1) (= (point-x (make-cpoint/abs -1 -3 'red)) 1)))))))(display "test ")
(display '((let* ((:point (make-record-type-descriptor 'point #f #f #f #t '#((mutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd)) (p (make-point 1 2))) (record? p))))
(display ", expects ")
(display '#f)
(set! *test-ret* (let* ((:point (make-record-type-descriptor 'point #f #f #f #t '#((mutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd)) (p (make-point 1 2))) (record? p)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(let* ((:point (make-record-type-descriptor 'point #f #f #f #t '#((mutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd)) (p (make-point 1 2))) (record? p)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let* ((:point (make-record-type-descriptor 'point #f #f #f #t '#((mutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd)) (p (make-point 1 2))) (record? p))))))(display "test ")
(display '((let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd)) (p (make-point 1 2))) (eqv? :point (record-rtd p)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd)) (p (make-point 1 2))) (eqv? :point (record-rtd p))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd)) (p (make-point 1 2))) (eqv? :point (record-rtd p))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd)) (p (make-point 1 2))) (eqv? :point (record-rtd p)))))))(display "test ")
(display '((let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd)) (p (make-point 1 2))) (record-type-name (record-rtd p)))))
(display ", expects ")
(display 'point)
(set! *test-ret* (let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd)) (p (make-point 1 2))) (record-type-name (record-rtd p))))(if (equal? *test-ret* 'point) (display " ===> ok\n") (begin (set! *test-error* (cons '(let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd)) (p (make-point 1 2))) (record-type-name (record-rtd p))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd)) (p (make-point 1 2))) (record-type-name (record-rtd p)))))))(display "test ")
(display '((let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point2 (make-record-type-descriptor 'point2 :point #f #f #f '#((mutable x) (mutable y))))) (record-type-name (record-type-parent :point2)))))
(display ", expects ")
(display 'point)
(set! *test-ret* (let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point2 (make-record-type-descriptor 'point2 :point #f #f #f '#((mutable x) (mutable y))))) (record-type-name (record-type-parent :point2))))(if (equal? *test-ret* 'point) (display " ===> ok\n") (begin (set! *test-error* (cons '(let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point2 (make-record-type-descriptor 'point2 :point #f #f #f '#((mutable x) (mutable y))))) (record-type-name (record-type-parent :point2))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point2 (make-record-type-descriptor 'point2 :point #f #f #f '#((mutable x) (mutable y))))) (record-type-name (record-type-parent :point2)))))))(display "test ")
(display '((let* ((:point (make-record-type-descriptor 'point #f 'point-uid #f #f '#((mutable x) (mutable y)))) (:point2 (make-record-type-descriptor 'point #f 'point-uid #f #f '#((mutable x) (mutable y))))) (eq? :point :point2))))
(display ", expects ")
(display '#t)
(set! *test-ret* (let* ((:point (make-record-type-descriptor 'point #f 'point-uid #f #f '#((mutable x) (mutable y)))) (:point2 (make-record-type-descriptor 'point #f 'point-uid #f #f '#((mutable x) (mutable y))))) (eq? :point :point2)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(let* ((:point (make-record-type-descriptor 'point #f 'point-uid #f #f '#((mutable x) (mutable y)))) (:point2 (make-record-type-descriptor 'point #f 'point-uid #f #f '#((mutable x) (mutable y))))) (eq? :point :point2)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let* ((:point (make-record-type-descriptor 'point #f 'point-uid #f #f '#((mutable x) (mutable y)))) (:point2 (make-record-type-descriptor 'point #f 'point-uid #f #f '#((mutable x) (mutable y))))) (eq? :point :point2))))))(display "test ")
(display '((let* ((:point2 (make-record-type-descriptor 'point2 #f #f #f #f '#((mutable x) (mutable y))))) (record-type-generative? :point2))))
(display ", expects ")
(display '#t)
(set! *test-ret* (let* ((:point2 (make-record-type-descriptor 'point2 #f #f #f #f '#((mutable x) (mutable y))))) (record-type-generative? :point2)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(let* ((:point2 (make-record-type-descriptor 'point2 #f #f #f #f '#((mutable x) (mutable y))))) (record-type-generative? :point2)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let* ((:point2 (make-record-type-descriptor 'point2 #f #f #f #f '#((mutable x) (mutable y))))) (record-type-generative? :point2))))))(display "test ")
(display '((let* ((:point (make-record-type-descriptor 'point #f 'point-uid #f #f '#((mutable x) (mutable y))))) (record-type-generative? :point))))
(display ", expects ")
(display '#f)
(set! *test-ret* (let* ((:point (make-record-type-descriptor 'point #f 'point-uid #f #f '#((mutable x) (mutable y))))) (record-type-generative? :point)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(let* ((:point (make-record-type-descriptor 'point #f 'point-uid #f #f '#((mutable x) (mutable y))))) (record-type-generative? :point)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let* ((:point (make-record-type-descriptor 'point #f 'point-uid #f #f '#((mutable x) (mutable y))))) (record-type-generative? :point))))))(display "test ")
(display '((let* ((:point (make-record-type-descriptor 'point #f 'point-uid #f #f '#((mutable x) (mutable y))))) (record-type-field-names :point))))
(display ", expects ")
(display '#(x y))
(set! *test-ret* (let* ((:point (make-record-type-descriptor 'point #f 'point-uid #f #f '#((mutable x) (mutable y))))) (record-type-field-names :point)))(if (equal? *test-ret* '#(x y)) (display " ===> ok\n") (begin (set! *test-error* (cons '(let* ((:point (make-record-type-descriptor 'point #f 'point-uid #f #f '#((mutable x) (mutable y))))) (record-type-field-names :point)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let* ((:point (make-record-type-descriptor 'point #f 'point-uid #f #f '#((mutable x) (mutable y))))) (record-type-field-names :point))))))(display "test ")
(display '((let* ((:point (make-record-type-descriptor 'point #f 'point-uid #f #f '#((mutable x) (mutable y))))) (record-field-mutable? :point 1))))
(display ", expects ")
(display '#t)
(set! *test-ret* (let* ((:point (make-record-type-descriptor 'point #f 'point-uid #f #f '#((mutable x) (mutable y))))) (record-field-mutable? :point 1)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(let* ((:point (make-record-type-descriptor 'point #f 'point-uid #f #f '#((mutable x) (mutable y))))) (record-field-mutable? :point 1)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let* ((:point (make-record-type-descriptor 'point #f 'point-uid #f #f '#((mutable x) (mutable y))))) (record-field-mutable? :point 1))))))(display "test ")
(display '((let ((path '()) (c '())) (let ((add (lambda (s) (set! path (cons s path))))) (dynamic-wind (lambda () (add 'connect)) (lambda () (add (call-with-current-continuation (lambda (c0) (set! c c0) 'talk1)))) (lambda () (add 'disconnect))) (if (< (length path) 4) (c 'talk2) (reverse path))))))
(display ", expects ")
(display '(connect talk1 disconnect connect talk2 disconnect))
(set! *test-ret* (let ((path '()) (c '())) (let ((add (lambda (s) (set! path (cons s path))))) (dynamic-wind (lambda () (add 'connect)) (lambda () (add (call-with-current-continuation (lambda (c0) (set! c c0) 'talk1)))) (lambda () (add 'disconnect))) (if (< (length path) 4) (c 'talk2) (reverse path)))))(if (equal? *test-ret* '(connect talk1 disconnect connect talk2 disconnect)) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((path '()) (c '())) (let ((add (lambda (s) (set! path (cons s path))))) (dynamic-wind (lambda () (add 'connect)) (lambda () (add (call-with-current-continuation (lambda (c0) (set! c c0) 'talk1)))) (lambda () (add 'disconnect))) (if (< (length path) 4) (c 'talk2) (reverse path)))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((path '()) (c '())) (let ((add (lambda (s) (set! path (cons s path))))) (dynamic-wind (lambda () (add 'connect)) (lambda () (add (call-with-current-continuation (lambda (c0) (set! c c0) 'talk1)))) (lambda () (add 'disconnect))) (if (< (length path) 4) (c 'talk2) (reverse path))))))))(display "test ")
(display '((let* ((c '()) (dynwind-test1 (lambda () (let ((path '())) (let ((add (lambda (s) (set! path (cons s path))))) (dynamic-wind (lambda () (add 'connect)) (lambda () (add (call-with-current-continuation (lambda (c0) (set! c c0) 'talk1)))) (lambda () (add 'disconnect))) (if (< (length path) 4) (c 'talk2) (reverse path)))))) (dynwind-test2 (lambda () (let ((path '())) (dynamic-wind (lambda () (set! path (cons 1 path))) (lambda () (set! path (append (dynwind-test1) path))) (lambda () (set! path (cons 3 path)))) path)))) (dynwind-test2))))
(display ", expects ")
(display '(3 connect talk1 disconnect connect talk2 disconnect 1))
(set! *test-ret* (let* ((c '()) (dynwind-test1 (lambda () (let ((path '())) (let ((add (lambda (s) (set! path (cons s path))))) (dynamic-wind (lambda () (add 'connect)) (lambda () (add (call-with-current-continuation (lambda (c0) (set! c c0) 'talk1)))) (lambda () (add 'disconnect))) (if (< (length path) 4) (c 'talk2) (reverse path)))))) (dynwind-test2 (lambda () (let ((path '())) (dynamic-wind (lambda () (set! path (cons 1 path))) (lambda () (set! path (append (dynwind-test1) path))) (lambda () (set! path (cons 3 path)))) path)))) (dynwind-test2)))(if (equal? *test-ret* '(3 connect talk1 disconnect connect talk2 disconnect 1)) (display " ===> ok\n") (begin (set! *test-error* (cons '(let* ((c '()) (dynwind-test1 (lambda () (let ((path '())) (let ((add (lambda (s) (set! path (cons s path))))) (dynamic-wind (lambda () (add 'connect)) (lambda () (add (call-with-current-continuation (lambda (c0) (set! c c0) 'talk1)))) (lambda () (add 'disconnect))) (if (< (length path) 4) (c 'talk2) (reverse path)))))) (dynwind-test2 (lambda () (let ((path '())) (dynamic-wind (lambda () (set! path (cons 1 path))) (lambda () (set! path (append (dynwind-test1) path))) (lambda () (set! path (cons 3 path)))) path)))) (dynwind-test2)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let* ((c '()) (dynwind-test1 (lambda () (let ((path '())) (let ((add (lambda (s) (set! path (cons s path))))) (dynamic-wind (lambda () (add 'connect)) (lambda () (add (call-with-current-continuation (lambda (c0) (set! c c0) 'talk1)))) (lambda () (add 'disconnect))) (if (< (length path) 4) (c 'talk2) (reverse path)))))) (dynwind-test2 (lambda () (let ((path '())) (dynamic-wind (lambda () (set! path (cons 1 path))) (lambda () (set! path (append (dynwind-test1) path))) (lambda () (set! path (cons 3 path)))) path)))) (dynwind-test2))))))(display "test ")
(display '((let ((x '()) (c #f)) (dynamic-wind (lambda () (set! x (cons 'a x))) (lambda () (dynamic-wind (lambda () (set! x (cons 'b x))) (lambda () (dynamic-wind (lambda () (set! x (cons 'c x))) (lambda () (set! c (call/cc (lambda (x) x)))) (lambda () (set! x (cons 'd x))))) (lambda () (set! x (cons 'e x)))) (dynamic-wind (lambda () (set! x (cons 'f x))) (lambda () (when c (c #f))) (lambda () (set! x (cons 'g x))))) (lambda () (set! x (cons 'h x)))) (reverse x))))
(display ", expects ")
(display '(a b c d e f g b c d e f g h))
(set! *test-ret* (let ((x '()) (c #f)) (dynamic-wind (lambda () (set! x (cons 'a x))) (lambda () (dynamic-wind (lambda () (set! x (cons 'b x))) (lambda () (dynamic-wind (lambda () (set! x (cons 'c x))) (lambda () (set! c (call/cc (lambda (x) x)))) (lambda () (set! x (cons 'd x))))) (lambda () (set! x (cons 'e x)))) (dynamic-wind (lambda () (set! x (cons 'f x))) (lambda () (when c (c #f))) (lambda () (set! x (cons 'g x))))) (lambda () (set! x (cons 'h x)))) (reverse x)))(if (equal? *test-ret* '(a b c d e f g b c d e f g h)) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((x '()) (c #f)) (dynamic-wind (lambda () (set! x (cons 'a x))) (lambda () (dynamic-wind (lambda () (set! x (cons 'b x))) (lambda () (dynamic-wind (lambda () (set! x (cons 'c x))) (lambda () (set! c (call/cc (lambda (x) x)))) (lambda () (set! x (cons 'd x))))) (lambda () (set! x (cons 'e x)))) (dynamic-wind (lambda () (set! x (cons 'f x))) (lambda () (when c (c #f))) (lambda () (set! x (cons 'g x))))) (lambda () (set! x (cons 'h x)))) (reverse x)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((x '()) (c #f)) (dynamic-wind (lambda () (set! x (cons 'a x))) (lambda () (dynamic-wind (lambda () (set! x (cons 'b x))) (lambda () (dynamic-wind (lambda () (set! x (cons 'c x))) (lambda () (set! c (call/cc (lambda (x) x)))) (lambda () (set! x (cons 'd x))))) (lambda () (set! x (cons 'e x)))) (dynamic-wind (lambda () (set! x (cons 'f x))) (lambda () (when c (c #f))) (lambda () (set! x (cons 'g x))))) (lambda () (set! x (cons 'h x)))) (reverse x))))))(display "test ")
(display '(((lambda () (receive x (dynamic-wind (lambda () #f) (lambda () (values 'a 'b 'c)) (lambda () #f)) x)))))
(display ", expects ")
(display '(a b c))
(set! *test-ret* ((lambda () (receive x (dynamic-wind (lambda () #f) (lambda () (values 'a 'b 'c)) (lambda () #f)) x))))(if (equal? *test-ret* '(a b c)) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda () (receive x (dynamic-wind (lambda () #f) (lambda () (values 'a 'b 'c)) (lambda () #f)) x))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda () (receive x (dynamic-wind (lambda () #f) (lambda () (values 'a 'b 'c)) (lambda () #f)) x)))))))(display "test ")
(display '(((lambda () (receive x (dynamic-wind (lambda () #f) (lambda () (values)) (lambda () #f)) x)))))
(display ", expects ")
(display '())
(set! *test-ret* ((lambda () (receive x (dynamic-wind (lambda () #f) (lambda () (values)) (lambda () #f)) x))))(if (equal? *test-ret* '()) (display " ===> ok\n") (begin (set! *test-error* (cons '((lambda () (receive x (dynamic-wind (lambda () #f) (lambda () (values)) (lambda () #f)) x))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '(((lambda () (receive x (dynamic-wind (lambda () #f) (lambda () (values)) (lambda () #f)) x)))))))(display "test ")
(display '((eval 3 '())))
(display ", expects ")
(display '3)
(set! *test-ret* (eval 3 '()))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(eval 3 '()) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((eval 3 '())))))(display "test ")
(display '((equal? '(#(1 2 3) . #(one two three)) '(#(1 2 3) . #(one two three)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? '(#(1 2 3) . #(one two three)) '(#(1 2 3) . #(one two three))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? '(#(1 2 3) . #(one two three)) '(#(1 2 3) . #(one two three))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? '(#(1 2 3) . #(one two three)) '(#(1 2 3) . #(one two three)))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (call/cc (lambda (cont) (with-exception-handler (lambda (c) (cont 'error)) (lambda () (car 3)))))))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (call/cc (lambda (cont) (with-exception-handler (lambda (c) (cont 'error)) (lambda () (car 3))))))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (call/cc (lambda (cont) (with-exception-handler (lambda (c) (cont 'error)) (lambda () (car 3))))))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (call/cc (lambda (cont) (with-exception-handler (lambda (c) (cont 'error)) (lambda () (car 3)))))))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (car 3)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (car 3))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (car 3))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (car 3)))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (cdr 3)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (cdr 3))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (cdr 3))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (cdr 3)))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (cddr 3)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (cddr 3))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (cddr 3))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (cddr 3)))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (cdar 3)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (cdar 3))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (cdar 3))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (cdar 3)))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (cadr 3)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (cadr 3))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (cadr 3))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (cadr 3)))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (caar 3)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (caar 3))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (caar 3))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (caar 3)))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (values 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (values 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (values 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (values 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (apply values '(1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (apply values '(1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (apply values '(1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (apply values '(1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (apply (lambda (s) (display s)) '(1 2))))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (apply (lambda (s) (display s)) '(1 2)))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (apply (lambda (s) (display s)) '(1 2)))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (apply (lambda (s) (display s)) '(1 2))))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (number? 2 2)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (number? 2 2))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (number? 2 2))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (number? 2 2)))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (make-record-constructor-descriptor)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (make-record-constructor-descriptor))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (make-record-constructor-descriptor))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (make-record-constructor-descriptor)))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (hashtable-clear! 1 1 1)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (hashtable-clear! 1 1 1))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (hashtable-clear! 1 1 1))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (hashtable-clear! 1 1 1)))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (record-predicate 3)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (record-predicate 3))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (record-predicate 3))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (record-predicate 3)))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (record-constructor 3)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (record-constructor 3))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (record-constructor 3))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (record-constructor 3)))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (make-record-type-descriptor 'point 3 'uid #f #f #f)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (make-record-type-descriptor 'point 3 'uid #f #f #f))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (make-record-type-descriptor 'point 3 'uid #f #f #f))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (make-record-type-descriptor 'point 3 'uid #f #f #f)))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd)) (point-x (record-accessor :point 3))) #f)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd)) (point-x (record-accessor :point 3))) #f))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd)) (point-x (record-accessor :point 3))) #f))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((mutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd)) (point-x (record-accessor :point 3))) #f)))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((immutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd)) (point-x (record-mutator :point 0))) #f)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((immutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd)) (point-x (record-mutator :point 0))) #f))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((immutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd)) (point-x (record-mutator :point 0))) #f))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((immutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd)) (point-x (record-mutator :point 0))) #f)))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((immutable x) (mutable y)))) (:point2 (make-record-type-descriptor 'point2 #f #f #f #f '#((immutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (:point2-cd (make-record-constructor-descriptor :point2 #f #f)) (make-point (record-constructor :point-cd)) (point2-x (record-accessor :point2 0))) (point2-x (make-point 1 2)))))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((immutable x) (mutable y)))) (:point2 (make-record-type-descriptor 'point2 #f #f #f #f '#((immutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (:point2-cd (make-record-constructor-descriptor :point2 #f #f)) (make-point (record-constructor :point-cd)) (point2-x (record-accessor :point2 0))) (point2-x (make-point 1 2))))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((immutable x) (mutable y)))) (:point2 (make-record-type-descriptor 'point2 #f #f #f #f '#((immutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (:point2-cd (make-record-constructor-descriptor :point2 #f #f)) (make-point (record-constructor :point-cd)) (point2-x (record-accessor :point2 0))) (point2-x (make-point 1 2))))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (let* ((:point (make-record-type-descriptor 'point #f #f #f #f '#((immutable x) (mutable y)))) (:point2 (make-record-type-descriptor 'point2 #f #f #f #f '#((immutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (:point2-cd (make-record-constructor-descriptor :point2 #f #f)) (make-point (record-constructor :point-cd)) (point2-x (record-accessor :point2 0))) (point2-x (make-point 1 2)))))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (let* ((:point (make-record-type-descriptor 'point #f #f #t #t '#((immutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd))) (record-rtd (make-point 2 21)))))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (let* ((:point (make-record-type-descriptor 'point #f #f #t #t '#((immutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd))) (record-rtd (make-point 2 21))))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (let* ((:point (make-record-type-descriptor 'point #f #f #t #t '#((immutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd))) (record-rtd (make-point 2 21))))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (let* ((:point (make-record-type-descriptor 'point #f #f #t #t '#((immutable x) (mutable y)))) (:point-cd (make-record-constructor-descriptor :point #f #f)) (make-point (record-constructor :point-cd))) (record-rtd (make-point 2 21)))))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (apply read-char (current-input-port))))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (apply read-char (current-input-port)))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (apply read-char (current-input-port)))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (apply read-char (current-input-port))))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (rxmatch-start (rxmatch #/\d+/ "a345a") 5)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (rxmatch-start (rxmatch #/\d+/ "a345a") 5))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (rxmatch-start (rxmatch #/\d+/ "a345a") 5))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (rxmatch-start (rxmatch #/\d+/ "a345a") 5)))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (string-ref "hige" 5)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (string-ref "hige" 5))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (string-ref "hige" 5))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (string-ref "hige" 5)))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (open-file-input-port "not-exist-path/////xxx")))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (open-file-input-port "not-exist-path/////xxx"))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (open-file-input-port "not-exist-path/////xxx"))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (open-file-input-port "not-exist-path/////xxx")))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (open-file-output-port "not-exist-path/////xxx")))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (open-file-output-port "not-exist-path/////xxx"))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (open-file-output-port "not-exist-path/////xxx"))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (open-file-output-port "not-exist-path/////xxx")))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (format "~a ~a" 1)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (format "~a ~a" 1))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (format "~a ~a" 1))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (format "~a ~a" 1)))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) my-unbound-variable))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) my-unbound-variable)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) my-unbound-variable)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) my-unbound-variable))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (my-unbound-variable)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (my-unbound-variable))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (my-unbound-variable))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (my-unbound-variable)))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (vector-ref 'v 3)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (vector-ref 'v 3))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (vector-ref 'v 3))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (vector-ref 'v 3)))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (receive (a) (values 1 2))))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (receive (a) (values 1 2)))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (receive (a) (values 1 2)))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (receive (a) (values 1 2))))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (receive (a b) (values 1))))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (receive (a b) (values 1)))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (receive (a b) (values 1)))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (receive (a b) (values 1))))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (3)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (3))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (3))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (3)))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (set! my-unbound-variable 3)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (set! my-unbound-variable 3))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (set! my-unbound-variable 3))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (set! my-unbound-variable 3)))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (/ 3 0)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (/ 3 0))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (/ 3 0))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (/ 3 0)))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (error "our" "message")))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (error "our" "message"))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (error "our" "message"))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (error "our" "message")))))))(display "test ")
(display '((let ((x (list 'a 'b 'c 'a)) (y (list 'a 'b 'c 'a 'b 'c 'a))) (set-cdr! (list-tail x 2) x) (set-cdr! (list-tail y 5) y) (equal? x y))))
(display ", expects ")
(display '#t)
(set! *test-ret* (let ((x (list 'a 'b 'c 'a)) (y (list 'a 'b 'c 'a 'b 'c 'a))) (set-cdr! (list-tail x 2) x) (set-cdr! (list-tail y 5) y) (equal? x y)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((x (list 'a 'b 'c 'a)) (y (list 'a 'b 'c 'a 'b 'c 'a))) (set-cdr! (list-tail x 2) x) (set-cdr! (list-tail y 5) y) (equal? x y)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((x (list 'a 'b 'c 'a)) (y (list 'a 'b 'c 'a 'b 'c 'a))) (set-cdr! (list-tail x 2) x) (set-cdr! (list-tail y 5) y) (equal? x y))))))(display "test ")
(display '((apply = '(3 3))))
(display ", expects ")
(display '#t)
(set! *test-ret* (apply = '(3 3)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply = '(3 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply = '(3 3))))))(display "test ")
(display '((apply = '(3 4))))
(display ", expects ")
(display '#f)
(set! *test-ret* (apply = '(3 4)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply = '(3 4)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply = '(3 4))))))(display "test ")
(display '((apply = '(3 3 3 3))))
(display ", expects ")
(display '#t)
(set! *test-ret* (apply = '(3 3 3 3)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply = '(3 3 3 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply = '(3 3 3 3))))))(display "test ")
(display '((apply = '(3 3 3 4))))
(display ", expects ")
(display '#f)
(set! *test-ret* (apply = '(3 3 3 4)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply = '(3 3 3 4)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply = '(3 3 3 4))))))(display "test ")
(display '((apply = '(4 3 3 3))))
(display ", expects ")
(display '#f)
(set! *test-ret* (apply = '(4 3 3 3)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply = '(4 3 3 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply = '(4 3 3 3))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (apply = '(4 'z 3 3))))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (apply = '(4 'z 3 3)))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (apply = '(4 'z 3 3)))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (apply = '(4 'z 3 3))))))))(display "test ")
(display '((apply > '(4 3))))
(display ", expects ")
(display '#t)
(set! *test-ret* (apply > '(4 3)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply > '(4 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply > '(4 3))))))(display "test ")
(display '((apply > '(4 3 2))))
(display ", expects ")
(display '#t)
(set! *test-ret* (apply > '(4 3 2)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply > '(4 3 2)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply > '(4 3 2))))))(display "test ")
(display '((apply > '(4 3 1 2))))
(display ", expects ")
(display '#f)
(set! *test-ret* (apply > '(4 3 1 2)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply > '(4 3 1 2)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply > '(4 3 1 2))))))(display "test ")
(display '((apply >= '(3 3 3))))
(display ", expects ")
(display '#t)
(set! *test-ret* (apply >= '(3 3 3)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply >= '(3 3 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply >= '(3 3 3))))))(display "test ")
(display '((apply >= '(4 3 3))))
(display ", expects ")
(display '#t)
(set! *test-ret* (apply >= '(4 3 3)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply >= '(4 3 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply >= '(4 3 3))))))(display "test ")
(display '((apply >= '(4 3))))
(display ", expects ")
(display '#t)
(set! *test-ret* (apply >= '(4 3)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply >= '(4 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply >= '(4 3))))))(display "test ")
(display '((apply < '(1 2))))
(display ", expects ")
(display '#t)
(set! *test-ret* (apply < '(1 2)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply < '(1 2)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply < '(1 2))))))(display "test ")
(display '((apply < '(1 2 3))))
(display ", expects ")
(display '#t)
(set! *test-ret* (apply < '(1 2 3)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply < '(1 2 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply < '(1 2 3))))))(display "test ")
(display '((apply < '(1 5 3))))
(display ", expects ")
(display '#f)
(set! *test-ret* (apply < '(1 5 3)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply < '(1 5 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply < '(1 5 3))))))(display "test ")
(display '((apply <= '(1 2))))
(display ", expects ")
(display '#t)
(set! *test-ret* (apply <= '(1 2)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply <= '(1 2)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply <= '(1 2))))))(display "test ")
(display '((apply <= '(1 2 3))))
(display ", expects ")
(display '#t)
(set! *test-ret* (apply <= '(1 2 3)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply <= '(1 2 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply <= '(1 2 3))))))(display "test ")
(display '((apply <= '(1 3 3))))
(display ", expects ")
(display '#t)
(set! *test-ret* (apply <= '(1 3 3)))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply <= '(1 3 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply <= '(1 3 3))))))(display "test ")
(display '((apply <= '(1 5 3))))
(display ", expects ")
(display '#f)
(set! *test-ret* (apply <= '(1 5 3)))(if (equal? *test-ret* '#f) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply <= '(1 5 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply <= '(1 5 3))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (+ 1 2 'a)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (+ 1 2 'a))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (+ 1 2 'a))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (+ 1 2 'a)))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (/ 1 0)))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (/ 1 0))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (/ 1 0))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (/ 1 0)))))))(display "test ")
(display '((apply + '(4))))
(display ", expects ")
(display '4)
(set! *test-ret* (apply + '(4)))(if (equal? *test-ret* '4) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply + '(4)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply + '(4))))))(display "test ")
(display '((apply + '(4 3))))
(display ", expects ")
(display '7)
(set! *test-ret* (apply + '(4 3)))(if (equal? *test-ret* '7) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply + '(4 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply + '(4 3))))))(display "test ")
(display '((apply + '(4 3 10))))
(display ", expects ")
(display '17)
(set! *test-ret* (apply + '(4 3 10)))(if (equal? *test-ret* '17) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply + '(4 3 10)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply + '(4 3 10))))))(display "test ")
(display '((apply + '(1 1 1 1))))
(display ", expects ")
(display '4)
(set! *test-ret* (apply + '(1 1 1 1)))(if (equal? *test-ret* '4) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply + '(1 1 1 1)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply + '(1 1 1 1))))))(display "test ")
(display '((apply - '(10 5))))
(display ", expects ")
(display '5)
(set! *test-ret* (apply - '(10 5)))(if (equal? *test-ret* '5) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply - '(10 5)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply - '(10 5))))))(display "test ")
(display '((apply - '(10 5 2))))
(display ", expects ")
(display '3)
(set! *test-ret* (apply - '(10 5 2)))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply - '(10 5 2)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply - '(10 5 2))))))(display "test ")
(display '((apply * '(2 3))))
(display ", expects ")
(display '6)
(set! *test-ret* (apply * '(2 3)))(if (equal? *test-ret* '6) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply * '(2 3)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply * '(2 3))))))(display "test ")
(display '((apply * '(2 3 4))))
(display ", expects ")
(display '24)
(set! *test-ret* (apply * '(2 3 4)))(if (equal? *test-ret* '24) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply * '(2 3 4)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply * '(2 3 4))))))(display "test ")
(display '((apply / '(6 2))))
(display ", expects ")
(display '3)
(set! *test-ret* (apply / '(6 2)))(if (equal? *test-ret* '3) (display " ===> ok\n") (begin (set! *test-error* (cons '(apply / '(6 2)) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((apply / '(6 2))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (apply / '(6 0))))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (apply / '(6 0)))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (apply / '(6 0)))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (apply / '(6 0))))))))(display "test ")
(display '((let* ((e (make-enumeration '(red green blue))) (i (enum-set-indexer e))) (list (i 'red) (i 'green) (i 'blue) (i 'yellow)))))
(display ", expects ")
(display '(0 1 2 #f))
(set! *test-ret* (let* ((e (make-enumeration '(red green blue))) (i (enum-set-indexer e))) (list (i 'red) (i 'green) (i 'blue) (i 'yellow))))(if (equal? *test-ret* '(0 1 2 #f)) (display " ===> ok\n") (begin (set! *test-error* (cons '(let* ((e (make-enumeration '(red green blue))) (i (enum-set-indexer e))) (list (i 'red) (i 'green) (i 'blue) (i 'yellow))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let* ((e (make-enumeration '(red green blue))) (i (enum-set-indexer e))) (list (i 'red) (i 'green) (i 'blue) (i 'yellow)))))))(display "test ")
(display '((enum-set->list (make-enumeration '(red green blue)))))
(display ", expects ")
(display '(red green blue))
(set! *test-ret* (enum-set->list (make-enumeration '(red green blue))))(if (equal? *test-ret* '(red green blue)) (display " ===> ok\n") (begin (set! *test-error* (cons '(enum-set->list (make-enumeration '(red green blue))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((enum-set->list (make-enumeration '(red green blue)))))))(display "test ")
(display '((let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (enum-set->list (c '(blue red))))))
(display ", expects ")
(display '(red blue))
(set! *test-ret* (let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (enum-set->list (c '(blue red)))))(if (equal? *test-ret* '(red blue)) (display " ===> ok\n") (begin (set! *test-error* (cons '(let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (enum-set->list (c '(blue red)))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (enum-set->list (c '(blue red))))))))(display "test ")
(display '((let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (list (enum-set-member? 'blue (c '(red blue))) (enum-set-member? 'green (c '(red blue))) (enum-set-subset? (c '(red blue)) e) (enum-set-subset? (c '(red blue)) (c '(blue red))) (enum-set-subset? (c '(red blue)) (c '(red))) (enum-set=? (c '(red blue)) (c '(blue red)))))))
(display ", expects ")
(display '(#t #f #t #t #f #t))
(set! *test-ret* (let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (list (enum-set-member? 'blue (c '(red blue))) (enum-set-member? 'green (c '(red blue))) (enum-set-subset? (c '(red blue)) e) (enum-set-subset? (c '(red blue)) (c '(blue red))) (enum-set-subset? (c '(red blue)) (c '(red))) (enum-set=? (c '(red blue)) (c '(blue red))))))(if (equal? *test-ret* '(#t #f #t #t #f #t)) (display " ===> ok\n") (begin (set! *test-error* (cons '(let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (list (enum-set-member? 'blue (c '(red blue))) (enum-set-member? 'green (c '(red blue))) (enum-set-subset? (c '(red blue)) e) (enum-set-subset? (c '(red blue)) (c '(blue red))) (enum-set-subset? (c '(red blue)) (c '(red))) (enum-set=? (c '(red blue)) (c '(blue red))))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (list (enum-set-member? 'blue (c '(red blue))) (enum-set-member? 'green (c '(red blue))) (enum-set-subset? (c '(red blue)) e) (enum-set-subset? (c '(red blue)) (c '(blue red))) (enum-set-subset? (c '(red blue)) (c '(red))) (enum-set=? (c '(red blue)) (c '(blue red)))))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (guard (c (#t 'error)) (let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (c '(pink))))))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (guard (c (#t 'error)) (let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (c '(pink)))))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (guard (c (#t 'error)) (let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (c '(pink)))))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (guard (c (#t 'error)) (let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (c '(pink))))))))))(display "test ")
(display '((let* ((e (make-enumeration '(red green blue))) (r ((enum-set-constructor e) '(red)))) (list (enum-set->list (enum-set-universe e)) (enum-set->list (enum-set-universe r)) ((enum-set-indexer ((enum-set-constructor e) '(red))) 'green) (enum-set-member? 'red e) (enum-set-member? 'black e) (enum-set-subset? e e) (enum-set-subset? r e) (enum-set-subset? e r) (enum-set-subset? e (make-enumeration '(blue green red))) (enum-set-subset? e (make-enumeration '(blue green red black))) (enum-set-subset? (make-enumeration '(blue green red black)) e) (enum-set-subset? ((enum-set-constructor (make-enumeration '(blue green red black))) '(red)) e) (enum-set-subset? ((enum-set-constructor (make-enumeration '(green red))) '(red)) e) (enum-set=? e e) (enum-set=? r e) (enum-set=? e r) (enum-set=? e (make-enumeration '(blue green red)))))))
(display ", expects ")
(display '((red green blue) (red green blue) 1 #t #f #t #t #f #t #t #f #f #t #t #f #f #t))
(set! *test-ret* (let* ((e (make-enumeration '(red green blue))) (r ((enum-set-constructor e) '(red)))) (list (enum-set->list (enum-set-universe e)) (enum-set->list (enum-set-universe r)) ((enum-set-indexer ((enum-set-constructor e) '(red))) 'green) (enum-set-member? 'red e) (enum-set-member? 'black e) (enum-set-subset? e e) (enum-set-subset? r e) (enum-set-subset? e r) (enum-set-subset? e (make-enumeration '(blue green red))) (enum-set-subset? e (make-enumeration '(blue green red black))) (enum-set-subset? (make-enumeration '(blue green red black)) e) (enum-set-subset? ((enum-set-constructor (make-enumeration '(blue green red black))) '(red)) e) (enum-set-subset? ((enum-set-constructor (make-enumeration '(green red))) '(red)) e) (enum-set=? e e) (enum-set=? r e) (enum-set=? e r) (enum-set=? e (make-enumeration '(blue green red))))))(if (equal? *test-ret* '((red green blue) (red green blue) 1 #t #f #t #t #f #t #t #f #f #t #t #f #f #t)) (display " ===> ok\n") (begin (set! *test-error* (cons '(let* ((e (make-enumeration '(red green blue))) (r ((enum-set-constructor e) '(red)))) (list (enum-set->list (enum-set-universe e)) (enum-set->list (enum-set-universe r)) ((enum-set-indexer ((enum-set-constructor e) '(red))) 'green) (enum-set-member? 'red e) (enum-set-member? 'black e) (enum-set-subset? e e) (enum-set-subset? r e) (enum-set-subset? e r) (enum-set-subset? e (make-enumeration '(blue green red))) (enum-set-subset? e (make-enumeration '(blue green red black))) (enum-set-subset? (make-enumeration '(blue green red black)) e) (enum-set-subset? ((enum-set-constructor (make-enumeration '(blue green red black))) '(red)) e) (enum-set-subset? ((enum-set-constructor (make-enumeration '(green red))) '(red)) e) (enum-set=? e e) (enum-set=? r e) (enum-set=? e r) (enum-set=? e (make-enumeration '(blue green red))))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let* ((e (make-enumeration '(red green blue))) (r ((enum-set-constructor e) '(red)))) (list (enum-set->list (enum-set-universe e)) (enum-set->list (enum-set-universe r)) ((enum-set-indexer ((enum-set-constructor e) '(red))) 'green) (enum-set-member? 'red e) (enum-set-member? 'black e) (enum-set-subset? e e) (enum-set-subset? r e) (enum-set-subset? e r) (enum-set-subset? e (make-enumeration '(blue green red))) (enum-set-subset? e (make-enumeration '(blue green red black))) (enum-set-subset? (make-enumeration '(blue green red black)) e) (enum-set-subset? ((enum-set-constructor (make-enumeration '(blue green red black))) '(red)) e) (enum-set-subset? ((enum-set-constructor (make-enumeration '(green red))) '(red)) e) (enum-set=? e e) (enum-set=? r e) (enum-set=? e r) (enum-set=? e (make-enumeration '(blue green red)))))))))(display "test ")
(display '((let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (list (enum-set-member? 'blue (c '(red blue))) (enum-set-member? 'green (c '(red blue))) (enum-set-subset? (c '(red blue)) e) (enum-set-subset? (c '(red blue)) (c '(blue red))) (enum-set-subset? (c '(red blue)) (c '(red))) (enum-set=? (c '(red blue)) (c '(blue red)))))))
(display ", expects ")
(display '(#t #f #t #t #f #t))
(set! *test-ret* (let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (list (enum-set-member? 'blue (c '(red blue))) (enum-set-member? 'green (c '(red blue))) (enum-set-subset? (c '(red blue)) e) (enum-set-subset? (c '(red blue)) (c '(blue red))) (enum-set-subset? (c '(red blue)) (c '(red))) (enum-set=? (c '(red blue)) (c '(blue red))))))(if (equal? *test-ret* '(#t #f #t #t #f #t)) (display " ===> ok\n") (begin (set! *test-error* (cons '(let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (list (enum-set-member? 'blue (c '(red blue))) (enum-set-member? 'green (c '(red blue))) (enum-set-subset? (c '(red blue)) e) (enum-set-subset? (c '(red blue)) (c '(blue red))) (enum-set-subset? (c '(red blue)) (c '(red))) (enum-set=? (c '(red blue)) (c '(blue red))))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (list (enum-set-member? 'blue (c '(red blue))) (enum-set-member? 'green (c '(red blue))) (enum-set-subset? (c '(red blue)) e) (enum-set-subset? (c '(red blue)) (c '(blue red))) (enum-set-subset? (c '(red blue)) (c '(red))) (enum-set=? (c '(red blue)) (c '(blue red)))))))))(display "test ")
(display '((let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (enum-set->list (c '(blue red))))))
(display ", expects ")
(display '(red blue))
(set! *test-ret* (let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (enum-set->list (c '(blue red)))))(if (equal? *test-ret* '(red blue)) (display " ===> ok\n") (begin (set! *test-error* (cons '(let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (enum-set->list (c '(blue red)))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (enum-set->list (c '(blue red))))))))(display "test ")
(display '((let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (list (enum-set->list (enum-set-union (c '(blue)) (c '(red)))) (enum-set->list (enum-set-intersection (c '(red green)) (c '(red blue)))) (enum-set->list (enum-set-difference (c '(red green)) (c '(red blue))))))))
(display ", expects ")
(display '((red blue) (red) (green)))
(set! *test-ret* (let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (list (enum-set->list (enum-set-union (c '(blue)) (c '(red)))) (enum-set->list (enum-set-intersection (c '(red green)) (c '(red blue)))) (enum-set->list (enum-set-difference (c '(red green)) (c '(red blue)))))))(if (equal? *test-ret* '((red blue) (red) (green))) (display " ===> ok\n") (begin (set! *test-error* (cons '(let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (list (enum-set->list (enum-set-union (c '(blue)) (c '(red)))) (enum-set->list (enum-set-intersection (c '(red green)) (c '(red blue)))) (enum-set->list (enum-set-difference (c '(red green)) (c '(red blue)))))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (list (enum-set->list (enum-set-union (c '(blue)) (c '(red)))) (enum-set->list (enum-set-intersection (c '(red green)) (c '(red blue)))) (enum-set->list (enum-set-difference (c '(red green)) (c '(red blue))))))))))(display "test ")
(display '((let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (enum-set->list (enum-set-complement (c '(red)))))))
(display ", expects ")
(display '(green blue))
(set! *test-ret* (let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (enum-set->list (enum-set-complement (c '(red))))))(if (equal? *test-ret* '(green blue)) (display " ===> ok\n") (begin (set! *test-error* (cons '(let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (enum-set->list (enum-set-complement (c '(red))))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let* ((e (make-enumeration '(red green blue))) (c (enum-set-constructor e))) (enum-set->list (enum-set-complement (c '(red)))))))))(display "test ")
(display '((let ((e1 (make-enumeration '(red green blue black))) (e2 (make-enumeration '(red black white)))) (enum-set->list (enum-set-projection e1 e2)))))
(display ", expects ")
(display '(red black))
(set! *test-ret* (let ((e1 (make-enumeration '(red green blue black))) (e2 (make-enumeration '(red black white)))) (enum-set->list (enum-set-projection e1 e2))))(if (equal? *test-ret* '(red black)) (display " ===> ok\n") (begin (set! *test-error* (cons '(let ((e1 (make-enumeration '(red green blue black))) (e2 (make-enumeration '(red black white)))) (enum-set->list (enum-set-projection e1 e2))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((let ((e1 (make-enumeration '(red green blue black))) (e2 (make-enumeration '(red black white)))) (enum-set->list (enum-set-projection e1 e2)))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (call-with-string-input-port "(" (lambda (in) (read in)))))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (call-with-string-input-port "(" (lambda (in) (read in))))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (call-with-string-input-port "(" (lambda (in) (read in))))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (call-with-string-input-port "(" (lambda (in) (read in)))))))))(display "test ")
(display '((equal? 'error (guard (con (#t 'error)) (call-with-string-input-port "(" (lambda (in) (apply read (list in))))))))
(display ", expects ")
(display '#t)
(set! *test-ret* (equal? 'error (guard (con (#t 'error)) (call-with-string-input-port "(" (lambda (in) (apply read (list in)))))))(if (equal? *test-ret* '#t) (display " ===> ok\n") (begin (set! *test-error* (cons '(equal? 'error (guard (con (#t 'error)) (call-with-string-input-port "(" (lambda (in) (apply read (list in)))))) *test-error*)) (display " ===> NG got ") (write *test-ret*) (display "\n") (error "test" "test failed" '((equal? 'error (guard (con (#t 'error)) (call-with-string-input-port "(" (lambda (in) (apply read (list in))))))))))(if (null? *test-error*)
(display "passed.
")
(display *test-error*))
