76
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 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 |
#ifndef PHONETESTMAIN
|
|
19 |
#define PHONETESTMAIN
|
|
20 |
|
|
21 |
#define PHONE_TEST_MAIN(TestObject) \
|
|
22 |
int main(int argc, char *argv[]) \
|
|
23 |
{ \
|
|
24 |
char *new_argv[3]; \
|
|
25 |
QCoreApplication app(argc, argv); \
|
|
26 |
\
|
|
27 |
QString str = "C:\\data\\" + QFileInfo(QCoreApplication::applicationFilePath()).baseName() + ".log"; \
|
|
28 |
QByteArray bytes = str.toAscii(); \
|
|
29 |
\
|
|
30 |
char arg1[] = "-o"; \
|
|
31 |
\
|
|
32 |
new_argv[0] = argv[0]; \
|
|
33 |
new_argv[1] = arg1; \
|
|
34 |
new_argv[2] = bytes.data(); \
|
|
35 |
\
|
|
36 |
TestObject tc; \
|
|
37 |
return QTest::qExec(&tc, 3, new_argv); \
|
|
38 |
}
|
|
39 |
|
|
40 |
#endif
|