summaryrefslogtreecommitdiff
path: root/tests.lisp
diff options
context:
space:
mode:
authorBoutade <thegoofist@protonmail.com>2019-05-01 11:03:17 -0500
committerBoutade <thegoofist@protonmail.com>2019-05-01 11:03:17 -0500
commitc591dafbe1d3378784a0dc3d06358183250b9314 (patch)
treedc8f1c071d847ead69a3f414a7d6ad7d1ab96180 /tests.lisp
parent97fd7b67522abd6370f92ff0b401b75e5dbec322 (diff)
temporarily refactored to use static-text-replay-streams
Diffstat (limited to 'tests.lisp')
-rw-r--r--tests.lisp4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests.lisp b/tests.lisp
index a4561b9..9a1aecf 100644
--- a/tests.lisp
+++ b/tests.lisp
@@ -8,7 +8,7 @@
(defmacro test-with ((var input-string) &rest tests)
`(subtest (format nil "With the input ~s ..." ,input-string)
- (let ((,var (make-string-input-stream ,input-string)))
+ (let ((,var (make-instance 'replay-streams:static-text-replay-stream :text ,input-string)))
,@tests)))
(defmacro results (stream expr val)
@@ -16,7 +16,6 @@
(ok? (gensym))
(stream2 (gensym)))
`(multiple-value-bind (,res ,ok? ,stream2) (parse ,stream ,expr)
- (setf ,stream ,stream2) ; is this doing what I want?
(is (and ,ok? ,res) ,val (format nil "Parsing with ~s results in ~s" ',expr ',val)))))
(defmacro fails (stream expr)
@@ -24,7 +23,6 @@
(ok? (gensym))
(stream2 (gensym)))
`(multiple-value-bind (,res ,ok? ,stream2) (parse ,stream ,expr)
- (setf ,stream ,stream2) ; Not sure about this...
(unless ,res ; doing this to get rid of warning about unused variable
(is ,ok? nil (format nil "Parsing with ~s should fail." ',expr))))))