Simple XUnit test library / objects in plain C Snapshot
Functions
example.c File Reference
#include "vtest.h"
#include "vtestcui.h"

Go to the source code of this file.

Functions

void always_fails ()
void always_pass ()
void setUpFails ()
VTEST_END_SUITE
VTEST_END_SUITE
VTEST_END_SUITE int 
main (int argc, char *argv[])

Function Documentation

void always_fails ( )
Examples:
example.c.

Definition at line 6 of file example.c.

{ 
        VASSERT( 1 == 0 );
}
void always_pass ( )
Examples:
example.c.

Definition at line 11 of file example.c.

{
}
VTEST_END_SUITE VTEST_END_SUITE VTEST_END_SUITE int main ( int  argc,
char *  argv[] 
)
Examples:
example.c.

Definition at line 42 of file example.c.

{
  VTEST_CUI_test_runner_cmdline( VTEST_SUITE_GET(FIRSTTEST), argc-1, argv+1 );
  // normally main would return the return value of the function. don't do this in this case so that this test will not fail.
  return 0; 
}
void setUpFails ( )
Examples:
example.c.

Definition at line 15 of file example.c.

{
        VASSERT(0);
}