Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

49 lines
1.0 KiB

//+------------------------------------------------------------------
//
// File: tmain.hxx
//
// Contents: common include file for all test drivers.
//
//--------------------------------------------------------------------
#include <windows.h>
#include <ole2.h>
#include <stdio.h>
extern BOOL fQuiet; // turn tracing on/off
extern DWORD gInitFlag; // current COINT flag used on main thread.
// definition of ptr to test subroutine
typedef BOOL (* LPFNTEST)(void);
// driver entry point
int _cdecl DriverMain(int argc, char **argv,
char *pszTestName,
LPFNTEST pfnTest);
BOOL TestResult(BOOL RetVal, LPSTR pszTestName);
// macros
#define TEST_FAILED_EXIT(x, y) \
if (x) \
{ \
printf("ERROR: ");\
printf(y); \
RetVal = FALSE; \
goto Cleanup; \
}
#define TEST_FAILED(x, y) \
if (x) \
{ \
printf("ERROR: ");\
printf(y); \
RetVal = FALSE; \
}
#define OUTPUT(x) if (!fQuiet) printf(x);
// global statistics
extern LONG gCountAttempts;
extern LONG gCountPassed;
extern LONG gCountFailed;