equal
deleted
inserted
replaced
20 |
20 |
21 #include <qdebug.h> |
21 #include <qdebug.h> |
22 #include <qsqldatabase.h> |
22 #include <qsqldatabase.h> |
23 #include <qfile.h> |
23 #include <qfile.h> |
24 |
24 |
25 |
25 #undef LOG_TO_FILE |
26 //QTEST_MAIN(TestOfTest); |
26 //QTEST_MAIN(TestOfTest); |
27 int main(int argc, char *argv[]) |
27 int main(int argc, char *argv[]) |
28 { |
28 { |
|
29 #ifdef LOG_TO_FILE |
|
30 |
29 bool promptOnExit(0); |
31 bool promptOnExit(0); |
30 for (int i=0; i<argc; i++) { |
32 for (int i=0; i<argc; i++) { |
31 if (QString(argv[i]) == "-noprompt") |
33 if (QString(argv[i]) == "-noprompt") |
32 promptOnExit = false; |
34 promptOnExit = false; |
33 } |
35 } |
43 QTest::qExec(&et, args); |
45 QTest::qExec(&et, args); |
44 |
46 |
45 if (promptOnExit) { |
47 if (promptOnExit) { |
46 printf("Press any key...\n"); |
48 printf("Press any key...\n"); |
47 getchar(); |
49 getchar(); |
|
50 |
48 } |
51 } |
|
52 #else |
|
53 QApplication app(argc, argv); |
|
54 EntityTests et; |
|
55 QStringList args( "entitytests"); |
|
56 QTest::qExec(&et, args); |
|
57 |
|
58 |
|
59 #endif |
49 return 0; |
60 return 0; |
50 } |
61 } |