diff options
author | Boutade <thegoofist@protonmail.com> | 2019-05-01 11:03:17 -0500 |
---|---|---|
committer | Boutade <thegoofist@protonmail.com> | 2019-05-01 11:03:17 -0500 |
commit | c591dafbe1d3378784a0dc3d06358183250b9314 (patch) | |
tree | dc8f1c071d847ead69a3f414a7d6ad7d1ab96180 /tests.lisp | |
parent | 97fd7b67522abd6370f92ff0b401b75e5dbec322 (diff) |
temporarily refactored to use static-text-replay-streams
Diffstat (limited to 'tests.lisp')
-rw-r--r-- | tests.lisp | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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)))))) |