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 "mt_cnthistorymodel.h" |
|
21 |
|
22 #include <QtTest/QtTest> |
|
23 |
|
24 int main(int argc, char *argv[]) |
|
25 { |
|
26 bool promptOnExit(true); |
|
27 for (int i=0; i<argc; i++) { |
|
28 if (QString(argv[i]) == "-noprompt") |
|
29 promptOnExit = false; |
|
30 } |
|
31 printf("Running tests...\n"); |
|
32 |
|
33 QApplication app(argc, argv); |
|
34 |
|
35 QTranslator translator; |
|
36 QString lang = QLocale::system().name(); |
|
37 QString path = "z:/resource/qt/translations/"; |
|
38 translator.load(path + "contacts_" + lang); |
|
39 app.installTranslator(&translator); |
|
40 |
|
41 TestRunner testRunner("mt_cnthistorymodel"); |
|
42 |
|
43 TestCntHistoryModel historyModelTests; |
|
44 testRunner.runTests( historyModelTests ); |
|
45 |
|
46 testRunner.printResults(); |
|
47 |
|
48 /*if (promptOnExit) { |
|
49 printf("Press any key...\n"); |
|
50 getchar(); |
|
51 }*/ |
|
52 return 0; |
|
53 } |
|
54 |
|