[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash 7d62b1a 393/426: Make test suite independent of da
From: |
Phillip Lord |
Subject: |
[elpa] externals/dash 7d62b1a 393/426: Make test suite independent of dash |
Date: |
Tue, 04 Aug 2015 19:39:09 +0000 |
branch: externals/dash
commit 7d62b1a12780525bc839dec85d28aabf29003f2b
Author: Fredrik Bergroth <address@hidden>
Commit: Fredrik Bergroth <address@hidden>
Make test suite independent of dash
---
dev/examples-to-tests.el | 26 +++++++++++++++-----------
1 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/dev/examples-to-tests.el b/dev/examples-to-tests.el
index 70c5ae7..49d6649 100644
--- a/dev/examples-to-tests.el
+++ b/dev/examples-to-tests.el
@@ -1,18 +1,22 @@
(require 'ert)
-(require 'dash)
-(require 'dash-functional)
-(defun example-to-should (example)
- (-let [(actual sym expected) example]
- (cond
- ((eq sym '=>)
- `(should (equal ,actual ,expected)))
- ((eq sym '!!>)
- `(should-error (eval ',actual) :type ',expected)))))
+(defun example-to-should (actual sym expected)
+ (cond ((eq sym '=>)
+ `(should (equal ,actual ,expected)))
+ ((eq sym '!!>)
+ `(should-error (eval ',actual) :type ',expected))
+ (t
+ (error "invalid test case: %S" `(,actual ,sym ,expected)))))
+
(defmacro defexamples (cmd &rest examples)
- `(ert-deftest ,cmd ()
- ,@(-map 'example-to-should (-partition 3 examples))))
+ (let ((tests))
+ (while examples
+ (push (example-to-should (pop examples)
+ (pop examples)
+ (pop examples))
+ tests))
+ `(ert-deftest ,cmd () ,@(nreverse tests))))
(defun def-example-group (&rest _)) ; ignore
- [elpa] externals/dash 90056bd 401/426: Merge pull request #121 from holomorph/master, (continued)
- [elpa] externals/dash 90056bd 401/426: Merge pull request #121 from holomorph/master, Phillip Lord, 2015/08/04
- [elpa] externals/dash 733274f 398/426: Merge pull request #120 from holomorph/info-manual, Phillip Lord, 2015/08/04
- [elpa] externals/dash c09c0f6 372/426: Merge branch 'more-destructuring' (#103) of https://github.com/fbergroth/dash.el, Phillip Lord, 2015/08/04
- [elpa] externals/dash 7d7a457 402/426: Allow run-tests.sh to skip tests, Phillip Lord, 2015/08/04
- [elpa] externals/dash db784f8 403/426: Merge pull request #124 from occidens/skiptests, Phillip Lord, 2015/08/04
- [elpa] externals/dash 3b63476 412/426: Move anaphoric function intro up into Functions section, Phillip Lord, 2015/08/04
- [elpa] externals/dash 7bd6b3b 400/426: Add dir entry to texinfo template, Phillip Lord, 2015/08/04
- [elpa] externals/dash 81b808d 409/426: Ignore dash.elc, Phillip Lord, 2015/08/04
- [elpa] externals/dash 3992e3c 406/426: Make `-fixfn' more robust at handling floats, Phillip Lord, 2015/08/04
- [elpa] externals/dash 4bd6273 397/426: Invoke makeinfo on the generated .texi, Phillip Lord, 2015/08/04
- [elpa] externals/dash 7d62b1a 393/426: Make test suite independent of dash,
Phillip Lord <=
- [elpa] externals/dash 92ed7ff 391/426: Use vendored ert only on emacs23, Phillip Lord, 2015/08/04
- [elpa] externals/dash 07f0358 392/426: Add test case operator !!> for expected errors, Phillip Lord, 2015/08/04
- [elpa] externals/dash 0ef7384 395/426: Merge pull request #114 from fbergroth/update-test-case, Phillip Lord, 2015/08/04
- [elpa] externals/dash 26c1bbe 390/426: Merge pull request #113 from fbergroth/fix-byte-compile-test, Phillip Lord, 2015/08/04
- [elpa] externals/dash c34e4ab 394/426: Update invalid tests, Phillip Lord, 2015/08/04
- [elpa] externals/dash 349931e 399/426: Add @holomorph to list of contributors, Phillip Lord, 2015/08/04
- [elpa] externals/dash 1ccd2b4 389/426: Improve byte compilation test, Phillip Lord, 2015/08/04
- [elpa] externals/dash e574465 404/426: Add `-some`, Phillip Lord, 2015/08/04
- [elpa] externals/dash 4640a2a 405/426: Allow for approx comparison of floats in tests, Phillip Lord, 2015/08/04
- [elpa] externals/dash 3a3f528 396/426: Add info manual, Phillip Lord, 2015/08/04