emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 428442fb530 2/2: ; * test/lisp/emacs-lisp/nadvice-tests.el: suppr


From: Mattias Engdegård
Subject: master 428442fb530 2/2: ; * test/lisp/emacs-lisp/nadvice-tests.el: suppress some warnings
Date: Tue, 21 Feb 2023 06:33:10 -0500 (EST)

branch: master
commit 428442fb530dba03d91fe36aea4f96319d6b3e96
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>

    ; * test/lisp/emacs-lisp/nadvice-tests.el: suppress some warnings
---
 test/lisp/emacs-lisp/nadvice-tests.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/test/lisp/emacs-lisp/nadvice-tests.el 
b/test/lisp/emacs-lisp/nadvice-tests.el
index 987483f00b1..716ab694e2c 100644
--- a/test/lisp/emacs-lisp/nadvice-tests.el
+++ b/test/lisp/emacs-lisp/nadvice-tests.el
@@ -29,6 +29,7 @@
   (advice-add 'sm-test1 :around (lambda (f y) (* (funcall f y) 2)))
   (advice-remove 'sm-test1 (lambda (f y) (* (funcall f y) 5)))
   (defun sm-test1 (x) (+ x 4))
+  (declare-function sm-test1 nil)
   (should (equal (sm-test1 6) 20))
   (advice-remove 'sm-test1 (lambda (f y) (* (funcall f y) 2)))
   (should (equal (sm-test1 6) 10))
@@ -62,6 +63,7 @@
 (ert-deftest advice-tests-advice ()
   "Test advice code."
   (defun sm-test2 (x) (+ x 4))
+  (declare-function sm-test2 nil)
   (should (equal (sm-test2 6) 10))
   (defadvice sm-test2 (around sm-test activate)
     ad-do-it (setq ad-return-value (* ad-return-value 5)))
@@ -94,6 +96,7 @@
 (ert-deftest advice-tests-combination ()
   "Combining old style and new style advices."
   (defun sm-test5 (x) (+ x 4))
+  (declare-function sm-test5 nil)
   (should (equal (sm-test5 6) 10))
   (advice-add 'sm-test5 :around (lambda (f y) (* (funcall f y) 5)))
   (should (equal (sm-test5 6) 50))
@@ -112,6 +115,7 @@
 (ert-deftest advice-test-called-interactively-p ()
   "Check interaction between advice and called-interactively-p."
   (defun sm-test7 (&optional x) (interactive) (+ (or x 7) 4))
+  (declare-function sm-test7 nil)
   (advice-add 'sm-test7 :around
               (lambda (f &rest args)
                 (list (cons 1 (called-interactively-p)) (apply f args))))
@@ -119,7 +123,7 @@
   (should (equal (call-interactively 'sm-test7) '((1 . t) 11)))
   (let ((smi 7))
     (advice-add 'sm-test7 :before
-                (lambda (&rest args)
+                (lambda (&rest _args)
                   (setq smi (called-interactively-p))))
     (should (equal (list (sm-test7) smi)
                    '(((1 . nil) 11) nil)))
@@ -137,6 +141,7 @@ This tests the currently broken case of the innermost 
advice to a
 function being an around advice."
   :expected-result :failed
   (defun sm-test7.2 () (interactive) (cons 1 (called-interactively-p)))
+  (declare-function sm-test7.2 nil)
   (advice-add 'sm-test7.2 :around
               (lambda (f &rest args)
                 (list (cons 1 (called-interactively-p)) (apply f args))))
@@ -147,6 +152,7 @@ function being an around advice."
   "Check interaction between filter-args advice and called-interactively-p."
   :expected-result :failed
   (defun sm-test7.3 () (interactive) (cons 1 (called-interactively-p)))
+  (declare-function sm-test7.3 nil)
   (advice-add 'sm-test7.3 :filter-args #'list)
   (should (equal (sm-test7.3) '(1 . nil)))
   (should (equal (call-interactively 'sm-test7.3) '(1 . t))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]