;; test, so we can let typep have the CLOS documented behavior
;; while keeping our above predicate clean.
- (put ',name 'cl-deftype-satisfies #',testsym2)
+ (define-symbol-prop ',name 'cl-deftype-satisfies #',testsym2)
(eieio-defclass-internal ',name ',superclasses ',slots ',options-and-doc)
"This class should break."))
:type 'invalid-slot-type))
-(defun eieio-tests--dummy-function ()
- ;; Dummy function to see if the file is compiled.
- t)
-
(ert-deftest eieio-test-23-inheritance-check ()
- ;; This test fails when compiled, see Bug#27718.
- :expected-result (if (byte-code-function-p
- (symbol-function 'eieio-tests--dummy-function))
- :failed :passed)
(should (child-of-class-p 'class-ab 'class-a))
(should (child-of-class-p 'class-ab 'class-b))
(should (object-of-class-p eitest-a 'class-a))
(should (not (cl-typep "foo" 'class-a))))
(ert-deftest eieio-test-24-object-predicates ()
- ;; This test fails when compiled, see Bug#27718.
- :expected-result (if (byte-code-function-p
- (symbol-function 'eieio-tests--dummy-function))
- :failed :passed)
(let ((listooa (list (class-ab) (class-a)))
(listoob (list (class-ab) (class-b))))
(should (cl-typep listooa '(list-of class-a)))