anchor.diff:       (passed)))
   
   (defun check-signals (expected fn)
  -  (flet ((handler (condition)
  -           (cond ((typep condition expected)
  -                  (passed)
  -                  (return-from check-signals))
  -                 (t
  -                  (error "Expected to signal ~s, but got ~a."
  -                         expected (if condition
  -                                      (type-of condition)
  -                                      "nothing"))))))
  -    (handler-bind ((condition #'handler))
  -      (funcall fn))
  -    (handler nil)))
  +  (flet ((failed (got)
  +           (error "Expected to signal ~s, but got ~a." expected got)))
  +    (handler-case (progn
  +                    (funcall fn)
  +                    (failed "nothing"))
  +      (condition (condition)
  +        (if (typep condition expected)
  +            (passed)
  +            (failed (type-of condition)))))))
   
   (defmacro signals (condition &body body)
     `(check-signals ',condition (lambda () ,@body)))
   
  -(defun report ()
  -  (format t "~& Did ~d check~:p.~%    ~
  -                   Pass: ~d (100%)~%    ~
  -                   Skip: 0 ( 0%)~%    ~
  -                   Fail: 0 ( 0%)~%"
  -          *pass-count* *pass-count*))
  +(defun report (tests)
  +  (format t "~&~%Success: ~s test~:p, ~s check~:p.~%"
  +          (length tests) *pass-count*)
  +  (values))
  +
  +(defun shuffle (vector)
  +  (loop
  +     :for i :downfrom (- (length vector) 1) :to 1
  +     :do (rotatef (aref vector i) (aref vector (random (1+ i)))))
  +  vector)
  +
  +(defun run (&optional (tests *tests*))
  +  (setf *pass-count* 0)
  +  (let ((*running* t))
  +    (map nil #'funcall (let ((*random-state* (make-random-state t)))
  +                         (shuffle (map 'vector #'identity tests)))))
  +  (report tests))
  +
  +(defun call-standalone-test (name fn)
  +  (setf *pass-count* 0)
  +  (multiple-value-prog1 (funcall fn)
  +    (report (list name))))
  +
  +(defun call-test (name fn)
  +  (format t "~&~a~%" name)
  +  (finish-output)
  +  (if *running*
  +      (funcall fn)
  +      (call-standalone-test name fn)))
   
   (defmacro test (name &body body)
     `(progn
        (defun ,name ()
  -       (unless *running* (setf *pass-count* 0))
  -       (multiple-value-prog1 (progn ,@body)
  -         (unless *running* (report))))
  +       (call-test ',name (lambda () ,@body)))
        (pushnew ',name *tests*)
        ',name))
  -
  -(defun shuffle (vector)
  -  (let ((*random-state* (make-random-state t)))
  -    (loop
  -       :for i :downfrom (- (length vector) 1) :to 1
  -       :do (rotatef (aref vector i) (aref vector (random (1+ i))))))
  -  vector)
  -
  -(defun make-test-seq (test-spec)
  -  (etypecase test-spec
  -    (atom (vector test-spec))
  -    (sequence (shuffle (map-into (make-array (length test-spec))
  -                                 #'identity test-spec)))))
  -
  -(defun run! (&optional (test-spec *tests*))
  -  (setf *pass-count* 0)
  -  (let ((*running* t))
  -    (map nil #'funcall (make-test-seq test-spec))
  -    (report)))
  -
  -(defun debug! (&rest args)
  -  (apply #'run! args))
  -
  -(defun in-suite* (&rest args)
  -  (declare (ignore args)))
  
positive.code: ;;;
  ;;; * Type inferencing works inside the `is' macro.
  ;;;
  ;;; Although some or all of these issues may be addressed by 5am or
  ;;; eos in the future, until then 1am serves an immediate need.
  
  (defpackage #:lparallel-test.1am
    (:use #:cl)
    (:export #:is #:signals #:test #:run! #:debug! #:in-suite*))
  
  (in-package #:lparallel-test.1am)
  
  
negative.code: ;;; Copyright (c) 2014, James M. Lawrence. All rights reserved.
  ;;;
  ;;; Redistribution and use in source and binary forms, with or without
  ;;; modification, are permitted provided that the following conditions
  