Skip to content
Snippets Groups Projects
Commit f49eaf5f authored by pfdietz's avatar pfdietz
Browse files

Begin adding tests for concatenated streams, update issues and todos.

parent 2255509d
Branches
Tags
No related merge requests found
...@@ -19,3 +19,11 @@ during the construction of the tests. ...@@ -19,3 +19,11 @@ during the construction of the tests.
it work on arbitrary typespecs, including SATISFIES, which is not it work on arbitrary typespecs, including SATISFIES, which is not
possible. possible.
7. Was it intended that values of 'smaller' float types be coercible
to values of larger float types? In CLISP, short-float has a larger
range of exponents than single-float, so some shorts cannot be coerced
to singles without over/underflow.
8. IMAGPART is defined as returning (* 0 number) on reals. If the
implementation supports negative zero and number is a negative float, this
will be -0.0 (of the appropriate type). Was this intended?
...@@ -22,4 +22,4 @@ Things to do to the test suite (not a complete list) ...@@ -22,4 +22,4 @@ Things to do to the test suite (not a complete list)
10. Two-arg tests of FILE-POSITION on binary streams. 10. Two-arg tests of FILE-POSITION on binary streams.
11. Address issues with broadcast streams (C. Rhodes) -- apparent 11. Address issues with broadcast streams (C. Rhodes) -- apparent
contradictions in the spec contradictions in the spec.
\ No newline at end of file
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Sat Feb 14 08:43:45 2004
;;;; Contains: Tests of CONCATENATED-STREAM-STREAMS
(in-package :cl-test)
(deftest concatenated-stream-streams.1
(concatenated-stream-streams (make-concatenated-stream))
nil)
(deftest concatenated-stream-streams.2
(equalt (list (list *standard-input*))
(multiple-value-list
(concatenated-stream-streams
(make-concatenated-stream *standard-input*))))
t)
(deftest concatenated-stream-streams.3
(with-input-from-string
(s1 "abc")
(with-input-from-string
(s2 "def")
(let ((s (make-concatenated-stream s1 s2)))
(equalt (list (list s1 s2))
(multiple-value-list
(concatenated-stream-streams s))))))
t)
(deftest concatenated-stream-streams.4
(with-input-from-string
(s1 "")
(with-input-from-string
(s2 "def")
(let ((s (make-concatenated-stream s1 s2)))
(equalt (list (list s1 s2))
(multiple-value-list
(concatenated-stream-streams s))))))
t)
(deftest concatenated-stream-streams.5
(with-input-from-string
(s1 "")
(with-input-from-string
(s2 "def")
(let ((s (make-concatenated-stream s1 s2)))
(values
(read-char s)
(equalt (list (list s2))
(multiple-value-list
(concatenated-stream-streams s)))))))
#\d t)
;;; Error cases
(deftest concatenated-stream-streams.error.1
(signals-error (concatenated-stream-streams) program-error)
t)
(deftest concatenated-stream-streams.error.2
(signals-error (concatenated-stream-streams
(make-concatenated-stream)
nil)
program-error)
t)
...@@ -45,3 +45,5 @@ ...@@ -45,3 +45,5 @@
(load "echo-stream-input-stream.lsp") (load "echo-stream-input-stream.lsp")
(load "echo-stream-output-stream.lsp") (load "echo-stream-output-stream.lsp")
(load "make-echo-stream.lsp") (load "make-echo-stream.lsp")
(load "concatenated-stream-streams.lsp")
(load "make-concatenated-stream.lsp")
\ No newline at end of file
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Sat Feb 14 08:41:18 2004
;;;; Contains: Tests of MAKE-CONCATENATED-STREAM
(in-package :cl-test)
(deftest make-concatenated-stream.1
(let ((s (make-concatenated-stream)))
(read s nil :eof))
:eof)
(deftest make-concatenated-stream.2
(let ((s (make-concatenated-stream)))
(notnot-mv (input-stream-p s)))
t)
(deftest make-concatenated-stream.3
(let ((s (make-concatenated-stream)))
(output-stream-p s))
nil)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment