|
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: Unit test for MpReflectionEffect |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <hbinstance.h> |
|
19 #include "unittest_mpreflectioneffect.h" |
|
20 |
|
21 /*! |
|
22 * Nothing valuable to test for following functions |
|
23 * boundingRectFor() |
|
24 * draw() |
|
25 * |
|
26 */ |
|
27 |
|
28 // Do this so we can access all member variables. |
|
29 #define private public |
|
30 #include "mpreflectioneffect.h" |
|
31 #undef private |
|
32 |
|
33 /*! |
|
34 Make our test case a stand-alone executable that runs all the test functions. |
|
35 */ |
|
36 int main(int argc, char *argv[]) |
|
37 { |
|
38 QApplication app(argc, argv); |
|
39 TestMpReflectionEffect tv; |
|
40 |
|
41 if ( argc > 1 ) { |
|
42 return QTest::qExec( &tv, argc, argv); |
|
43 } |
|
44 else { |
|
45 char *pass[3]; |
|
46 pass[0] = argv[0]; |
|
47 pass[1] = "-o"; |
|
48 pass[2] = "c:\\data\\unittest_mpreflectioneffect.txt"; |
|
49 |
|
50 return QTest::qExec(&tv, 3, pass); |
|
51 } |
|
52 } |
|
53 |
|
54 TestMpReflectionEffect::TestMpReflectionEffect() |
|
55 : mTest(0) |
|
56 { |
|
57 } |
|
58 |
|
59 TestMpReflectionEffect::~TestMpReflectionEffect() |
|
60 { |
|
61 delete mTest; |
|
62 } |
|
63 |
|
64 /*! |
|
65 Called before the first testfunction is executed. |
|
66 */ |
|
67 void TestMpReflectionEffect::initTestCase() |
|
68 { |
|
69 } |
|
70 |
|
71 /*! |
|
72 Called after the last testfunction was executed. |
|
73 */ |
|
74 void TestMpReflectionEffect::cleanupTestCase() |
|
75 { |
|
76 } |
|
77 |
|
78 /*! |
|
79 Called before each testfunction is executed. |
|
80 */ |
|
81 void TestMpReflectionEffect::init() |
|
82 { |
|
83 mTest = new MpReflectionEffect( new QObject() ); |
|
84 } |
|
85 |
|
86 /*! |
|
87 Called after every testfunction. |
|
88 */ |
|
89 void TestMpReflectionEffect::cleanup() |
|
90 { |
|
91 delete mTest; |
|
92 mTest = 0; |
|
93 } |
|
94 |
|
95 |
|
96 // End of file |