#include <stdio.h>
#include <string.h>
#include <stdlib.h>
Go to the source code of this file.
Defines | |
#define | NANOTAP_DECLARE static |
#define | NANOTAP_INLINE __inline__ |
Functions | |
NANOTAP_INLINE NANOTAP_DECLARE void | ok (int x, const char *msg) |
This simply evaluates any expression ("$got eq $expected" is just a simple example) and uses that to determine if the test succeeded or failed. | |
NANOTAP_INLINE NANOTAP_DECLARE void | diag (const char *msg) |
display diagnostics message. | |
NANOTAP_INLINE NANOTAP_DECLARE void | note (const char *msg) |
display note message. | |
NANOTAP_INLINE NANOTAP_DECLARE void | contains_string (const char *string, const char *substring, const char *msg) |
contains_string() searches for $substring in $string. | |
NANOTAP_INLINE NANOTAP_DECLARE void | done_testing () |
If you don’t know how many tests you’re going to run, you can issue the plan when you’re done running tests. |
#define NANOTAP_DECLARE static |
#define NANOTAP_INLINE __inline__ |
NANOTAP_INLINE NANOTAP_DECLARE void contains_string | ( | const char * | string, | |
const char * | substring, | |||
const char * | msg | |||
) |
contains_string() searches for $substring in $string.
NANOTAP_INLINE NANOTAP_DECLARE void diag | ( | const char * | msg | ) |
display diagnostics message.
NANOTAP_INLINE NANOTAP_DECLARE void done_testing | ( | ) |
If you don’t know how many tests you’re going to run, you can issue the plan when you’re done running tests.
NANOTAP_INLINE NANOTAP_DECLARE void note | ( | const char * | msg | ) |
display note message.
NANOTAP_INLINE NANOTAP_DECLARE void ok | ( | int | x, | |
const char * | msg | |||
) |
This simply evaluates any expression ("$got eq $expected" is just a simple example) and uses that to determine if the test succeeded or failed.
A true expression passes, a false one fails. Very simple.