[SHLWAPI_APITEST]: Use the 'add_rostests_file' command from Colin ;)
[reactos.git] / rostests / dxtest / ddraw / ddraw_test.cpp
1 #include <stdio.h>
2 #include <stdlib.h>
3
4 #include "ddrawtest.h"
5
6 INT NumTests(void);
7
8 int main(int argc, char *argv[])
9 {
10 INT Num = NumTests();
11 INT i, j;
12 INT passed, failed, opassed, ofailed;
13
14 opassed = 0;
15 ofailed = 0;
16 printf("DirectDraw tests\n");
17 if (argc > 1)
18 {
19 for (i = 1; i < argc; i++)
20 {
21 for (j = 0; j < NumTests(); j++)
22 {
23 if (_stricmp(argv[i], TestList[j].Test) == 0)
24 {
25 passed = 0;
26 failed = 0;
27 TestList[j].Proc(&passed, &failed);
28 opassed += passed;
29 ofailed += failed;
30 printf(" tests: %d, passed: %d, failed: %d\n\n", passed+failed, passed, failed);
31 }
32 }
33 }
34 }
35 else
36 {
37 for (i = 0; i < Num; i++)
38 {
39 passed = 0;
40 failed = 0;
41 printf("Test: %s\n", TestList[i].Test);
42 TestList[i].Proc(&passed, &failed);
43 opassed += passed;
44 ofailed += failed;
45 printf(" tests: %d, passed: %d, failed: %d\n\n", passed+failed, passed, failed);
46 }
47 }
48 printf("\nOverall tests: %d, passed: %d, failed: %d\n", opassed+ofailed, opassed, ofailed);
49
50 return ofailed;
51 }