Make old-struct test more robust
* test/lisp/emacs-lisp/cl-lib-tests.el (old-struct): Use the `vector` constructor instead of vector literals to avoid failing because of `type-of` constant-folding.
This commit is contained in:
parent
044392c5c5
commit
1ef219e220
1 changed files with 2 additions and 2 deletions
|
@ -530,7 +530,7 @@
|
|||
|
||||
(ert-deftest old-struct ()
|
||||
(cl-defstruct foo x)
|
||||
(let ((x [cl-struct-foo])
|
||||
(let ((x (vector 'cl-struct-foo))
|
||||
(saved cl-old-struct-compat-mode))
|
||||
(cl-old-struct-compat-mode -1)
|
||||
(should (eq (type-of x) 'vector))
|
||||
|
@ -540,7 +540,7 @@
|
|||
(let ((cl-struct-foo (cl--struct-get-class 'foo)))
|
||||
(setf (symbol-function 'cl-struct-foo) :quick-object-witness-check)
|
||||
(should (eq (type-of x) 'foo))
|
||||
(should (eq (type-of [foo]) 'vector)))
|
||||
(should (eq (type-of (vector 'foo)) 'vector)))
|
||||
|
||||
(cl-old-struct-compat-mode (if saved 1 -1))))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue