3#pragma pack(push, cryptoki, 1)
5#pragma pack(pop, cryptoki)
11#include "../testlib2.h"
13#include <test\testlib.c>
18 char* testDescription;
19 int (*test_function_ptr)(void);
22int gmain(
int argc, _TCHAR* argv[] ,
eIDTest eIDTests[]) {
23 clock_t startTime = clock();
30 nrofTests = (
sizeof(eIDTests) /
sizeof(
eIDTest));
33 eid_robot_style = argv[1];
36 eid_dialogs_style = argv[2];
39 eid_builtin_reader = argv[3];
42 for (i = 0; i < nrofTests; i++) {
43 eIDTests[i].doTest =
false;
44 for (
int j = 4; j < argc; j++) {
45 if (strcmp(argv[j], eIDTests[i].testDescription) == 0) {
46 eIDTests[i].doTest =
true;
56 printf(
"Can't open logfile");
59 for (i = 0; i < nrofTests; i++)
61 if (!eIDTests[i].doTest)
63 printf(
"test %d: %s\n", i, eIDTests[i].testDescription);
64 eIDTests[i].result = eIDTests[i].test_function_ptr();
72 for (i = 0; i < nrofTests; i++)
74 if (!eIDTests[i].doTest)
76 if (eIDTests[i].testDescription != NULL)
78 testlog(LVL_NOLEVEL,
"_______________________________________________\n");
79 testlog(LVL_NOLEVEL,
"Test %d %s \n", i, eIDTests[i].testDescription);
81 switch (eIDTests[i].result) {
84 testlog(LVL_NOLEVEL,
"OK\n");
88 testlog(LVL_NOLEVEL,
"SKIPPED\n");
92 testlog(LVL_NOLEVEL,
"FAILED\n");
121 printf(
"Totals: successful %d, skipped %d, failed %d\n", success, skipped, failed);
122 duration = clock() - startTime;
124 msecDuration = (duration * 1000) / CLOCKS_PER_SEC;
125 printf(
"Duration: %d,%d seconds", msecDuration / 1000, msecDuration % 1000);
127 testlog(LVL_NOLEVEL,
"\n===============================================\n");
159 testlog(LVL_NOLEVEL,
"\n===============================================\n");