1 #include <QtTest/QtTest> |
1 #include <QtTest/QtTest> |
2 #include "ut_vmbxcpplugin.h" |
2 #include "ut_vmbxcpplugin.h" |
3 #include "ut_vmbxuiengine.h" |
3 #include "ut_vmbxuiengine.h" |
|
4 #include "ut_actioncustomitem.h" |
|
5 #include "ut_customedit.h" |
4 |
6 |
5 // ----------------------------------------------------------------------------- |
7 // ----------------------------------------------------------------------------- |
6 // main() |
8 // main() |
7 // Main method implemented for directing test output to a file. |
9 // Main method implemented for directing test output to a file. |
8 // ----------------------------------------------------------------------------- |
10 // ----------------------------------------------------------------------------- |
9 int main(int argc, char *argv[]) |
11 int main(int argc, char *argv[]) |
10 { |
12 { |
11 qDebug("main() >"); |
13 qDebug("main() >"); |
12 |
14 |
13 //TODO: wk18 QApplication can not be created will casue crash. |
15 QApplication app(argc, argv); |
14 //QApplication app(argc, argv); |
|
15 |
16 |
16 qDebug("ut_vmbxuiengine"); |
17 qDebug("ut_vmbxuiengine"); |
17 Ut_VmbxUiEngine tcUiEngine; |
18 Ut_VmbxUiEngine tcUiEngine; |
18 char *pass[3]; |
19 char *pass[3]; |
19 pass[0] = argv[0]; |
20 pass[0] = argv[0]; |
20 pass[1] = "-o"; |
21 pass[1] = "-o"; |
21 pass[2] = "c:\\logs\\vmbx\\ut_vmbxuiengine.txt"; |
22 pass[2] = "c:\\logs\\vmbx\\ut_vmbxuiengine.txt"; |
22 int result = QTest::qExec(&tcUiEngine, 3, pass); |
23 int result = -1; |
|
24 result = QTest::qExec(&tcUiEngine, 3, pass); |
23 qDebug("ut_vmbxuiengine result %d", result); |
25 qDebug("ut_vmbxuiengine result %d", result); |
24 |
26 |
25 qDebug("ut_vmbxcpplugin"); |
27 qDebug("ut_vmbxcpplugin"); |
26 Ut_vmbxCpPlugin tcCpPlugin; |
28 Ut_vmbxCpPlugin tcCpPlugin; |
27 pass[2] = "c:\\logs\\vmbx\\ut_vmbxcpplugin.txt"; |
29 pass[2] = "c:\\logs\\vmbx\\ut_vmbxcpplugin.txt"; |
28 result = QTest::qExec(&tcCpPlugin, 3, pass); |
30 result = QTest::qExec(&tcCpPlugin, 3, pass); |
29 qDebug("ut_vmbxcpplugin result=%d", result); |
31 qDebug("ut_vmbxcpplugin result=%d", result); |
30 |
32 |
|
33 qDebug("ut_actioncustomitem"); |
|
34 Ut_ActionCustomItem tcCustom; |
|
35 pass[2] = "c:\\logs\\vmbx\\ut_acttioncustomitem.txt"; |
|
36 result = QTest::qExec(&tcCustom, 3, pass); |
|
37 qDebug("ut_actioncustomitem result=%d", result); |
|
38 |
|
39 qDebug("ut_customedit"); |
|
40 Ut_CustomEdit tcEdit; |
|
41 pass[2] = "c:\\logs\\vmbx\\ut_customedit.txt"; |
|
42 result = QTest::qExec(&tcEdit, 3, pass); |
|
43 qDebug("Ut_CustomEdit result=%d", result); |
|
44 |
|
45 |
31 qDebug("main() <"); |
46 qDebug("main() <"); |
32 return result; |
47 return result; |
33 } |
48 } |
34 //End of file |
49 //End of file |