moving to a new numeric reading algorithm.

added:
  src/tests/reader.ss
This commit is contained in:
Abdulaziz Ghuloum
2007-05-20 13:11:33 -04:00
parent 3c520ea9d3
commit aa98df6c4c
7 changed files with 204 additions and 33 deletions
+19
View File
@@ -0,0 +1,19 @@
(library (tests reader)
(export test-reader)
(import (ikarus) (tests framework))
(define t
(lambda (str)
(lambda (n?)
(and (number? n?)
(= (with-input-from-string str read) n?)))))
(define-syntax reader-tests
(syntax-rules ()
[(_ name str* ...)
(define-tests name
[(t str*) (string->number str*)] ...)]))
(reader-tests test-reader
"12"))