Reorganize code

This commit is contained in:
Justin Ethier 2021-07-26 19:18:31 -07:00
parent 176e674026
commit 362317108d

View file

@ -30,6 +30,20 @@
(test '() (make-list -2))
)
(test-group
"I/O"
(define p (open-input-string "one\ntwo\n"))
(test #\o (read-char p))
(test "ne" (read-line p))
(test "two" (read-line p))
(test (eof-object) (read-line p))
(define p (open-input-string "one\ntwo\n"))
(test "one" (read-line p))
(test #\t (read-char p))
(test #\w (read-char p))
(test "o" (read-line p))
)
(test-group
"rationals"
(test 3.0 (numerator (/ 6 4)))
@ -51,19 +65,5 @@
(test 'test-field (get-test e))
)
(test-group
"I/O"
(define p (open-input-string "one\ntwo\n"))
(test #\o (read-char p))
(test "ne" (read-line p))
(test "two" (read-line p))
(test (eof-object) (read-line p))
(define p (open-input-string "one\ntwo\n"))
(test "one" (read-line p))
(test #\t (read-char p))
(test #\w (read-char p))
(test "o" (read-line p))
)
(test-exit)