Commit eb9f2878 authored by pfdietz's avatar pfdietz
Browse files

Added :notes for :nil-vectors-are-strings tests.

parent 5fd2ffcb
...@@ -185,10 +185,12 @@ ...@@ -185,10 +185,12 @@
nil) nil)
(deftest concatenate.31 (deftest concatenate.31
:notes (:nil-vectors-are-strings)
(concatenate 'string "abc" (make-array '(0) :element-type nil) "def") (concatenate 'string "abc" (make-array '(0) :element-type nil) "def")
"abcdef") "abcdef")
(deftest concatenate.32 (deftest concatenate.32
:notes (:nil-vectors-are-strings)
(concatenate '(array nil (*))) (concatenate '(array nil (*)))
"") "")
......
...@@ -155,6 +155,7 @@ ...@@ -155,6 +155,7 @@
t) t)
(deftest copy-seq.19 (deftest copy-seq.19
:notes (:nil-vectors-are-strings)
(copy-seq (make-array '(0) :element-type nil)) (copy-seq (make-array '(0) :element-type nil))
"") "")
......
...@@ -62,12 +62,14 @@ ...@@ -62,12 +62,14 @@
nil) nil)
(deftest equal.13 (deftest equal.13
:notes (:nil-vectors-are-strings)
(let ((x (make-array '(0) :element-type nil)) (let ((x (make-array '(0) :element-type nil))
(y (make-array '(0) :element-type nil))) (y (make-array '(0) :element-type nil)))
(equalt x y)) (equalt x y))
t) t)
(deftest equal.14 (deftest equal.14
:notes (:nil-vectors-are-strings)
(and (and
(equalt (make-array '(0) :element-type nil) "") (equalt (make-array '(0) :element-type nil) "")
(equalt "" (make-array '(0) :element-type nil))) (equalt "" (make-array '(0) :element-type nil)))
......
...@@ -28,10 +28,12 @@ ...@@ -28,10 +28,12 @@
nil) nil)
(deftest equalp.5 (deftest equalp.5
:notes (:allow-nil-arrays)
(equalpt (make-array '(0) :element-type nil) #()) (equalpt (make-array '(0) :element-type nil) #())
t) t)
(deftest equalp.6 (deftest equalp.6
:notes (:allow-nil-arrays)
(equalpt (make-array '(0) :element-type nil) "") (equalpt (make-array '(0) :element-type nil) "")
t) t)
......
...@@ -14,3 +14,5 @@ ...@@ -14,3 +14,5 @@
;;; (load "ansi-aux.o") ;;; (load "ansi-aux.o")
(load "cl-symbol-names.lsp") (load "cl-symbol-names.lsp")
(load "notes.lsp")
...@@ -77,6 +77,7 @@ ...@@ -77,6 +77,7 @@
t) t)
(deftest make-string.10 (deftest make-string.10
:notes (:nil-vectors-are-strings)
(let ((s (make-string 0 :element-type nil))) (let ((s (make-string 0 :element-type nil)))
(values (values
(notnot (stringp s)) (notnot (stringp s))
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
"") "")
(deftest make-symbol.11 (deftest make-symbol.11
:notes (:nil-vectors-are-strings)
(symbol-name (make-symbol (make-array '(0) :element-type nil))) (symbol-name (make-symbol (make-array '(0) :element-type nil)))
"") "")
......
...@@ -8,5 +8,10 @@ ...@@ -8,5 +8,10 @@
(defnote :allow-nil-arrays (defnote :allow-nil-arrays
"Allow specialized arrays of type (array nil).") "Allow specialized arrays of type (array nil).")
(defnote :allow-nonzero-nil-arrays (defnote :allow-nonzero-nil-vectors
"Allow specialized arrays of type (array nil <dims>) of nonzero size.") "Allow specialized vectors of type (vector nil) of nonzero size.")
(defnote :nil-vectors-are-strings
"Assume that (VECTOR NIL) objects are strings.")
...@@ -65,6 +65,7 @@ ...@@ -65,6 +65,7 @@
"") "")
(deftest nstring-capitalize.12 (deftest nstring-capitalize.12
:notes (:nil-vectors-are-strings)
(nstring-capitalize (make-array '(0) :element-type nil)) (nstring-capitalize (make-array '(0) :element-type nil))
"") "")
......
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
("abcde" "abcdE"))) ("abcde" "abcdE")))
(deftest nstring-downcase.11 (deftest nstring-downcase.11
:notes (:nil-vectors-are-strings)
(nstring-downcase (make-array '(0) :element-type nil)) (nstring-downcase (make-array '(0) :element-type nil))
"") "")
......
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
("abcde" "abcdE"))) ("abcde" "abcdE")))
(deftest nstring-upcase.11 (deftest nstring-upcase.11
:notes (:nil-vectors-are-strings)
(nstring-upcase (make-array '(0) :element-type nil)) (nstring-upcase (make-array '(0) :element-type nil))
"") "")
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
t) t)
(deftest intern.3 (deftest intern.3
:notes (:nil-vectors-are-strings)
(let ((cl-user-package (find-package "CL-USER"))) (let ((cl-user-package (find-package "CL-USER")))
(eqt (intern "" cl-user-package) (eqt (intern "" cl-user-package)
(intern (make-array 0 :element-type nil) cl-user-package))) (intern (make-array 0 :element-type nil) cl-user-package)))
......
...@@ -357,7 +357,7 @@ ...@@ -357,7 +357,7 @@
(let ((note (make-note :name ',name (let ((note (make-note :name ',name
:contents ',contents :contents ',contents
:disabled ',disabled))) :disabled ',disabled)))
(setf (gethash *notes* (note-name note)) note) (setf (gethash (note-name note) *notes*) note)
note))) note)))
(defun disable-note (n) (defun disable-note (n)
......
...@@ -85,6 +85,7 @@ ...@@ -85,6 +85,7 @@
"ABCDEF") "ABCDEF")
(deftest string-capitalize.11 (deftest string-capitalize.11
:notes (:nil-vectors-are-strings)
(string-capitalize (make-array '(0) :element-type nil)) (string-capitalize (make-array '(0) :element-type nil))
"") "")
......
...@@ -506,6 +506,7 @@ ...@@ -506,6 +506,7 @@
;;; Tests on nil arrays ;;; Tests on nil arrays
(deftest string=.nil-array.1 (deftest string=.nil-array.1
:notes (:nil-vectors-are-strings)
(let ((s1 (make-array '(0) :element-type nil))) (let ((s1 (make-array '(0) :element-type nil)))
(values (values
(notnot (string= s1 s1)) (notnot (string= s1 s1))
...@@ -518,6 +519,7 @@ ...@@ -518,6 +519,7 @@
t t t t t nil nil) t t t t t nil nil)
(deftest string/=.nil-array.1 (deftest string/=.nil-array.1
:notes (:nil-vectors-are-strings)
(let ((s1 (make-array '(0) :element-type nil))) (let ((s1 (make-array '(0) :element-type nil)))
(values (values
(string/= s1 s1) (string/= s1 s1)
...@@ -530,6 +532,7 @@ ...@@ -530,6 +532,7 @@
nil nil nil nil nil 0 0) nil nil nil nil nil 0 0)
(deftest string<.nil-array.1 (deftest string<.nil-array.1
:notes (:nil-vectors-are-strings)
(let ((s1 (make-array '(0) :element-type nil))) (let ((s1 (make-array '(0) :element-type nil)))
(values (values
(string< s1 s1) (string< s1 s1)
...@@ -542,6 +545,7 @@ ...@@ -542,6 +545,7 @@
nil nil nil nil nil 0 nil) nil nil nil nil nil 0 nil)
(deftest string<=.nil-array.1 (deftest string<=.nil-array.1
:notes (:nil-vectors-are-strings)
(let ((s1 (make-array '(0) :element-type nil))) (let ((s1 (make-array '(0) :element-type nil)))
(values (values
(string<= s1 s1) (string<= s1 s1)
...@@ -554,6 +558,7 @@ ...@@ -554,6 +558,7 @@
0 0 0 0 0 0 nil) 0 0 0 0 0 0 nil)
(deftest string>.nil-array.1 (deftest string>.nil-array.1
:notes (:nil-vectors-are-strings)
(let ((s1 (make-array '(0) :element-type nil))) (let ((s1 (make-array '(0) :element-type nil)))
(values (values
(string> s1 s1) (string> s1 s1)
...@@ -566,6 +571,7 @@ ...@@ -566,6 +571,7 @@
nil nil nil nil nil nil 0) nil nil nil nil nil nil 0)
(deftest string>=.nil-array.1 (deftest string>=.nil-array.1
:notes (:nil-vectors-are-strings)
(let ((s1 (make-array '(0) :element-type nil))) (let ((s1 (make-array '(0) :element-type nil)))
(values (values
(string>= s1 s1) (string>= s1 s1)
...@@ -578,6 +584,7 @@ ...@@ -578,6 +584,7 @@
0 0 0 0 0 nil 0) 0 0 0 0 0 nil 0)
(deftest string-equal.nil-array.1 (deftest string-equal.nil-array.1
:notes (:nil-vectors-are-strings)
(let ((s1 (make-array '(0) :element-type nil))) (let ((s1 (make-array '(0) :element-type nil)))
(values (values
(notnot (string-equal s1 s1)) (notnot (string-equal s1 s1))
...@@ -590,6 +597,7 @@ ...@@ -590,6 +597,7 @@
t t t t t nil nil) t t t t t nil nil)
(deftest string-not-equal.nil-array.1 (deftest string-not-equal.nil-array.1
:notes (:nil-vectors-are-strings)
(let ((s1 (make-array '(0) :element-type nil))) (let ((s1 (make-array '(0) :element-type nil)))
(values (values
(string-not-equal s1 s1) (string-not-equal s1 s1)
...@@ -602,6 +610,7 @@ ...@@ -602,6 +610,7 @@
nil nil nil nil nil 0 0) nil nil nil nil nil 0 0)
(deftest string-lessp.nil-array.1 (deftest string-lessp.nil-array.1
:notes (:nil-vectors-are-strings)
(let ((s1 (make-array '(0) :element-type nil))) (let ((s1 (make-array '(0) :element-type nil)))
(values (values
(string-lessp s1 s1) (string-lessp s1 s1)
...@@ -614,6 +623,7 @@ ...@@ -614,6 +623,7 @@
nil nil nil nil nil 0 nil) nil nil nil nil nil 0 nil)
(deftest string-not-greaterp.nil-array.1 (deftest string-not-greaterp.nil-array.1
:notes (:nil-vectors-are-strings)
(let ((s1 (make-array '(0) :element-type nil))) (let ((s1 (make-array '(0) :element-type nil)))
(values (values
(string-not-greaterp s1 s1) (string-not-greaterp s1 s1)
...@@ -626,6 +636,7 @@ ...@@ -626,6 +636,7 @@
0 0 0 0 0 0 nil) 0 0 0 0 0 0 nil)
(deftest string-greaterp.nil-array.1 (deftest string-greaterp.nil-array.1
:notes (:nil-vectors-are-strings)
(let ((s1 (make-array '(0) :element-type nil))) (let ((s1 (make-array '(0) :element-type nil)))
(values (values
(string-greaterp s1 s1) (string-greaterp s1 s1)
...@@ -638,6 +649,7 @@ ...@@ -638,6 +649,7 @@
nil nil nil nil nil nil 0) nil nil nil nil nil nil 0)
(deftest string-not-lessp.nil-array.1 (deftest string-not-lessp.nil-array.1
:notes (:nil-vectors-are-strings)
(let ((s1 (make-array '(0) :element-type nil))) (let ((s1 (make-array '(0) :element-type nil)))
(values (values
(string-not-lessp s1 s1) (string-not-lessp s1 s1)
...@@ -648,15 +660,3 @@ ...@@ -648,15 +660,3 @@
(string-not-lessp s1 "a") (string-not-lessp s1 "a")
(string-not-lessp "a" s1))) (string-not-lessp "a" s1)))
0 0 0 0 0 nil 0) 0 0 0 0 0 nil 0)
...@@ -81,10 +81,10 @@ ...@@ -81,10 +81,10 @@
"ABCDE") "ABCDE")
(deftest string-downcase.11 (deftest string-downcase.11
:notes (:nil-vectors-are-strings)
(string-downcase (make-array '(0) :element-type nil)) (string-downcase (make-array '(0) :element-type nil))
"") "")
(deftest string-downcase.order.1 (deftest string-downcase.order.1
(let ((i 0) a b c (s (copy-seq "ABCDEF"))) (let ((i 0) a b c (s (copy-seq "ABCDEF")))
(values (values
......
...@@ -142,10 +142,12 @@ ...@@ -142,10 +142,12 @@
"") "")
(deftest string-left-trim.20 (deftest string-left-trim.20
:notes (:nil-vectors-are-strings)
(string-left-trim "abcd" (make-array '(0) :element-type nil)) (string-left-trim "abcd" (make-array '(0) :element-type nil))
"") "")
(deftest string-left-trim.21 (deftest string-left-trim.21
:notes (:nil-vectors-are-strings)
(string-left-trim (make-array '(0) :element-type nil) "abcd") (string-left-trim (make-array '(0) :element-type nil) "abcd")
"abcd") "abcd")
......
...@@ -142,10 +142,12 @@ ...@@ -142,10 +142,12 @@
"") "")
(deftest string-right-trim.20 (deftest string-right-trim.20
:notes (:nil-vectors-are-strings)
(string-right-trim "abcd" (make-array '(0) :element-type nil)) (string-right-trim "abcd" (make-array '(0) :element-type nil))
"") "")
(deftest string-right-trim.21 (deftest string-right-trim.21
:notes (:nil-vectors-are-strings)
(string-right-trim (make-array '(0) :element-type nil) "abcd") (string-right-trim (make-array '(0) :element-type nil) "abcd")
"abcd") "abcd")
......
...@@ -142,10 +142,12 @@ ...@@ -142,10 +142,12 @@
"") "")
(deftest string-trim.20 (deftest string-trim.20
:notes (:nil-vectors-are-strings)
(string-trim "abcd" (make-array '(0) :element-type nil)) (string-trim "abcd" (make-array '(0) :element-type nil))
"") "")
(deftest string-trim.21 (deftest string-trim.21
:notes (:nil-vectors-are-strings)
(string-trim (make-array '(0) :element-type nil) "abcd") (string-trim (make-array '(0) :element-type nil) "abcd")
"abcd") "abcd")
......
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
"abcde") "abcde")
(deftest string-upcase.11 (deftest string-upcase.11
:notes (:nil-vectors-are-strings)
(string-upcase (make-array '(0) :element-type nil)) (string-upcase (make-array '(0) :element-type nil))
"") "")
......
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