|
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: Main test class for hsHomeScreenStateProvider library. |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "t_hsmenuworkerstateplugin.h" |
|
19 |
|
20 #include "hsaddtohomescreenstate.h" |
|
21 |
|
22 #include "hsmenuworkerstate.h" |
|
23 #include "hsmenuevent.h" |
|
24 #include "hsmenueventfactory.h" |
|
25 #include "hsmenueventtransition.h" |
|
26 |
|
27 |
|
28 // --------------------------------------------------------------------------- |
|
29 // --------------------------------------------------------------------------- |
|
30 // |
|
31 void MenuStatesTest::MenuWorkerState_construction() |
|
32 { |
|
33 #ifdef Q_OS_SYMBIAN |
|
34 #ifdef UT_MEMORY_CHECK |
|
35 __UHEAP_MARK; |
|
36 #endif//UT_MEMORY_CHECK |
|
37 #endif//Q_OS_SYMBIAN |
|
38 { |
|
39 HsMenuWorkerState workerStateS; |
|
40 QVERIFY(workerStateS.parent() == 0); |
|
41 QVERIFY(workerStateS.objectName() == "homescreen.nokia.com/state/MenuWorkerState"); |
|
42 |
|
43 HsMenuWorkerState *workerStateH0 = new HsMenuWorkerState(); |
|
44 QVERIFY(workerStateH0->parent() == 0); |
|
45 QVERIFY(workerStateH0->objectName() == "homescreen.nokia.com/state/MenuWorkerState"); |
|
46 |
|
47 HsMenuWorkerState *workerStateH1 = new HsMenuWorkerState(workerStateH0); |
|
48 QVERIFY(workerStateH1->parent() == workerStateH0); |
|
49 |
|
50 |
|
51 delete workerStateH1; |
|
52 delete workerStateH0; |
|
53 } |
|
54 #ifdef Q_OS_SYMBIAN |
|
55 #ifdef UT_MEMORY_CHECK |
|
56 __UHEAP_MARKEND; |
|
57 #endif//UT_MEMORY_CHECK |
|
58 #endif//Q_OS_SYMBIAN |
|
59 } |
|
60 |