81
|
1 |
/*
|
|
2 |
* Copyright (c) 2007, 2008 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: Implementation for presence cache reader and writer.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
#include "ut_cntsimutility.h"
|
|
18 |
#include <qtest.h>
|
|
19 |
#include <stdio.h>
|
|
20 |
|
|
21 |
#include <qdebug.h>
|
|
22 |
#include <qfile.h>
|
|
23 |
|
|
24 |
#define LOG_TO_FILE
|
|
25 |
//QTEST_MAIN(TestOfTest);
|
|
26 |
int main(int argc, char *argv[])
|
|
27 |
{
|
|
28 |
#ifdef LOG_TO_FILE
|
|
29 |
|
|
30 |
bool promptOnExit(0);
|
|
31 |
for (int i=0; i<argc; i++) {
|
|
32 |
if (QString(argv[i]) == "-noprompt")
|
|
33 |
promptOnExit = false;
|
|
34 |
}
|
|
35 |
printf("Running tests...\n");
|
|
36 |
QApplication app(argc, argv);
|
|
37 |
|
|
38 |
QString entityTestsFileName = "c:/testsimutility_qt.xml";
|
|
39 |
|
|
40 |
QStringList args( "ut_cntsimutility");
|
|
41 |
args << "-xml" << "-o" << entityTestsFileName;
|
|
42 |
TestCntSimUtility simtests;
|
|
43 |
QTest::qExec(&simtests, args);
|
|
44 |
|
|
45 |
if (promptOnExit) {
|
|
46 |
printf("Press any key...\n");
|
|
47 |
getchar();
|
|
48 |
|
|
49 |
}
|
|
50 |
#else
|
|
51 |
QApplication app(argc, argv);
|
|
52 |
TestCntSimUtility simtests;
|
|
53 |
QStringList args( "ut_cntsimutility.exe");
|
|
54 |
QTest::qExec(&simtests, args);
|
|
55 |
|
|
56 |
|
|
57 |
#endif
|
|
58 |
return 0;
|
|
59 |
}
|