Home

cmosher01 edited this page Mar 28, 2012 · 3 revisions
Clone this wiki locally

ctest

The is the wiki for ctest.

Here is a usage example (taken from the ctest.h file):

#include "ctest.h"
int main(int argc, char **argv)
{
  int f;

  ctest_ctx *ctx = ctest_ctx_alloc();

  CTEST(ctx,9/3==3);
  CTEST(ctx,10/3==3);
  f = ctest_count_fail(ctx);

  ctest_ctx_free(ctx);

  if (f)
    {
      return 1;
    }

  return 0;
}