|
1 /* |
|
2 * Copyright (c) 2008, 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: test code |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #include <QtTest/QtTest> |
|
21 |
|
22 #ifdef Q_OS_SYMBIAN |
|
23 #include <e32const.h> |
|
24 #endif |
|
25 |
|
26 // forward declaration |
|
27 class HsClockWidget; |
|
28 |
|
29 /** |
|
30 * @test Implementation for the clock plugin test code |
|
31 */ |
|
32 class TestClockWidget : public QObject |
|
33 { |
|
34 Q_OBJECT |
|
35 |
|
36 private slots: |
|
37 |
|
38 void initTestCase(); |
|
39 void cleanupTestCase(); |
|
40 void init(); |
|
41 void cleanup(); |
|
42 |
|
43 // hsclockwidget.cpp tests |
|
44 void createClockWidget(); |
|
45 void toggleAnalogDigital(); |
|
46 |
|
47 void testClockOnInitalize(); |
|
48 void testClockOnShow(); |
|
49 void testClockOnHide(); |
|
50 void testOnUninitialize(); |
|
51 void testOnSettingsChanged(); |
|
52 void testClockShape(); |
|
53 |
|
54 // hsanalogclockwidget.cpp tests |
|
55 void createAnalogClockWidget(); |
|
56 void analogClockWidgetTick(); |
|
57 void analogClockWidgetPolish(); |
|
58 void analogClockWidgetShape(); |
|
59 |
|
60 // hsdigitalclocklabel.cpp tests |
|
61 void createDigitalClockWidget(); |
|
62 void digitalClockWidgetTick(); |
|
63 void digitalClockWidgetPolish(); |
|
64 void digitalClockWidgetShape(); |
|
65 |
|
66 // hsclockwidgettimer.cpp |
|
67 void testHsClockWidgetTimer(); |
|
68 |
|
69 #ifdef Q_OS_SYMBIAN |
|
70 // hsclocksettingsnotifier_symbian.cpp tests |
|
71 void testSettingOfClockAndTimeFormat(); |
|
72 #endif |
|
73 |
|
74 private: |
|
75 |
|
76 HsClockWidget *mClockWidget; |
|
77 |
|
78 #ifdef Q_OS_SYMBIAN |
|
79 TClockFormat mClockFormat; |
|
80 TTimeFormat mTimeFormat; |
|
81 #endif |
|
82 |
|
83 }; |
|
84 |
|
85 |