www.delorie.com/gnu/docs/greg/greg_22.html   search  
 
Buy GNU books!


Greg testing framework

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.0.5 greg-expect-fail

The greg-expect-fail macro is a shorthand method of writing a testcase to confirm that a known bug is still present in the code being tested. Once the bug is fixed, it would be altered to be a greg-expect-pass testcase.
 
; A test that basic arithmetic DOESN'T work!

(greg-expect-fail "one plus one is two" (eq? (+ 1 1) 2))

is equivalent to -

(greg-testcase "one plus one is two" #f
  (lambda ()
    (eq? (+ 1 1) 2)
  )
)


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003