[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash ad44aee 009/426: Add more tests.
From: |
Phillip Lord |
Subject: |
[elpa] externals/dash ad44aee 009/426: Add more tests. |
Date: |
Tue, 04 Aug 2015 19:36:21 +0000 |
branch: externals/dash
commit ad44aee9db9bd6f2cde084e569e3cf66157d107a
Author: Magnar Sveen <address@hidden>
Commit: Magnar Sveen <address@hidden>
Add more tests.
---
tests.el | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/tests.el b/tests.el
index 3125b79..139df00 100644
--- a/tests.el
+++ b/tests.el
@@ -1,6 +1,27 @@
(require 'ert)
(require 'bang)
+(ert-deftest difference ()
+ "`!difference' returns a new list of only elements in list1 that are not in
list2."
+ (should (equal (!difference '() '()) '()))
+ (should (equal (!difference '(1 2 3) '(4 5 6)) '(1 2 3)))
+ (should (equal (!difference '(1 2 3 4) '(3 4 5 6)) '(1 2))))
+
(ert-deftest intersection ()
"`!intersection' returns a new list of only elements that are in both given
lists."
+ (should (equal (!intersection '() '()) '()))
+ (should (equal (!intersection '(1 2 3) '(4 5 6)) '()))
(should (equal (!intersection '(1 2 3 4) '(3 4 5 6)) '(3 4))))
+
+(ert-deftest uniq ()
+ "`!uniq' returns a new list of only unique elements."
+ (should (equal (!uniq '()) '()))
+ (should (equal (!uniq '(1 2 2 4)) '(1 2 4))))
+
+(ert-deftest contains-p ()
+ "`!contains-p' returns t if the list contains the element."
+ (should (!contains-p '(1 2 3) 1))
+ (should (!contains-p '(1 2 3) 2))
+ (should (not (!contains-p '() '())))
+ (should (not (!contains-p '() 1)))
+ (should (not (!contains-p '(1 2 4) 3))))
- [elpa] externals/dash 065f76b 005/426: Use ert.el to run on Emacs 23 as well., (continued)
- [elpa] externals/dash 065f76b 005/426: Use ert.el to run on Emacs 23 as well., Phillip Lord, 2015/08/04
- [elpa] externals/dash 3e0ef58 012/426: !filter can now take either a function or form (anaphoric), Phillip Lord, 2015/08/04
- [elpa] externals/dash d870282 013/426: Add some tests, and fix the bugs they uncovered., Phillip Lord, 2015/08/04
- [elpa] externals/dash b24d056 014/426: !map macro, Phillip Lord, 2015/08/04
- [elpa] externals/dash f9471e4 016/426: !concat done - one less 'cl dependency, Phillip Lord, 2015/08/04
- [elpa] externals/dash 302c8ea 001/426: Initial commit., Phillip Lord, 2015/08/04
- [elpa] externals/dash 07de30e 019/426: !mapcat macro, and with that: goodbye 'cl!, Phillip Lord, 2015/08/04
- [elpa] externals/dash 4201ecd 017/426: Out with remove-if, in with !reject, Phillip Lord, 2015/08/04
- [elpa] externals/dash c229ba8 011/426: Rewrite to anaphoric filter function., Phillip Lord, 2015/08/04
- [elpa] externals/dash 73204ca 022/426: Change !contains-p to !contains? to match clojure api., Phillip Lord, 2015/08/04
- [elpa] externals/dash ad44aee 009/426: Add more tests.,
Phillip Lord <=
- [elpa] externals/dash f5b16e3 018/426: Make !partial have the same quote-less API as the rest of bang., Phillip Lord, 2015/08/04
- [elpa] externals/dash a02b6c1 021/426: Add note about no 'cl required., Phillip Lord, 2015/08/04
- [elpa] externals/dash 754dd0d 024/426: Create stand-alone anaphoric macros, Phillip Lord, 2015/08/04
- [elpa] externals/dash 9e74cc0 027/426: Remove dead code., Phillip Lord, 2015/08/04
- [elpa] externals/dash 8eab3d1 028/426: Slight improvements to map., Phillip Lord, 2015/08/04
- [elpa] externals/dash 1997e52 031/426: Treat dashes in docstring better., Phillip Lord, 2015/08/04
- [elpa] externals/dash 52815c5 020/426: Add documentation, Phillip Lord, 2015/08/04
- [elpa] externals/dash d2dfb11 023/426: Use double-bang for anaphoric functions, Phillip Lord, 2015/08/04
- [elpa] externals/dash ed2e447 015/426: !reduce macro, Phillip Lord, 2015/08/04
- [elpa] externals/dash 6f0636f 032/426: Show only three first examples per function., Phillip Lord, 2015/08/04