[Top][All Lists]

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

Re: [Chicken-users] Test egg question

From: Alex Shinn
Subject: Re: [Chicken-users] Test egg question
Date: Sun, 4 Nov 2007 20:10:02 +0900


On Nov 4, 2007 12:02 AM, Peter Busser <address@hidden> wrote:
> I'm writing a number of test cases using the test egg. I would like to use
> the test program for automated testing. Is it possible to know that one of
> the tests failed, so I can exit the program with an error value?

I was thinking of adding something like this.  In the meantime
you can hack it with something like this:

(define (test-group-ref group key default)
  (cond ((assq key (cdr (current-test-group))) => cdr)
        (else default)))

(define all-tests-passed?
  (zero? (+ (or (test-group-ref (current-test-group) 'FAIL #f) 0)
            (or (test-group-ref (current-test-group) 'ERROR #f) 0))))


(exit (if all-tests-passed? 0 1))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]