mmsharing/mmshapp/tsrc/ut_mmshapp/src/main.cpp
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
child 35 6c57ef9392d2
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
     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 <QtTest/QtTest>
       
    19 
       
    20 #include "ut_lcapplication.h"
       
    21 #include "testresultxmlparser.h"
       
    22 
       
    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     TestResultXmlParser parser;
       
    35     
       
    36     UT_LcApplication ut_lcApplication;
       
    37     QString resultFileName = "c:/ut_lcapplication.xml";
       
    38     QStringList args_lcApplication( "ut_lcapplication");
       
    39     args_lcApplication << "-xml" << "-o" << resultFileName;
       
    40     QTest::qExec(&ut_lcApplication, args_lcApplication);
       
    41     parser.parseAndPrintResults(resultFileName,true); 
       
    42 
       
    43     if (promptOnExit) {
       
    44         printf("Press any key...\n");
       
    45         getchar(); 
       
    46     }
       
    47     return 0;   
       
    48 }