Commit eb9f2878 authored by pfdietz's avatar pfdietz

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

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