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 |
|
19 #include "ut_lcviewmanager.h" |
|
20 #include "ut_lcuicomponentrepository.h" |
|
21 #include "ut_lcview.h" |
|
22 #include "ut_lceffecthandler.h" |
|
23 #include "ut_lcvideowidget.h" |
|
24 #include "testresultxmlparser.h" |
|
25 #include <qapplication.h> |
|
26 #include <QtTest/QtTest> |
|
27 #include <stdio.h> |
|
28 |
|
29 #include <QFile> |
|
30 #include <QTextStream> |
|
31 |
|
32 #define UT_ARGS( args, file )\ |
|
33 QStringList args( "ut_lcui");\ |
|
34 args << "-silent" << "-xml" << "-o" << file |
|
35 |
|
36 int main(int argc, char *argv[]) |
|
37 { |
|
38 bool promptOnExit(true); |
|
39 for (int i=0; i<argc; i++) { |
|
40 if (QString(argv[i]) == "-noprompt") |
|
41 promptOnExit = false; |
|
42 } |
|
43 printf("Running tests...\n"); |
|
44 QApplication app(argc, argv); |
|
45 TestResultXmlParser parser; |
|
46 |
|
47 UT_LcUiViewManager ut_lcViewManager; |
|
48 QString resultFileName = "c:/ut_lcui_LcViewManager.xml"; |
|
49 UT_ARGS( args_lcViewManager, resultFileName ); |
|
50 QTest::qExec( &ut_lcViewManager, args_lcViewManager ); |
|
51 parser.parseAndPrintResults(resultFileName); |
|
52 |
|
53 UT_LcUiComponentRepository ut_lcUiComponentRepository; |
|
54 resultFileName = "c:/ut_lcui_LcUiComponentRepository.xml"; |
|
55 UT_ARGS( args_lcUiComponentRepository, resultFileName ); |
|
56 QTest::qExec( &ut_lcUiComponentRepository, args_lcUiComponentRepository ); |
|
57 parser.parseAndPrintResults(resultFileName); |
|
58 |
|
59 UT_LcView ut_lcView; |
|
60 resultFileName = "c:/ut_lcui_LcView.xml"; |
|
61 UT_ARGS( args_lcView, resultFileName ); |
|
62 QTest::qExec( &ut_lcView, args_lcView ); |
|
63 parser.parseAndPrintResults(resultFileName); |
|
64 |
|
65 UT_LcEffectHandler ut_effectHandler; |
|
66 resultFileName = "c:/ut_lcui_LcEffectHandler.xml"; |
|
67 UT_ARGS( args_lcEffectHandler, resultFileName ); |
|
68 QTest::qExec( &ut_effectHandler, args_lcEffectHandler ); |
|
69 parser.parseAndPrintResults(resultFileName); |
|
70 |
|
71 UT_LcVideoWidget ut_videoWidget; |
|
72 resultFileName = "c:/ut_lcui_LcVideoWidget.xml"; |
|
73 UT_ARGS( args_lcVideoWidget, resultFileName ); |
|
74 QTest::qExec( &ut_videoWidget, args_lcVideoWidget ); |
|
75 parser.parseAndPrintResults(resultFileName); |
|
76 |
|
77 if (promptOnExit) { |
|
78 printf("Press any key...\n"); |
|
79 getchar(); |
|
80 } |
|
81 return 0; |
|
82 } |
|
83 |
|
84 |
|
85 |
|
86 |
|