branch: master
commit 604942d36021a8b14877a0a640234a09c79e0927
Merge: a8bd341 0d2969f
Author: R. Bernstein <[email protected]>
Commit: GitHub <[email protected]>
Merge pull request #12 from syohex/cl-lib
Use cl-lib instead of cl.el
---
test-simple.el | 12 ++----------
test/test-basic.el | 2 +-
test/test-fns.el | 8 ++++----
test/test-no-clear.el | 2 +-
4 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/test-simple.el b/test-simple.el
index 1fda8a5..3387435 100644
--- a/test-simple.el
+++ b/test-simple.el
@@ -89,15 +89,7 @@
;;; Code:
-(eval-when-compile
- (byte-compile-disable-warning 'cl-functions)
- ;; Somehow disabling cl-functions causes the erroneous message:
- ;; Warning: the function `reduce' might not be defined at runtime.
- ;; FIXME: isolate, fix and/or report back to Emacs developers a bug
- ;; (byte-compile-disable-warning 'unresolved)
- (require 'cl)
- )
-(require 'cl)
+(require 'cl-lib)
(defgroup test-simple nil
"Simple Unit Test Framework for Emacs Lisp"
@@ -125,7 +117,7 @@ If bpr is not installed, fall back to `compile'."
(defvar test-simple-verbosity 0
"The greater the number the more verbose output.")
-(defstruct test-info
+(cl-defstruct test-info
description ;; description of last group of tests
(assert-count 0) ;; total number of assertions run
(failure-count 0) ;; total number of failures seen
diff --git a/test/test-basic.el b/test/test-basic.el
index 723779a..be14140 100644
--- a/test/test-basic.el
+++ b/test/test-basic.el
@@ -14,7 +14,7 @@
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see
;; <http://www.gnu.org/licenses/>.
-(require 'cl)
+(require 'cl-lib)
(load-file "../test-simple.el")
(test-simple-start "test-simple.el")
diff --git a/test/test-fns.el b/test/test-fns.el
index bd340f0..cad655e 100644
--- a/test/test-fns.el
+++ b/test/test-fns.el
@@ -14,7 +14,7 @@
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see
;; <http://www.gnu.org/licenses/>.
-(require 'cl)
+(require 'cl-lib)
(load-file "../test-simple.el")
(test-simple-clear)
@@ -28,11 +28,11 @@
(note "Summary information")
(assert-matches "0 failures in 0 assertions" (test-simple-summary-line
test-info)
"initial summary")
-(incf (test-info-assert-count test-info))
-(incf (test-info-failure-count test-info))
+(cl-incf (test-info-assert-count test-info))
+(cl-incf (test-info-failure-count test-info))
(assert-matches "1 failure in 1 assertion" (test-simple-summary-line test-info)
"handling singular correctly")
-(incf (test-info-assert-count test-info))
+(cl-incf (test-info-assert-count test-info))
(assert-matches "1 failure in 2 assertions" (test-simple-summary-line
test-info)
"back to plural for two assertions")
diff --git a/test/test-no-clear.el b/test/test-no-clear.el
index 45822bd..748baa0 100644
--- a/test/test-no-clear.el
+++ b/test/test-no-clear.el
@@ -14,7 +14,7 @@
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see
;; <http://www.gnu.org/licenses/>.
-(require 'cl)
+(require 'cl-lib)
(load-file "../test-simple.el")
;; We don't do this or test-simple-start
;; (test-simple-clear)