From 362317108df9bf90a6425c7976f3ca561d33eeaf Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Mon, 26 Jul 2021 19:18:31 -0700 Subject: [PATCH] Reorganize code --- tests/base.scm | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/base.scm b/tests/base.scm index a26065f8..9a9dabd1 100644 --- a/tests/base.scm +++ b/tests/base.scm @@ -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)