7#include "tpcclibConfig.h"
12#include "test_tpcnew.h"
16static char *info[] = {
17 "Usage: @P [options]",
22 " Run all tests for library functions.",
37 int i, help=0, version=0, verbose=1, error=0, test=0;
41 if(argc==1) {
tpcPrintUsage(argv[0], info, stdout);
return(0);}
42 for(i=1; i<argc; i++) {
44 cptr=argv[i];
if(*cptr==
'-') cptr++;
if(*cptr==
'-') cptr++;
45 if(strncasecmp(cptr,
"TEST", 1)==0) {
52 fprintf(stderr,
"Error: specify --help for usage.\n");
59 if(test==0)
return(0);
61 if(verbose>0) printf(
"running tests for library functions...\n");
63 statusSet(&status, __func__, __FILE__, __LINE__, 0);
67 i++;
if((ret=test_newTemplate(&status))!=0) {
68 fprintf(stderr,
"failed (%d).\n", ret);
73 if(verbose>0) printf(
"\nAll tests passed.\n\n");
int tpcProcessStdOptions(const char *s, int *print_usage, int *print_version, int *verbose_level)
void tpcPrintBuild(const char *program, FILE *fp)
void tpcPrintUsage(const char *program, char *text[], FILE *fp)
void statusPrint(FILE *fp, TPCSTATUS *s)
void statusInit(TPCSTATUS *s)
void statusSet(TPCSTATUS *s, const char *func, const char *srcfile, int srcline, tpcerror error)
void statusFree(TPCSTATUS *s)
int verbose
Verbose level, used by statusPrint() etc.
Header file for libtpcnew.