source: trunk/source/tests/ansi-tests/write-to-string.lsp @ 8991

Last change on this file since 8991 was 8991, checked in by gz, 12 years ago

Check in the gcl ansi test suite (original, in preparation for making local changes)

File size: 958 bytes
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Sun Jul 25 12:53:11 2004
4;;;; Contains: Tests of WRITE-TO-STRING
5
6(in-package :cl-test)
7
8(compile-and-load "printer-aux.lsp")
9
10;;; This function is extensively used elsewhere
11
12(deftest write-to-string.1
13  (random-write-to-string-test 1000)
14  nil)
15
16(deftest write-to-string.2
17  (with-standard-io-syntax
18   (write-to-string 2 :allow-other-keys nil))
19  "2")
20
21(deftest write-to-string.3
22  (with-standard-io-syntax
23   (write-to-string 3 :allow-other-keys t '#.(gensym) 0))
24  "3")
25
26(deftest write-to-string.4
27  (with-standard-io-syntax
28   (write-to-string 4 :base 10 :base 2))
29  "4")
30
31;;; Error tests
32
33(deftest write-to-string.error.1
34  (signals-error (write-to-string) program-error)
35  t)
36
37(deftest write-to-string.error.2
38  (signals-error (write-to-string nil '#.(gensym) nil) program-error)
39  t)
40
41(deftest write-to-string.error.3
42  (signals-error (write-to-string nil :radix) program-error)
43  t)
Note: See TracBrowser for help on using the repository browser.