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