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


Greg testing framework

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

6.0.1 getting started

The simplest way to get started is to write a file (say `myTests') and type greg --verbose myTests to run the tests in it.

Your file might contain code like -

 
; A simple test that basic arithmetic works

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

(greg-expect-pass "one minus one is zero"
  (eq? (- 1 1) 0)
)

And would produce output like -
 
PASS: one plus one is two
PASS: one minus one is zero

# of testcases attempted   2
# of expected passes       2
# of expected failures     0
# of unexpected passes     0
# of unexpected failures   0
# of unresolved testcases  0
# of unsupported testcases 0
# of untested testcases    0


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