X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpackages.lisp;h=cf5aa26cd805bb79eccd7b8bee45a5301ec4000b;hb=b6937ebfdbd276ec7e332ceade0697184904e4e1;hp=6536e28a67016ef5c4ffa6b751c3996bb0bbc734;hpb=afd9b77ccfe82efa515b6a1546c9f9c4e2a01d8e;p=fiveam.git diff --git a/src/packages.lisp b/src/packages.lisp index 6536e28..cf5aa26 100644 --- a/src/packages.lisp +++ b/src/packages.lisp @@ -2,8 +2,6 @@ ;;;; * Introduction -;;;; FiveAM is A simple Common Lisp unit testing library. - ;;;; FiveAM is a testing framework. It takes care of all the boring ;;;; bookkeeping associated with managing a test framework allowing ;;;; the developer to focus on writing tests and code. @@ -11,13 +9,13 @@ ;;;; FiveAM was designed with the following premises: ;;;; - Defining tests should be about writing tests, not -;;;; infrastructure. The developer should be able to focus on what -;;;; they're testing, not the testing framework. +;;;; infrastructure. The developer should be able to focus on what +;;;; they're testing, not the testing framework. ;;;; - Interactive testing is the norm. Common Lisp is an interactive -;;;; development environment, the testing environment should allow -;;;; the developer to quickly and easily redefine, change, remove -;;;; and run tests. +;;;; development environment, the testing environment should allow the +;;;; developer to quickly and easily redefine, change, remove and run +;;;; tests. (defpackage :it.bese.FiveAM (:use :common-lisp :it.bese.arnesi) @@ -26,10 +24,12 @@ #:make-suite #:def-suite #:in-suite + #:in-suite* #:make-test #:test #:get-test #:rem-test + #:test-names ;; fixtures #:make-fixture #:def-fixture @@ -46,15 +46,26 @@ #:pass #:fail #:*test-dribble* + #:for-all + #:gen-integer + #:gen-float + #:gen-character + #:gen-string + #:gen-list + #:gen-buffer + #:gen-one-element ;; running tests #:run #:run-all-tests #:explain + #:explain! #:run! #:! #:!! #:!!! + #:*run-test-when-defined* #:*debug-on-error* + #:*debug-on-failure* #:*verbose-failures*)) ;;;; You can use #+5am to put your test-defining code inline with your @@ -65,40 +76,18 @@ ;;;;@include "check.lisp" -;;;;@include "test.lisp" +;;;;@include "random.lisp" ;;;;@include "fixture.lisp" +;;;;@include "test.lisp" + ;;;;@include "suite.lisp" ;;;;@include "run.lisp" ;;;;@include "explain.lisp" -;;;; * Examples - -#| (def-suite my-suite :description "My Example Suite") - - (in-suite my-suite) - - (test my-tests - "Example" - (is (= 4 (+ 2 2)) "2 plus 2 wasn't equal to 4 (using #'= to test equality)") - (is (= 0 (+ -1 1))) - (throws (error "Trying to add 4 to FOO didn't signal an error") - (+ 'foo 4)) - (is (= 0 (+ 1 1)) "this should have failed")) - - (run! 'my-suite) -;; Running suite MY-SUITE -..F. -Suite My Example Suite ran 4 tests (3/0/1) - 1 FAILED - -Failed Tests: -MY-TESTS FAILED: (+ 1 1) was not = to 0 (returned 2 instead) - Description: Example. - Message: this should have failed -NIL |# - ;;;; * Colophon ;;;; This documentaion was written by Edward Marco Baringer