|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "testrunner.h" |
|
19 |
|
20 #include "ut_cntlistmodel.h" |
|
21 #include "ut_cntcache.h" |
|
22 #include "ut_cntpresenceinfoprovider.h" |
|
23 #include "ut_cntdefaultinfoprovider.h" |
|
24 |
|
25 #include <QtTest/QtTest> |
|
26 |
|
27 int main(int argc, char *argv[]) |
|
28 { |
|
29 bool promptOnExit(true); |
|
30 for (int i=0; i<argc; i++) { |
|
31 if (QString(argv[i]) == "-noprompt") |
|
32 promptOnExit = false; |
|
33 } |
|
34 printf("Running tests...\n"); |
|
35 |
|
36 QApplication app(argc, argv); |
|
37 |
|
38 QTranslator translator; |
|
39 QString lang = QLocale::system().name(); |
|
40 QString path = "z:/resource/qt/translations/"; |
|
41 translator.load(path + "contacts_" + lang); |
|
42 app.installTranslator(&translator); |
|
43 |
|
44 TestRunner testRunner("ut_cntlistmodel"); |
|
45 |
|
46 TestCntListModel ut_CntListModel; |
|
47 testRunner.runTests(ut_CntListModel); |
|
48 |
|
49 TestCntCache ut_CntCache; |
|
50 testRunner.runTests(ut_CntCache); |
|
51 |
|
52 TestCntPresenceInfoProvider ut_CntPresenceInfoProvider; |
|
53 testRunner.runTests(ut_CntPresenceInfoProvider); |
|
54 |
|
55 TestCntDefaultInfoProvider ut_CntDefaultInfoProvider; |
|
56 testRunner.runTests(ut_CntDefaultInfoProvider); |
|
57 |
|
58 testRunner.printResults(); |
|
59 |
|
60 if (promptOnExit) { |
|
61 printf("Press any key...\n"); |
|
62 getchar(); |
|
63 } |
|
64 return 0; |
|
65 } |
|
66 |