unit.h File Reference

Unit test applet definitions shared for unit test. More...

#include <stdlib.h>
#include <stdio.h>
#include "ctl/ctldef.h"
#include "ctl/profile.h"

Include dependency graph for unit.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define Test_Error(test)
 Unit test check.
#define UNIT_TEST(Test_Name)
 Perform and profile a unit test, checking options for disabling it.
#define Test_Named(name, test)   { if ( !(test) ) { error_count++; puts( ppFileLine("Failed: " name ppTokStr(test) "\n" ) ); throwassert(#test); } }
 Named unit test - give a descriptive failure for a unit check.

Functions

int arg_find (const char *sz, size_t len)
 Get index of CLI argument.
int arg_count (void)
 Get count of arguments passed to main.
const char * arg_get (int index)
 Get an argument that was passed to main.

Variables

int error_count


Detailed Description

Unit test applet definitions shared for unit test.

Author:
David Mace
CTL_UNIT is defined for the unit test project; various sources should conditionally compile either their target, or their unit test based on whether CTL_UNIT is defined.

Definition in file unit.h.


Variable Documentation

Global used by unit test macros for error tracking

Definition at line 17 of file unit.c.


Generated on Fri Jan 2 15:28:36 2009 for Squat by  doxygen 1.5.6