Permalink
Browse files

STYLE: A few general cleanups

  • Loading branch information...
1 parent 9f6a26f commit e96b0f1d4f749b10ebbd3d403c02808cc14998af @adlai committed Dec 20, 2009
Showing with 25 additions and 29 deletions.
  1. +3 −3 eos.asd
  2. +7 −8 src/check.lisp
  3. +2 −2 src/utils.lisp
  4. +13 −16 tests/suite.lisp
View
@@ -26,8 +26,8 @@
(:file "tests" :depends-on ("suite"))))))
(defmethod asdf:perform ((op asdf:test-op) (system (eql (asdf:find-system :Eos))))
- (format t "~&~%*******************~%~
- ** Loading tests **~%~
- *******************~%")
+ (format t "~2&*******************~@
+ ** Loading tests **~@
+ *******************~%")
(asdf:oos 'asdf:load-op :Eos-tests)
(asdf:oos 'asdf:test-op :Eos-tests))
View
@@ -9,13 +9,12 @@
(declare (special *test-dribble*))
,@body))
-(symbol-macrolet ((name 'run-state) (vars '(result-list current-test)))
- (defmacro bind-run-state (requested-vars &body body)
- `(let ,requested-vars
- (declare (special ,@(mapcar 'car requested-vars)))
- ,@body))
- (defmacro with-run-state (requested-vars &body body)
- `(locally (declare (special ,@requested-vars)) ,@body)))
+(defmacro bind-run-state (requested-vars &body body)
+ `(let ,requested-vars
+ (declare (special ,@(mapcar 'car requested-vars)))
+ ,@body))
+(defmacro with-run-state (requested-vars &body body)
+ `(locally (declare (special ,@requested-vars)) ,@body))
(defclass test-result ()
((reason :accessor reason :initarg :reason :initform "no reason given")
@@ -212,7 +211,7 @@ not evaluated."
"Generates a pass if BODY executes to normal completion. In
other words if body does signal, return-from or throw this test
fails."
- `(let ((ok nil))
+ `(let (ok)
(unwind-protect (progn ,@body (setf ok t))
(if ok
(add-result 'test-passed :test-expr ',body)
View
@@ -30,9 +30,9 @@
macros)))
`(let* ,(nreverse binds) (macrolet ,macros ,@body)))
-;;; This is based on from Arnesi's src/list.lisp, and implements a naive ;;; list matching facility.
+;;; This is based on from Arnesi's src/list.lisp, and implements a naive list matching facility.
;;; Marco Baringer says in the original:
-;;; ;;;; ** Simple list matching based on code from Paul Graham's On Lisp.
+;;; "Simple list matching based on code from Paul Graham's On Lisp."
(defmacro acond2 (&rest clauses)
(if (null clauses)
View
@@ -4,20 +4,17 @@
(def-suite Eos)
-(defun run-all-tests ()
- (run! 'Eos))
-
(defmethod asdf:perform ((op asdf:test-op) (system (eql (asdf:find-system :Eos-tests))))
- (format t "~&~%********************~%~
- ** Starting tests **~%~
- ********************~%")
- (run-all-tests)
- (format t "~&*****************************************~%~
- ** Tests finished **~%~
- *****************************************~%~
- ** If there were any failures on your **~%~
- ** platform, please report them to me: **~%~
- ** (munchking at gmail dot com) **~%~
- ** or just file a bugreport on github: **~%~
- ** github.com/adlai/Eos/issues **~%~
- *****************************************~%"))
+ (format t "~2&********************~@
+ ** Starting tests **~@
+ ********************~%")
+ (run! 'Eos)
+ (format t "~2&*****************************************~@
+ ** Tests finished **~@
+ *****************************************~@
+ ** If there were any failures on your **~@
+ ** platform, please report them to me: **~@
+ ** (munchking at gmail dot com) **~@
+ ** or just file a bugreport on github: **~@
+ ** github.com/adlai/Eos/issues **~@
+ *****************************************~%"))

0 comments on commit e96b0f1

Please sign in to comment.