1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

* test/src/comp-tests.el (setcarcdr): Don't mutate literals.

This commit is contained in:
Mattias Engdegård 2025-11-06 16:22:13 +01:00
parent bd4ac3b23b
commit 0c694624c3

View file

@ -146,7 +146,7 @@ Check that the resulting binaries do not differ."
(should (= (comp-tests-aref-aset-f) 100)))
(comp-deftest symbol-value ()
"Testing aref and aset."
"Testing `symbol-value'."
(should (= (comp-tests-symbol-value-f) 3)))
(comp-deftest concat ()
@ -260,8 +260,8 @@ Check that the resulting binaries do not differ."
(comp-deftest setcarcdr ()
"Testing setcar setcdr."
(should (equal (comp-tests-setcar-f '(10 . 10) 3) '(3 . 10)))
(should (equal (comp-tests-setcdr-f '(10 . 10) 3) '(10 . 3)))
(should (equal (comp-tests-setcar-f (cons 10 10) 3) '(3 . 10)))
(should (equal (comp-tests-setcdr-f (cons 10 10) 3) '(10 . 3)))
(should-error (comp-tests-setcar-f 3 10)
:type 'wrong-type-argument)
(should-error (comp-tests-setcdr-f 3 10)