Go to the source code of this file.
Typedefs | |
typedef void(* | OutputStringCB) (const char *szString, void *pOutCtx, int bNewline) |
Type for function to output a text string. More... | |
Functions | |
int | RunTests (const char *szTestNames[], OutputStringCB pfOutput, void *pOutCtx, int *pNumTestsRun) |
Runs the QCBOR tests. More... | |
void | PrintSizes (OutputStringCB pfOutput, void *pOutCtx) |
Print sizes of encoder / decoder contexts. More... | |
typedef void(* OutputStringCB) (const char *szString, void *pOutCtx, int bNewline) |
Type for function to output a text string.
[in] | szString | The string to output |
[in] | pOutCtx | A context pointer; NULL if not needed |
[in] | bNewline | If non-zero, output a newline after the string |
This is a prototype of a function to be passed to RunTests() to output text strings.
This can be implemented with stdio (if available) using a straight call to fputs() where the FILE * is passed as the pOutCtx as shown in the example code below. This code is for Linux where the newline is a \n. Windows usually prefers \r\n.
Definition at line 42 of file run_tests.h.
void PrintSizes | ( | OutputStringCB | pfOutput, |
void * | pOutCtx | ||
) |
Print sizes of encoder / decoder contexts.
[in] | pfOutput | Function that is called to output text strings. |
[in] | pOutCtx | Context pointer passed to output function. |
int RunTests | ( | const char * | szTestNames[], |
OutputStringCB | pfOutput, | ||
void * | pOutCtx, | ||
int * | pNumTestsRun | ||
) |
Runs the QCBOR tests.
[in] | szTestNames | An argv-style list of test names to run. If empty, all are run. |
[in] | pfOutput | Function that is called to output text strings. |
[in] | pOutCtx | Context pointer passed to output function. |
[out] | pNumTestsRun | Returns the number of tests run. May be NULL. |