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

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

[elpa] externals/compat d9496a0075: Add additional tests for bool-vector


From: ELPA Syncer
Subject: [elpa] externals/compat d9496a0075: Add additional tests for bool-vector side-effect checking
Date: Tue, 5 Apr 2022 05:57:23 -0400 (EDT)

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

    Add additional tests for bool-vector side-effect checking
---
 compat-tests.el | 47 ++++++++++++++++++++++++++---------------------
 1 file changed, 26 insertions(+), 21 deletions(-)

diff --git a/compat-tests.el b/compat-tests.el
index 2a0a570867..890e6c5181 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -1291,17 +1291,18 @@ being compared against."
   (ought "aabbcc" "dd" "aabbcc"))
 
 (let ((a (bool-vector t t nil nil))
-      (b (bool-vector t nil t nil))
-      (c (make-bool-vector 4 nil)))
+      (b (bool-vector t nil t nil)))
   (compat-deftest bool-vector-exclusive-or
     (ought (bool-vector nil t t nil) a b)
     (ought (bool-vector nil t t nil) b a)
-    (compat--bool-vector-exclusive-or a b c)
-    (should (equal (bool-vector nil t t nil) c))
-    (should (equal (bool-vector nil t t nil) c))
+    (ert-deftest compat-bool-vector-exclusive-or-sideeffect ()
+      (let ((c (make-bool-vector 4 nil)))
+        (compat--bool-vector-exclusive-or a b c)
+        (should (equal (bool-vector nil t t nil) c))
+        (should (equal (bool-vector nil t t nil) c))))
     (when (version<= "24.4" emacs-version)
-      (expect (wrong-length-argument 4 0) a (bool-vector))
-      (expect (wrong-length-argument 4 0) a b (bool-vector)))
+      (expect wrong-length-argument a (bool-vector))
+      (expect wrong-length-argument a b (bool-vector)))
     (expect wrong-type-argument (bool-vector) (vector))
     (expect wrong-type-argument (vector) (bool-vector))
     (expect wrong-type-argument (vector) (vector))
@@ -1311,13 +1312,14 @@ being compared against."
     (expect wrong-type-argument (vector) (vector) (vector))))
 
 (let ((a (bool-vector t t nil nil))
-      (b (bool-vector t nil t nil))
-      (c (make-bool-vector 4 nil)))
+      (b (bool-vector t nil t nil)))
   (compat-deftest bool-vector-union
     (ought (bool-vector t t t nil) a b)
     (ought (bool-vector t t t nil) b a)
-    (compat--bool-vector-union a b c)
-    (should (equal (bool-vector t t t nil) c))
+    (ert-deftest compat-bool-vector-union-sideeffect ()
+      (let ((c (make-bool-vector 4 nil)))
+        (compat--bool-vector-union a b c)
+        (should (equal (bool-vector t t t nil) c))))
     (when (version<= "24.4" emacs-version)
       (expect wrong-length-argument a (bool-vector))
       (expect wrong-length-argument a b (bool-vector)))
@@ -1330,13 +1332,14 @@ being compared against."
     (expect wrong-type-argument (vector) (vector) (vector))))
 
 (let ((a (bool-vector t t nil nil))
-      (b (bool-vector t nil t nil))
-      (c (make-bool-vector 4 nil)))
+      (b (bool-vector t nil t nil)))
   (compat-deftest bool-vector-intersection
     (ought (bool-vector t nil nil nil) a b)
     (ought (bool-vector t nil nil nil) b a)
-    (compat--bool-vector-intersection a b c)
-    (should (equal (bool-vector t nil nil nil) c))
+    (ert-deftest compat-bool-vector-intersection-sideeffect ()
+      (let ((c (make-bool-vector 4 nil)))
+        (compat--bool-vector-intersection a b c)
+        (should (equal (bool-vector t nil nil nil) c))))
     (when (version<= "24.4" emacs-version)
       (expect wrong-length-argument a (bool-vector))
       (expect wrong-length-argument a b (bool-vector)))
@@ -1349,15 +1352,17 @@ being compared against."
     (expect wrong-type-argument (vector) (vector) (vector))))
 
 (let ((a (bool-vector t t nil nil))
-      (b (bool-vector t nil t nil))
-      (c (make-bool-vector 4 nil)))
+      (b (bool-vector t nil t nil)))
   (compat-deftest bool-vector-set-difference
     (ought (bool-vector nil t nil nil) a b)
     (ought (bool-vector nil nil t nil) b a)
-    (compat--bool-vector-set-difference a b c)
-    (should (equal (bool-vector nil t nil nil) c))
-    (compat--bool-vector-set-difference b a c)
-    (should (equal (bool-vector nil nil t nil) c))
+    (ert-deftest compat-bool-vector-set-difference-sideeffect ()
+      (let ((c (make-bool-vector 4 nil)))
+        (compat--bool-vector-set-difference a b c)
+        (should (equal (bool-vector nil t nil nil) c)))
+      (let ((c (make-bool-vector 4 nil)))
+        (compat--bool-vector-set-difference b a c)
+        (should (equal (bool-vector nil nil t nil) c))))
     (when (version<= "24.4" emacs-version)
       (expect wrong-length-argument a (bool-vector))
       (expect wrong-length-argument a b (bool-vector)))



reply via email to

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