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

  1. //+------------------------------------------------------------------
  2. //
  3. // File: tmain.hxx
  4. //
  5. // Contents: common include file for all test drivers.
  6. //
  7. //--------------------------------------------------------------------
  8. #include <windows.h>
  9. #include <ole2.h>
  10. #include <stdio.h>
  11. extern BOOL fQuiet; // turn tracing on/off
  12. extern DWORD gInitFlag; // current COINT flag used on main thread.
  13. // definition of ptr to test subroutine
  14. typedef BOOL (* LPFNTEST)(void);
  15. // driver entry point
  16. int _cdecl DriverMain(int argc, char **argv,
  17. char *pszTestName,
  18. LPFNTEST pfnTest);
  19. BOOL TestResult(BOOL RetVal, LPSTR pszTestName);
  20. // macros
  21. #define TEST_FAILED_EXIT(x, y) \
  22. if (x) \
  23. { \
  24. printf("ERROR: ");\
  25. printf(y); \
  26. RetVal = FALSE; \
  27. goto Cleanup; \
  28. }
  29. #define TEST_FAILED(x, y) \
  30. if (x) \
  31. { \
  32. printf("ERROR: ");\
  33. printf(y); \
  34. RetVal = FALSE; \
  35. }
  36. #define OUTPUT(x) if (!fQuiet) printf(x);
  37. // global statistics
  38. extern LONG gCountAttempts;
  39. extern LONG gCountPassed;
  40. extern LONG gCountFailed;