aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDaniel Colascione2014-04-21 20:51:12 -0700
committerDaniel Colascione2014-04-21 20:51:12 -0700
commit66fda7948f7d0b94194d53edcfbf27bec596c019 (patch)
tree5e24a63483e983e426a44bfa6b5629b28e3be6f4 /test
parentd6f14ca729315dd94cdb24da47e1569519e3a4dd (diff)
downloademacs-66fda7948f7d0b94194d53edcfbf27bec596c019.tar.gz
emacs-66fda7948f7d0b94194d53edcfbf27bec596c019.zip
Optimize cl-struct-slot-value; fix test
2014-04-22 Daniel Colascione <dancol@dancol.org> * emacs-lisp/cl-macs.el (cl-struct-sequence-type,cl-struct-slot-info): Declare pure. (cl-struct-slot-value): Conditionally use aref or nth so that the compiler produces optimal code. 2014-04-22 Daniel Colascione <dancol@dancol.org> * automated/cl-lib.el (cl-lib-struct-accessors): Fix test to account for removal of `cl-struct-set-slot-value'.
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog5
-rw-r--r--test/automated/cl-lib.el2
2 files changed, 6 insertions, 1 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 4003a24bc6b..1163402fd19 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
12014-04-22 Daniel Colascione <dancol@dancol.org>
2
3 * automated/cl-lib.el (cl-lib-struct-accessors): Fix test to
4 account for removal of `cl-struct-set-slot-value'.
5
12014-04-21 Daniel Colascione <dancol@dancol.org> 62014-04-21 Daniel Colascione <dancol@dancol.org>
2 7
3 * automated/bytecomp-tests.el (test-byte-comp-compile-and-load): 8 * automated/bytecomp-tests.el (test-byte-comp-compile-and-load):
diff --git a/test/automated/cl-lib.el b/test/automated/cl-lib.el
index 8bf1482a30a..89bc3cea392 100644
--- a/test/automated/cl-lib.el
+++ b/test/automated/cl-lib.el
@@ -206,7 +206,7 @@
206 (let ((x (make-mystruct :abc 1 :def 2))) 206 (let ((x (make-mystruct :abc 1 :def 2)))
207 (should (eql (cl-struct-slot-value 'mystruct 'abc x) 1)) 207 (should (eql (cl-struct-slot-value 'mystruct 'abc x) 1))
208 (should (eql (cl-struct-slot-value 'mystruct 'def x) 2)) 208 (should (eql (cl-struct-slot-value 'mystruct 'def x) 2))
209 (cl-struct-set-slot-value 'mystruct 'def x -1) 209 (setf (cl-struct-slot-value 'mystruct 'def x) -1)
210 (should (eql (cl-struct-slot-value 'mystruct 'def x) -1)) 210 (should (eql (cl-struct-slot-value 'mystruct 'def x) -1))
211 (should (eql (cl-struct-slot-offset 'mystruct 'abc) 1)) 211 (should (eql (cl-struct-slot-offset 'mystruct 'abc) 1))
212 (should-error (cl-struct-slot-offset 'mystruct 'marypoppins)) 212 (should-error (cl-struct-slot-offset 'mystruct 'marypoppins))