Commit 5d4bb7d4 authored by pfdietz's avatar pfdietz

Tests for two-way-stream accessor functions.

parent b649f246
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Thu Feb 12 04:22:50 2004
;;;; Contains: Tests of TWO-WAY-STREAM-INPUT-STREAM
(in-package :cl-test)
(deftest two-way-stream-input-stream.1
(let* ((is (make-string-input-stream "foo"))
(os (make-string-output-stream))
(s (make-two-way-stream is os)))
(equalt (multiple-value-list (two-way-stream-input-stream s))
(list is)))
t)
(deftest two-way-stream-input-stream.error.1
(signals-error (two-way-stream-input-stream) program-error)
t)
(deftest two-way-stream-input-stream.error.2
(signals-error (let* ((is (make-string-input-stream "foo"))
(os (make-string-output-stream))
(s (make-two-way-stream is os)))
(two-way-stream-input-stream s nil))
program-error)
t)
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Thu Feb 12 04:25:59 2004
;;;; Contains: Tests off TWO-WAY-STREAM-OUTPUT-STREAM
(in-package :cl-test)
(deftest two-way-stream-output-stream.1
(let* ((is (make-string-input-stream "foo"))
(os (make-string-output-stream))
(s (make-two-way-stream is os)))
(equalt (multiple-value-list (two-way-stream-output-stream s))
(list os)))
t)
(deftest two-way-stream-output-stream.error.1
(signals-error (two-way-stream-output-stream) program-error)
t)
(deftest two-way-stream-output-stream.error.2
(signals-error (let* ((is (make-string-input-stream "foo"))
(os (make-string-output-stream))
(s (make-two-way-stream is os)))
(two-way-stream-output-stream s nil))
program-error)
t)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment