forgot to wrap inline cond-expand defs in begin

This commit is contained in:
Alex Shinn 2020-09-01 22:27:59 +09:00
parent e7e034dea0
commit e5cf364360
2 changed files with 43 additions and 38 deletions

View file

@ -7,6 +7,7 @@
(else (else
;; inline (chibi test) to avoid circular dependencies in snow ;; inline (chibi test) to avoid circular dependencies in snow
;; installations ;; installations
(begin
(define-syntax test (define-syntax test
(syntax-rules () (syntax-rules ()
((test expect expr) ((test expect expr)
@ -23,7 +24,7 @@
(define (test-begin name) (define (test-begin name)
(display name)) (display name))
(define (test-end) (define (test-end)
(newline)))) (newline)))))
(begin (begin
(define (run-tests) (define (run-tests)
(test-begin "diff") (test-begin "diff")

View file

@ -6,6 +6,7 @@
(else (else
;; inline (chibi test) to avoid circular dependencies in snow ;; inline (chibi test) to avoid circular dependencies in snow
;; installations ;; installations
(begin
(define-syntax test (define-syntax test
(syntax-rules () (syntax-rules ()
((test expect expr) ((test expect expr)
@ -19,6 +20,9 @@
(cond (cond
((not pass?) ((not pass?)
(display "\nFAIL: ") (write name) (newline)))))))) (display "\nFAIL: ") (write name) (newline))))))))
(define-syntax test-assert
(syntax-rules ()
((test-assert expr) (test #t expr))))
(define-syntax test-error (define-syntax test-error
(syntax-rules () (syntax-rules ()
((test-error expr) ((test-error expr)
@ -26,7 +30,7 @@
(define (test-begin name) (define (test-begin name)
(display name)) (display name))
(define (test-end) (define (test-end)
(newline)))) (newline)))))
(export run-tests) (export run-tests)
(begin (begin
(define (run-tests) (define (run-tests)