Unit Testing - Test Evaluation Functions

Top  Previous  Next

 

For testing conditions inside your test functions you can use the standard dbprint,etc. or you can use some special helper functions:

 

dbtest(bool condition)                                - generates test failure if condition is not true, and continues

dbtestex(bool condition)                                - generates test failure message  if condition is not true, and throws an exception

dbtestinfo(char* infostring,bool condition)        - generates test failure including infostring if condition is not true, and continues

dbtestexinfo(char *infostring,bool condition)        - generates test failure message including infostring if condition is not true, and throws an exception