emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/compat 8157a68136 2/2: Use should-error in compat--expe


From: ELPA Syncer
Subject: [elpa] externals/compat 8157a68136 2/2: Use should-error in compat--expect instead of condition-case
Date: Mon, 7 Mar 2022 04:57:24 -0500 (EST)

branch: externals/compat
commit 8157a681365b1913ad02efeed43917c364770fbb
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    Use should-error in compat--expect instead of condition-case
---
 compat-tests.el | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/compat-tests.el b/compat-tests.el
index 24fb5b50a4..accad4cb8a 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -88,11 +88,7 @@ being compared against."
                       :name ',real-test
                       :tags '(,name)
                       :body (lambda ()
-                              (condition-case nil
-                                  (progn
-                                    (,name ,@args)
-                                    (ert-fail :fail-reason "did not signal an 
error"))
-                                (,code t)))))))
+                              (should-error (,name ,@args) :type ,code))))))
              (and (fboundp compat)
                   `(ert-set-test
                     ',comp-test
@@ -100,11 +96,7 @@ being compared against."
                      :name ',comp-test
                      :tags '(,name)
                      :body (lambda ()
-                             (condition-case nil
-                                 (progn
-                                   (,compat ,@args)
-                                   (ert-fail :fail-reason "did not signal an 
error"))
-                               (,code t)))))))))))
+                             (should-error (,compat ,@args) :type 
,code))))))))))
 
 (defmacro compat-deftest (name &rest body)
   "Test NAME in BODY."



reply via email to

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