[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Testing Framework



Hi folks,

This email is to announce the preliminary release of a testing
framework based on that described on Wiki
[http://www.c2.com/cgi/wiki?TestingFramework]. I say preliminary
'cause it doesn't have much in the way of documentation, and it isn't
yet packaged into units.

Features:
- Assertions to making creating test easier
- Test-case and test-suite objects
- A simple GUI to run tests from

Todo:
- Improve a few names
- Unitify
- Document
- Make a MzGTK GUI
- Suggestions?

The URL: http://www.dai.ed.ac.uk/daidb/people/homes/noelw/test.tar.gz

An example of usage:

;; Make some tests
(define tests
  (list ;;expected to fail 
	(make-test-failure 'assert (lambda () (assert = 1 2))) 
        (make-test 'assert-eq? (lambda () (assert-eq? 1 1)))
	;;will fail unexpectedly
        (make-test 'assert-eqv? (lambda () (assert-eqv? "a" "a"))) 
        (make-test 'assert-equal? (lambda ()
				     (assert-equal? '(1 2 3) '(1 2 3))))))

;; A test suite is a collection of test cases
(define test-suite (apply make-test-suite 'test-suite tests))

;; Make a simple GUI
(define gui (test-gui test-suite))

;; Run the GUI
(gui)

cya,
Noel
-- 
Noel Welsh
http://www.dai.ed.ac.uk/~noelw/   noelw@dai.ed.ac.uk