From 01061efc5acc1371d747254091e81a4b66dca959 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Sun, 27 Jul 2014 12:46:10 +0900 Subject: [PATCH] move test-numeric-syntax to r7rs-tests.scm. test-numeric-syntax is a test runner specific to r7rs-tests.scm. It should not be placed in generic test library. --- piclib/picrin/test.scm | 13 ++----------- t/r7rs-tests.scm | 9 +++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/piclib/picrin/test.scm b/piclib/picrin/test.scm index cb051a05..350c76e9 100644 --- a/piclib/picrin/test.scm +++ b/piclib/picrin/test.scm @@ -83,19 +83,10 @@ (syntax-rules () ((_) (syntax-error "invalid use of test-syntax-error")))) - (define-syntax test-numeric-syntax - (syntax-rules () - ((test-numeric-syntax str expect strs ...) - (let* ((z (read (open-input-string str))) - (out (open-output-string)) - (z-str (begin (write z out) (get-output-string out)))) - (test expect (values z)) - (test #t (and (member z-str '(str strs ...)) #t)))))) - ;; (define (test-read-error str) ;; (test-assert ;; (guard (exn (else #t)) ;; (read (open-input-string str)) ;; #f))) - (export test test-begin test-end test-values test-exit test-syntax-error test-numeric-syntax) - ) + + (export test test-begin test-end test-values test-exit test-syntax-error)) diff --git a/t/r7rs-tests.scm b/t/r7rs-tests.scm index 9b3ce733..7e669de7 100644 --- a/t/r7rs-tests.scm +++ b/t/r7rs-tests.scm @@ -2068,6 +2068,15 @@ (test-begin "Numeric syntax") +(define-syntax test-numeric-syntax + (syntax-rules () + ((test-numeric-syntax str expect strs ...) + (let* ((z (read (open-input-string str))) + (out (open-output-string)) + (z-str (begin (write z out) (get-output-string out)))) + (test expect (values z)) + (test #t (and (member z-str '(str strs ...)) #t)))))) + ;; Simple (test-numeric-syntax "1" 1) ;; (test-numeric-syntax "+1" 1 "1")