aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorStefan Monnier2015-01-18 14:08:13 -0500
committerStefan Monnier2015-01-18 14:08:13 -0500
commit1f545d33648f819e8eedb92bafe19b53670eaf91 (patch)
treea3b44fa8b6616c1b53bae657b68abd0fff12d10a /test
parent2a61bd0096db23123734db439051c859e42b9606 (diff)
downloademacs-1f545d33648f819e8eedb92bafe19b53670eaf91.tar.gz
emacs-1f545d33648f819e8eedb92bafe19b53670eaf91.zip
* lisp/emacs-lisp/eieio-core.el: Add `subclass' specializer for cl-generic.
(eieio--generic-subclass-tagcode, eieio--generic-subclass-tag-types): New functions. (cl-generic-tagcode-function, cl-generic-tag-types-function): Use them. * test/automated/eieio-test-methodinvoke.el (eieio-test-cl-generic-1): Test `subclass' specializer.
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog8
-rw-r--r--test/automated/Makefile.in4
-rw-r--r--test/automated/eieio-test-methodinvoke.el7
3 files changed, 16 insertions, 3 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index e81bfa7d185..4b9e7a92621 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,5 +1,8 @@
12015-01-18 Stefan Monnier <monnier@iro.umontreal.ca> 12015-01-18 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * automated/Makefile.in (EMACS_EXTRAOPT): New var.
4 (EMACSOPT): Use it.
5
3 * automated/cl-generic-tests.el (cl-generic-test-10-weird): New test. 6 * automated/cl-generic-tests.el (cl-generic-test-10-weird): New test.
4 Rename other tests to preserve ordering. 7 Rename other tests to preserve ordering.
5 8
@@ -8,6 +11,11 @@
8 * automated/seq-tests.el (test-seq-subseq): Add more tests. 11 * automated/seq-tests.el (test-seq-subseq): Add more tests.
9 (Bug#19434) 12 (Bug#19434)
10 13
142015-01-18 Stefan Monnier <monnier@iro.umontreal.ca>
15
16 * automated/eieio-test-methodinvoke.el (eieio-test-cl-generic-1):
17 Test `subclass' specializer.
18
112015-01-17 Stefan Monnier <monnier@iro.umontreal.ca> 192015-01-17 Stefan Monnier <monnier@iro.umontreal.ca>
12 20
13 * automated/eieio-tests.el 21 * automated/eieio-tests.el
diff --git a/test/automated/Makefile.in b/test/automated/Makefile.in
index 7243e8af14a..faf0b3d8339 100644
--- a/test/automated/Makefile.in
+++ b/test/automated/Makefile.in
@@ -39,10 +39,12 @@ SEPCHAR = @SEPCHAR@
39# directory, we can use emacs --chdir. 39# directory, we can use emacs --chdir.
40EMACS = ../../src/emacs 40EMACS = ../../src/emacs
41 41
42EMACS_EXTRAOPT=
43
42# Command line flags for Emacs. 44# Command line flags for Emacs.
43# Apparently MSYS bash would convert "-L :" to "-L ;" anyway, 45# Apparently MSYS bash would convert "-L :" to "-L ;" anyway,
44# but we might as well be explicit. 46# but we might as well be explicit.
45EMACSOPT = -batch --no-site-file --no-site-lisp -L "$(SEPCHAR)$(srcdir)" 47EMACSOPT = -batch --no-site-file --no-site-lisp -L "$(SEPCHAR)$(srcdir)" $(EMACS_EXTRAOPT)
46 48
47# Prevent any settings in the user environment causing problems. 49# Prevent any settings in the user environment causing problems.
48unexport EMACSDATA EMACSDOC EMACSPATH GREP_OPTIONS 50unexport EMACSDATA EMACSDOC EMACSPATH GREP_OPTIONS
diff --git a/test/automated/eieio-test-methodinvoke.el b/test/automated/eieio-test-methodinvoke.el
index b6d60b85815..3918fb904fe 100644
--- a/test/automated/eieio-test-methodinvoke.el
+++ b/test/automated/eieio-test-methodinvoke.el
@@ -388,10 +388,13 @@
388 (cons "CNM-0" (cl-call-next-method 7 y))) 388 (cons "CNM-0" (cl-call-next-method 7 y)))
389 (cl-defmethod eieio-test--1 ((_x CNM-1-1) _y) 389 (cl-defmethod eieio-test--1 ((_x CNM-1-1) _y)
390 (cons "CNM-1-1" (cl-call-next-method))) 390 (cons "CNM-1-1" (cl-call-next-method)))
391 (cl-defmethod eieio-test--1 ((_x CNM-1-2) y) 391 (cl-defmethod eieio-test--1 ((_x CNM-1-2) _y)
392 (cons "CNM-1-2" (cl-call-next-method))) 392 (cons "CNM-1-2" (cl-call-next-method)))
393 (cl-defmethod eieio-test--1 ((_x (subclass CNM-1-2)) _y)
394 (cons "subclass CNM-1-2" (cl-call-next-method)))
393 (should (equal (eieio-test--1 4 5) '(4 5))) 395 (should (equal (eieio-test--1 4 5) '(4 5)))
394 (should (equal (eieio-test--1 (make-instance 'CNM-0) 5) 396 (should (equal (eieio-test--1 (make-instance 'CNM-0) 5)
395 '("CNM-0" 7 5))) 397 '("CNM-0" 7 5)))
396 (should (equal (eieio-test--1 (make-instance 'CNM-2) 5) 398 (should (equal (eieio-test--1 (make-instance 'CNM-2) 5)
397 '("CNM-1-1" "CNM-1-2" "CNM-0" 7 5)))) 399 '("CNM-1-1" "CNM-1-2" "CNM-0" 7 5)))
400 (should (equal (eieio-test--1 'CNM-2 6) '("subclass CNM-1-2" CNM-2 6))))