diff options
| author | Nicolas Petton | 2016-11-16 18:37:26 +0100 |
|---|---|---|
| committer | Nicolas Petton | 2016-11-16 18:37:26 +0100 |
| commit | f63976857b4458bc7712e91d95c04fe2e2ca0106 (patch) | |
| tree | 2715c0b878284976d959440f34243cbd689f52a9 | |
| parent | 5ffdbe0a5ebcb3437356f60102b8e622cc608294 (diff) | |
| download | emacs-f63976857b4458bc7712e91d95c04fe2e2ca0106.tar.gz emacs-f63976857b4458bc7712e91d95c04fe2e2ca0106.zip | |
Do not use map.el in seq-tests.el
* test/lisp/emacs-lisp/seq-tests.el: Do not use map.el. map.el was
introduced in Emacs 25.1, but seq.el is also available in GNU ELPA for
Emacs 24.5.
| -rw-r--r-- | test/lisp/emacs-lisp/seq-tests.el | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/test/lisp/emacs-lisp/seq-tests.el b/test/lisp/emacs-lisp/seq-tests.el index 6d17b7c7c97..2e533acce17 100644 --- a/test/lisp/emacs-lisp/seq-tests.el +++ b/test/lisp/emacs-lisp/seq-tests.el | |||
| @@ -28,7 +28,6 @@ | |||
| 28 | 28 | ||
| 29 | (require 'ert) | 29 | (require 'ert) |
| 30 | (require 'seq) | 30 | (require 'seq) |
| 31 | (require 'map) | ||
| 32 | 31 | ||
| 33 | (defmacro with-test-sequences (spec &rest body) | 32 | (defmacro with-test-sequences (spec &rest body) |
| 34 | "Successively bind VAR to a list, vector, and string built from SEQ. | 33 | "Successively bind VAR to a list, vector, and string built from SEQ. |
| @@ -374,14 +373,13 @@ Evaluate BODY for each created sequence. | |||
| 374 | 373 | ||
| 375 | (ert-deftest test-seq-random-elt-take-all () | 374 | (ert-deftest test-seq-random-elt-take-all () |
| 376 | (let ((seq '(a b c d e)) | 375 | (let ((seq '(a b c d e)) |
| 377 | (count '())) | 376 | (elts '())) |
| 378 | (should (= 0 (map-length count))) | 377 | (should (= 0 (length elts))) |
| 379 | (dotimes (_ 1000) | 378 | (dotimes (_ 1000) |
| 380 | (let ((random-elt (seq-random-elt seq))) | 379 | (let ((random-elt (seq-random-elt seq))) |
| 381 | (map-put count | 380 | (add-to-list 'elts |
| 382 | random-elt | 381 | random-elt))) |
| 383 | (map-elt count random-elt 0)))) | 382 | (should (= 5 (length elts))))) |
| 384 | (should (= 5 (map-length count))))) | ||
| 385 | 383 | ||
| 386 | (ert-deftest test-seq-random-elt-signal-on-empty () | 384 | (ert-deftest test-seq-random-elt-signal-on-empty () |
| 387 | (should-error (seq-random-elt nil)) | 385 | (should-error (seq-random-elt nil)) |