aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorBasil L. Contovounesios2020-06-03 17:35:59 +0100
committerBasil L. Contovounesios2020-06-06 17:24:00 +0100
commit8bcc781bc762b4082cfd678b88938e3d03465d91 (patch)
treec633ddabe6c442953e08f60eff889966d5214703 /test
parentacd2cb28ef63188bff31fc167ab007a051f99c17 (diff)
downloademacs-8bcc781bc762b4082cfd678b88938e3d03465d91.tar.gz
emacs-8bcc781bc762b4082cfd678b88938e3d03465d91.zip
Un-deprecate oset and oset-default
For discussion see the following threads: https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg00630.html https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg00674.html https://lists.gnu.org/archive/html/emacs-devel/2020-06/msg00099.html * lisp/emacs-lisp/eieio.el (oset, oset-default): Un-deprecate. * lisp/emacs-lisp/eieio-core.el (eieio-oref): Declare gv-setter here instead of in lisp/emacs-lisp/eieio.el. Suggested by Stefan Monnier <monnier@iro.umontreal.ca>. (eieio-oref-default): Add gv-setter declaration. * etc/NEWS: Announce these changes. * doc/misc/eieio.texi (Accessing Slots): Document oref and oref-default as generalized variables. Consistently document getters before setters. * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el: Use lexical-binding. (eieio-test-13-init-methods): Simplify. (eieio-test-33-instance-tracker): Declare IT-list as special.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/emacs-lisp/eieio-tests/eieio-tests.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
index 34c20b2003f..21adc91e555 100644
--- a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
+++ b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
@@ -1,4 +1,4 @@
1;;; eieio-tests.el -- eieio tests routines 1;;; eieio-tests.el -- eieio test routines -*- lexical-binding: t -*-
2 2
3;; Copyright (C) 1999-2003, 2005-2010, 2012-2020 Free Software 3;; Copyright (C) 1999-2003, 2005-2010, 2012-2020 Free Software
4;; Foundation, Inc. 4;; Foundation, Inc.
@@ -356,7 +356,7 @@ METHOD is the method that was attempting to be called."
356 (oset a test-tag 1)) 356 (oset a test-tag 1))
357 357
358 (let ((ca (class-a))) 358 (let ((ca (class-a)))
359 (should-not (/= (oref ca test-tag) 2)))) 359 (should (= (oref ca test-tag) 2))))
360 360
361 361
362;;; Perform slot testing 362;;; Perform slot testing
@@ -852,6 +852,7 @@ Subclasses to override slot attributes.")
852 "Instance Tracker test object.") 852 "Instance Tracker test object.")
853 853
854(ert-deftest eieio-test-33-instance-tracker () 854(ert-deftest eieio-test-33-instance-tracker ()
855 (defvar IT-list)
855 (let (IT-list IT1) 856 (let (IT-list IT1)
856 (should (setq IT1 (IT))) 857 (should (setq IT1 (IT)))
857 ;; The instance tracker must find this 858 ;; The instance tracker must find this