X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/7c8b0b3644ada886dfde4032fdf38687a5968089..0e963201d03d9229bb8ac4323291d2b0119526ed:/test/automated/eieio-test-persist.el diff --git a/test/automated/eieio-test-persist.el b/test/automated/eieio-test-persist.el index 7bb2f1ca77..2f8d65e512 100644 --- a/test/automated/eieio-test-persist.el +++ b/test/automated/eieio-test-persist.el @@ -1,6 +1,6 @@ ;;; eieio-persist.el --- Tests for eieio-persistent class -;; Copyright (C) 2011-2015 Free Software Foundation, Inc. +;; Copyright (C) 2011-2016 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam @@ -45,24 +45,24 @@ This is usually a symbol that starts with `:'." (eieio-persistent-save original) - (let* ((file (oref original :file)) + (let* ((file (oref original file)) (class (eieio-object-class original)) (fromdisk (eieio-persistent-read file class)) - (cv (eieio--class-v class)) - (slot-names (eieio--class-public-a cv)) - (slot-deflt (eieio--class-public-d cv)) + (cv (cl--find-class class)) + (slots (eieio--class-slots cv)) ) (unless (object-of-class-p fromdisk class) (error "Persistent class %S != original class %S" (eieio-object-class fromdisk) class)) - (while slot-names - (let* ((oneslot (car slot-names)) + (dotimes (i (length slots)) + (let* ((slot (aref slots i)) + (oneslot (cl--slot-descriptor-name slot)) (origvalue (eieio-oref original oneslot)) (fromdiskvalue (eieio-oref fromdisk oneslot)) (initarg-p (eieio--attribute-to-initarg - (eieio--class-v class) oneslot)) + (cl--find-class class) oneslot)) ) (if initarg-p @@ -70,12 +70,9 @@ This is usually a symbol that starts with `:'." (error "Slot %S Original Val %S != Persistent Val %S" oneslot origvalue fromdiskvalue)) ;; Else !initarg-p - (unless (equal (car slot-deflt) fromdiskvalue) + (unless (equal (cl--slot-descriptor-initform slot) fromdiskvalue) (error "Slot %S Persistent Val %S != Default Value %S" - oneslot fromdiskvalue (car slot-deflt)))) - - (setq slot-names (cdr slot-names) - slot-deflt (cdr slot-deflt)) + oneslot fromdiskvalue (cl--slot-descriptor-initform slot)))) )))) ;;; Simple Case