From 1b27b6cd81c3171ef34f35febea69ec0cb25b0eb Mon Sep 17 00:00:00 2001 From: pfdietz <pfdietz@localhost> Date: Fri, 7 Mar 2003 05:16:40 +0000 Subject: [PATCH] Added tests required by section 14.1.2.3. --- ansi-tests/cons-test-02.lsp | 10 ++++++++++ ansi-tests/cons-test-07.lsp | 12 ++++++++++++ ansi-tests/cons-test-16.lsp | 23 +++++++++++++++++++++++ ansi-tests/cons-test-17.lsp | 12 ++++++++++++ 4 files changed, 57 insertions(+) diff --git a/ansi-tests/cons-test-02.lsp b/ansi-tests/cons-test-02.lsp index 85cb288d..a018bc1e 100644 --- a/ansi-tests/cons-test-02.lsp +++ b/ansi-tests/cons-test-02.lsp @@ -198,6 +198,11 @@ :test-not #'identity)) program-error) +(deftest sublis.error.8 + (classify-error (sublis '((a . 1) . bad) + (list 'a 'b 'c 'd))) + type-error) + ;; nsublis (deftest nsublis.1 @@ -356,6 +361,11 @@ :test-not #'identity)) program-error) +(deftest nsublis.error.8 + (classify-error (nsublis '((a . 1) . bad) + (list 'a 'b 'c 'd))) + type-error) + ;;;;;; (deftest sublis.shared diff --git a/ansi-tests/cons-test-07.lsp b/ansi-tests/cons-test-07.lsp index 445d0e85..d3c5d1cc 100644 --- a/ansi-tests/cons-test-07.lsp +++ b/ansi-tests/cons-test-07.lsp @@ -126,6 +126,10 @@ (let ((i 0)) (values (append (incf i)) i)) 1 1) +(deftest append.error.1 + (classify-error (append '(a . b) '(z))) + type-error) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; revappend @@ -175,6 +179,10 @@ (classify-error (revappend nil nil nil)) program-error) +(deftest revappend.error.4 + (classify-error (revappend '(a . b) '(z))) + type-error) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; nreconc @@ -209,3 +217,7 @@ (deftest nreconc.error.3 (classify-error (nreconc nil nil nil)) program-error) + +(deftest nreconc.error.4 + (classify-error (nreconc (cons 'a 'b) (list 'z))) + type-error) diff --git a/ansi-tests/cons-test-16.lsp b/ansi-tests/cons-test-16.lsp index be3978a3..6a84305d 100644 --- a/ansi-tests/cons-test-16.lsp +++ b/ansi-tests/cons-test-16.lsp @@ -310,6 +310,10 @@ (classify-error (assoc 'a '((a . b)) :key #'cons)) program-error) +(deftest assoc.error.10 + (classify-error (assoc 'z '((a . b) . c))) + type-error) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; assoc-if @@ -442,6 +446,9 @@ (classify-error (assoc-if #'identity '((a b)(c d)) :key #'car)) type-error) +(deftest assoc-if.error.11 + (classify-error (assoc-if #'null '((a . b) . c))) + type-error) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; assoc-if-not @@ -577,6 +584,10 @@ (classify-error (assoc-if-not #'identity '((a b)(c d)) :key #'car)) type-error) +(deftest assoc-if-not.error.11 + (classify-error (assoc-if-not #'identity '((a . b) . c))) + type-error) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; copy-alist @@ -606,6 +617,10 @@ (classify-error (copy-alist nil nil)) program-error) +(deftest copy-alist.error.3 + (classify-error (copy-alist '((a . b) . c))) + type-error) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; pairlis @@ -676,3 +691,11 @@ (deftest pairlis.error.3 (classify-error (pairlis nil nil nil nil)) program-error) + +(deftest pairlist.error.4 + (classify-error (pairlis 'a '(1) '(a b c))) + type-error) + +(deftest pairlist.error.5 + (classify-error (pairlis '(a) 'b '(a b c))) + type-error) diff --git a/ansi-tests/cons-test-17.lsp b/ansi-tests/cons-test-17.lsp index e1941c67..661520dd 100644 --- a/ansi-tests/cons-test-17.lsp +++ b/ansi-tests/cons-test-17.lsp @@ -295,6 +295,10 @@ (classify-error (rassoc 'a '((b . a)(c . d)) :key #'cons)) program-error) +(deftest rassoc.error.10 + (classify-error (rassoc 'z '((a . b) . c))) + type-error) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; rassoc-if @@ -425,6 +429,10 @@ (classify-error (rassoc-if #'identity '((a . b)(c . d)) :key #'car)) type-error) +(deftest rassoc-if.error.11 + (classify-error (rassoc-if #'not '((a . b) . c))) + type-error) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; rassoc-if-not @@ -557,3 +565,7 @@ (deftest rassoc-if-not.error.10 (classify-error (rassoc-if-not #'identity '((a . b)(c . d)) :key #'car)) type-error) + +(deftest rassoc-if-not.error.11 + (classify-error (rassoc-if-not #'identity '((a . b) . c))) + type-error) -- GitLab