[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat 7569405bc8 15/16: Restore tests
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat 7569405bc8 15/16: Restore tests |
Date: |
Wed, 4 Jan 2023 07:57:28 -0500 (EST) |
branch: externals/compat
commit 7569405bc8c950f3e6d4b53339612fbe07fc790e
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Restore tests
---
compat-tests.el | 54 +++++++++++++++++++++++++++---------------------------
1 file changed, 27 insertions(+), 27 deletions(-)
diff --git a/compat-tests.el b/compat-tests.el
index 08a7ff57d6..37fc1f4d69 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -44,6 +44,33 @@
(should (eq (compat-call plist-get list "first" #'string=) 10))
(should (eq (compat-call plist-get list "second" #'string=) 2))))
+(ert-deftest mapcan ()
+ (should (equal nil (mapcan #'identity nil)))
+ (should (equal (list 1)
+ (mapcan #'identity
+ (list (list 1)))))
+ (should (equal (list 1 2 3 4)
+ (mapcan #'identity
+ (list (list 1) (list 2 3) (list 4)))))
+ (should (equal (list (list 1) (list 2 3) (list 4))
+ (mapcan #'list
+ (list (list 1) (list 2 3) (list 4)))))
+ (should (equal (list 1 2 3 4)
+ (mapcan #'identity
+ (list (list 1) (list) (list 2 3) (list 4)))))
+ (should (equal (list (list 1) (list) (list 2 3) (list 4))
+ (mapcan #'list
+ (list (list 1) (list) (list 2 3) (list 4)))))
+ (should (equal (list)
+ (mapcan #'identity
+ (list (list) (list) (list) (list))))))
+
+(ert-deftest xor ()
+ (should (equal t (xor t nil)))
+ (should (equal t (xor nil t)))
+ (should (equal nil (xor nil nil)))
+ (should (equal nil (xor t t))))
+
(ert-deftest length= ()
(should (equal t (length= '() 0))) ;empty list
(should (equal t (length= '(1) 1))) ;single element
@@ -644,12 +671,6 @@
;; (ought '(1 2 3 4) '((1) nil 2 ((3 4))))
;; (ought '(1 2 3 4) '(((1 nil)) 2 (((3 nil nil) 4)))))
-;; (ert-deftest xor
-;; (ought t t nil)
-;; (ought t nil t)
-;; (ought nil nil nil)
-;; (ought nil t t))
-
;; (ert-deftest string-distance
;; (ought 3 "kitten" "sitting") ;from wikipedia
;; (if (version<= "28" emacs-version) ;trivial examples
@@ -784,27 +805,6 @@
;; (ought 'd 0 '((1 . a) (2 . b) (3 . c)) 'd) ;default value
;; (ought 'd 2 '((1 . a) (2 . b) (3 . c)) 'd nil #'ignore))
-;; (ert-deftest mapcan
-;; (ought nil #'identity nil)
-;; (ought (list 1)
-;; #'identity
-;; (list (list 1)))
-;; (ought (list 1 2 3 4)
-;; #'identity
-;; (list (list 1) (list 2 3) (list 4)))
-;; (ought (list (list 1) (list 2 3) (list 4))
-;; #'list
-;; (list (list 1) (list 2 3) (list 4)))
-;; (ought (list 1 2 3 4)
-;; #'identity
-;; (list (list 1) (list) (list 2 3) (list 4)))
-;; (ought (list (list 1) (list) (list 2 3) (list 4))
-;; #'list
-;; (list (list 1) (list) (list 2 3) (list 4)))
-;; (ought (list)
-;; #'identity
-;; (list (list) (list) (list) (list))))
-
;; ;; Note: as the cXXX+r implementations are relatively trivial, their
;; ;; tests are not as extensive.
- [elpa] externals/compat d18955c1be 07/16: Remove comments, (continued)
- [elpa] externals/compat d18955c1be 07/16: Remove comments, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 8ebf7984ce 06/16: Revert "Add compat-feature macro", ELPA Syncer, 2023/01/04
- [elpa] externals/compat 7737bb9d56 08/16: Run all checks at compile time, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 31810cd4d9 10/16: Add :feature, ELPA Syncer, 2023/01/04
- [elpa] externals/compat e8de246d40 14/16: Update manual, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 71f9648cdf 03/16: Specify features, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 7aa705b65e 02/16: Require features at compile time, ELPA Syncer, 2023/01/04
- [elpa] externals/compat ce86316661 11/16: Restore tests, ELPA Syncer, 2023/01/04
- [elpa] externals/compat f342b01a10 12/16: Update manual, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 77e3e92ebf 13/16: Restore tests, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 7569405bc8 15/16: Restore tests,
ELPA Syncer <=
- [elpa] externals/compat 0bb4709d83 16/16: Expand commentary, ELPA Syncer, 2023/01/04