52
|
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:
|
|
15 |
* test application for qt control panel public apis.
|
|
16 |
*/
|
|
17 |
|
|
18 |
#include "ut_cpsettingformentryitemdata.h"
|
|
19 |
|
|
20 |
#include "mycpsettingformentryitemdata.h"
|
|
21 |
|
|
22 |
#include <cpsettingformentryitemdata.h>
|
|
23 |
#include <cpsettingformentryitemdataimpl.h>
|
|
24 |
#include <cpitemdatahelper.h>
|
|
25 |
#include <cpbasesettingview.h>
|
|
26 |
#include <QtTest/QtTest>
|
|
27 |
#include <hbdataform.h>
|
|
28 |
#include <hbpushbutton.h>
|
|
29 |
#include <hbicon.h>
|
|
30 |
|
|
31 |
/*!
|
|
32 |
\class TestCpSettingFormEntryItemData
|
|
33 |
\brief This class is used for the unit test for class CpSettingFormEntryItemData.\n
|
|
34 |
CpSettingFormEntryItemData class is used for access to a control panel setting form entry item data, \n
|
|
35 |
this class has a pure virtual member function, so it is not allowed to create instance directly, instead of that, \n
|
|
36 |
developer should a template class CpSettingFormEntryItemDataImpl to create new instance of CpSettingFormEntryItemData.\n
|
|
37 |
This unit test is supported by QTest.\n
|
|
38 |
There are total 18 test cases in this unit.\n
|
|
39 |
*/
|
|
40 |
|
|
41 |
void TestCpSettingFormEntryItemData::initTestCase()
|
|
42 |
{
|
|
43 |
|
|
44 |
}
|
|
45 |
|
|
46 |
void TestCpSettingFormEntryItemData::cleanupTestCase()
|
|
47 |
{
|
|
48 |
QCoreApplication::processEvents();
|
|
49 |
}
|
|
50 |
|
|
51 |
/*!
|
|
52 |
* Test Case Description:\n
|
|
53 |
* 1. Fucntion Name: \n
|
|
54 |
CpSettingFormEntryItemDataImpl(CpItemDataHelper &itemDataHelper,
|
|
55 |
const QString &text = QString(),
|
|
56 |
const QString &description = QString(),
|
|
57 |
const HbIcon &icon = HbIcon(),
|
|
58 |
const HbDataFormModelItem *parent = 0) :
|
|
59 |
CpSettingFormEntryItemData(itemDataHelper,text,description,icon,parent);\n
|
|
60 |
2. Function Descrition: \n
|
|
61 |
\n
|
|
62 |
3. Input Parameters: \n
|
|
63 |
CpItemDataHelper &itemDataHelper\n
|
|
64 |
QString &text\n
|
|
65 |
QString &description\n
|
|
66 |
HbIcon &icon\n
|
|
67 |
HbDataFormModelItem *parent\n
|
|
68 |
|
|
69 |
4. Expected result: \n
|
|
70 |
case run without verify failed.\n
|
|
71 |
*/
|
|
72 |
void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithHelperNoForm()
|
|
73 |
{
|
|
74 |
CpItemDataHelper *pHelper1 = new CpItemDataHelper();
|
|
75 |
QVERIFY( pHelper1 != 0 );
|
|
76 |
|
|
77 |
CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( *pHelper1, "text", "description" );
|
|
78 |
QVERIFY( pdataimp1 !=0 );
|
|
79 |
QString strtxt1 = "input texts";
|
|
80 |
pdataimp1->setText(strtxt1);
|
|
81 |
QVERIFY( pdataimp1->text() == strtxt1 );
|
|
82 |
|
|
83 |
QString strDes1 = "input descriptions";
|
|
84 |
pdataimp1->setDescription(strDes1);
|
|
85 |
QVERIFY( pdataimp1->description() == strDes1);
|
|
86 |
|
|
87 |
QString strIconName1 = "input iconname";
|
|
88 |
pdataimp1->setIconName(strIconName1);
|
|
89 |
QVERIFY( pdataimp1->iconName() == strIconName1);
|
|
90 |
|
|
91 |
HbIcon itemIcon1(QString(""));
|
|
92 |
pdataimp1->setEntryItemIcon(itemIcon1);
|
|
93 |
QVERIFY( pdataimp1->entryItemIcon() == itemIcon1);
|
|
94 |
|
|
95 |
delete pdataimp1;
|
|
96 |
delete pHelper1;
|
|
97 |
}
|
|
98 |
|
|
99 |
/*!
|
|
100 |
* Test Case Description:\n
|
|
101 |
* 1. Fucntion Name: \n
|
|
102 |
CpSettingFormEntryItemDataImpl(CpItemDataHelper &itemDataHelper,
|
|
103 |
const QString &text = QString(),
|
|
104 |
const QString &description = QString(),
|
|
105 |
const HbIcon &icon = HbIcon(),
|
|
106 |
const HbDataFormModelItem *parent = 0) :
|
|
107 |
CpSettingFormEntryItemData(itemDataHelper,text,description,icon,parent);\n
|
|
108 |
2. Function Descrition: \n
|
|
109 |
\n
|
|
110 |
3. Input Parameters: \n
|
|
111 |
CpItemDataHelper &itemDataHelper\n
|
|
112 |
QString &text\n
|
|
113 |
QString &description\n
|
|
114 |
HbIcon &icon\n
|
|
115 |
HbDataFormModelItem *parent\n
|
|
116 |
4. Expected result: \n
|
|
117 |
case run without verify failed.\n
|
|
118 |
*/
|
|
119 |
void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithHelperAndForm()
|
|
120 |
{
|
|
121 |
HbDataForm *pForm2 = new HbDataForm(0);
|
|
122 |
QVERIFY(pForm2 != 0);
|
|
123 |
|
|
124 |
CpItemDataHelper *pHelper2 = new CpItemDataHelper(pForm2);
|
|
125 |
QVERIFY( pHelper2 != 0 );
|
|
126 |
|
|
127 |
CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp2 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( *pHelper2, "text", "description" );
|
|
128 |
QVERIFY( pdataimp2 !=0 );
|
|
129 |
QString strtxt2 = "input texts";
|
|
130 |
pdataimp2->setText(strtxt2);
|
|
131 |
QVERIFY( pdataimp2->text() == strtxt2 );
|
|
132 |
|
|
133 |
QString strDes2 = "input descriptions";
|
|
134 |
pdataimp2->setDescription(strDes2);
|
|
135 |
QVERIFY( pdataimp2->description() == strDes2);
|
|
136 |
|
|
137 |
delete pdataimp2;
|
|
138 |
delete pHelper2;
|
|
139 |
delete pForm2;
|
|
140 |
}
|
|
141 |
|
|
142 |
/*!
|
|
143 |
* Test Case Description:\n
|
|
144 |
* 1. Fucntion Name: \n
|
|
145 |
CpSettingFormEntryItemDataImpl(HbDataForm *dataForm,
|
|
146 |
const QString &text = QString(),
|
|
147 |
const QString &description = QString(),
|
|
148 |
const HbIcon &icon = HbIcon(),
|
|
149 |
const HbDataFormModelItem *parent = 0) :
|
|
150 |
CpSettingFormEntryItemData(dataForm,text,description,icon,parent);\n
|
|
151 |
2. Function Descrition: \n
|
|
152 |
\n
|
|
153 |
3. Input Parameters: \n
|
|
154 |
HbDataForm *dataForm\n
|
|
155 |
QString &text\n
|
|
156 |
QString &description\n
|
|
157 |
HbIcon &icon\n
|
|
158 |
HbDataFormModelItem *parent\n
|
|
159 |
4. Expected result: \n
|
|
160 |
case run without verify failed.\n
|
|
161 |
*/
|
|
162 |
void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithForm()
|
|
163 |
{
|
|
164 |
HbDataForm * pForm1 = new HbDataForm();
|
|
165 |
QVERIFY(pForm1 != 0);
|
|
166 |
|
|
167 |
CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( pForm1, "text", "description" );
|
|
168 |
QVERIFY( pdataimp1 !=0 );
|
|
169 |
QString strtxt1 = "input texts";
|
|
170 |
pdataimp1->setText(strtxt1);
|
|
171 |
QVERIFY( pdataimp1->text() == strtxt1 );
|
|
172 |
|
|
173 |
QString strDes1 = "input descriptions";
|
|
174 |
pdataimp1->setDescription(strDes1);
|
|
175 |
QVERIFY( pdataimp1->description() == strDes1);
|
|
176 |
|
|
177 |
QString strIconName1 = "input iconname";
|
|
178 |
pdataimp1->setIconName(strIconName1);
|
|
179 |
QVERIFY( pdataimp1->iconName() == strIconName1);
|
|
180 |
|
|
181 |
HbIcon itemIcon1(QString(""));
|
|
182 |
pdataimp1->setEntryItemIcon(itemIcon1);
|
|
183 |
QVERIFY( pdataimp1->entryItemIcon() == itemIcon1);
|
|
184 |
|
|
185 |
delete pdataimp1;
|
|
186 |
delete pForm1;
|
|
187 |
}
|
|
188 |
|
|
189 |
/*!
|
|
190 |
* Test Case Description:\n
|
|
191 |
* 1. Fucntion Name: \n
|
|
192 |
CpSettingFormEntryItemDataImpl(
|
|
193 |
EntryItemType type,
|
|
194 |
CpItemDataHelper &itemDataHelper,
|
|
195 |
const QString &text = QString(),
|
|
196 |
const QString &description = QString(),
|
|
197 |
const QString &icon = QString(),
|
|
198 |
const HbDataFormModelItem *parent = 0) :
|
|
199 |
CpSettingFormEntryItemData(type,itemDataHelper,text,description,icon,parent);\n
|
|
200 |
|
|
201 |
2. Function Descrition: \n
|
|
202 |
\n
|
|
203 |
3. Input Parameters: \n
|
|
204 |
EntryItemType type\n
|
|
205 |
CpItemDataHelper &itemDataHelper\n
|
|
206 |
QString &text\n
|
|
207 |
QString &description\n
|
|
208 |
HbIcon &icon\n
|
|
209 |
HbDataFormModelItem *parent\n
|
|
210 |
4. Expected result: \n
|
|
211 |
case run without verify failed.\n
|
|
212 |
*/
|
|
213 |
void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithListTypeAndForm()
|
|
214 |
{
|
|
215 |
HbDataForm * pForm1 = new HbDataForm();
|
|
216 |
QVERIFY(pForm1 != 0);
|
|
217 |
|
|
218 |
CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( CpSettingFormEntryItemData::ListEntryItem, pForm1, "text", "description" );
|
|
219 |
QVERIFY( pdataimp1 !=0 );
|
|
220 |
QString strtxt1 = "input texts";
|
|
221 |
pdataimp1->setText(strtxt1);
|
|
222 |
QVERIFY( pdataimp1->text() == strtxt1 );
|
|
223 |
|
|
224 |
QString strDes1 = "input descriptions";
|
|
225 |
pdataimp1->setDescription(strDes1);
|
|
226 |
QVERIFY( pdataimp1->description() == strDes1);
|
|
227 |
|
|
228 |
QString strIconName1 = "input iconname";
|
|
229 |
pdataimp1->setIconName(strIconName1);
|
|
230 |
QVERIFY( pdataimp1->iconName() == strIconName1);
|
|
231 |
|
|
232 |
HbIcon itemIcon1(QString(""));
|
|
233 |
pdataimp1->setEntryItemIcon(itemIcon1);
|
|
234 |
QVERIFY( pdataimp1->entryItemIcon() == itemIcon1);
|
|
235 |
|
|
236 |
delete pdataimp1;
|
|
237 |
delete pForm1;
|
|
238 |
}
|
|
239 |
|
|
240 |
/*!
|
|
241 |
* Test Case Description:\n
|
|
242 |
* 1. Fucntion Name: \n
|
|
243 |
CpSettingFormEntryItemDataImpl(
|
|
244 |
EntryItemType type,
|
|
245 |
HbDataForm *dataForm,
|
|
246 |
const QString &text = QString(),
|
|
247 |
const QString &description = QString(),
|
|
248 |
const QString &icon = QString(),
|
|
249 |
const HbDataFormModelItem *parent = 0) :
|
|
250 |
CpSettingFormEntryItemData(type,dataForm,text,description,icon,parent);\n
|
|
251 |
|
|
252 |
2. Function Descrition: \n
|
|
253 |
\n
|
|
254 |
3. Input Parameters: \n
|
|
255 |
EntryItemType type\n
|
|
256 |
HbDataForm *dataForm\n
|
|
257 |
QString &text\n
|
|
258 |
QString &description\n
|
|
259 |
HbIcon &icon\n
|
|
260 |
HbDataFormModelItem *parent\n
|
|
261 |
4. Expected result: \n
|
|
262 |
case run without verify failed.\n
|
|
263 |
*/
|
|
264 |
void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithButtonTypeAndForm()
|
|
265 |
{
|
|
266 |
HbDataForm * pForm1 = new HbDataForm();
|
|
267 |
QVERIFY(pForm1 != 0);
|
|
268 |
|
|
269 |
CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( CpSettingFormEntryItemData::ButtonEntryItem, pForm1, "text", "description" );
|
|
270 |
QVERIFY( pdataimp1 !=0 );
|
|
271 |
QString strtxt1 = "input texts";
|
|
272 |
pdataimp1->setText(strtxt1);
|
|
273 |
QVERIFY( pdataimp1->text() == strtxt1 );
|
|
274 |
|
|
275 |
QString strDes1 = "input descriptions";
|
|
276 |
pdataimp1->setDescription(strDes1);
|
|
277 |
QVERIFY( pdataimp1->description() == strDes1);
|
|
278 |
|
|
279 |
QString strIconName1 = "input iconname";
|
|
280 |
pdataimp1->setIconName(strIconName1);
|
|
281 |
QVERIFY( pdataimp1->iconName() == strIconName1);
|
|
282 |
|
|
283 |
HbIcon itemIcon1(QString(""));
|
|
284 |
pdataimp1->setEntryItemIcon(itemIcon1);
|
|
285 |
QVERIFY( pdataimp1->entryItemIcon() == itemIcon1);
|
|
286 |
|
|
287 |
delete pdataimp1;
|
|
288 |
delete pForm1;
|
|
289 |
}
|
|
290 |
|
|
291 |
/*!
|
|
292 |
* Test Case Description:\n
|
|
293 |
* 1. Fucntion Name: \n
|
|
294 |
CpSettingFormEntryItemDataImpl(
|
|
295 |
EntryItemType type,
|
|
296 |
HbDataForm *dataForm,
|
|
297 |
const QString &text = QString(),
|
|
298 |
const QString &description = QString(),
|
|
299 |
const QString &icon = QString(),
|
|
300 |
const HbDataFormModelItem *parent = 0) :
|
|
301 |
CpSettingFormEntryItemData(type,dataForm,text,description,icon,parent);\n
|
|
302 |
|
|
303 |
2. Function Descrition: \n
|
|
304 |
\n
|
|
305 |
3. Input Parameters: \n
|
|
306 |
EntryItemType type\n
|
|
307 |
HbDataForm *dataForm\n
|
|
308 |
QString &text\n
|
|
309 |
QString &description\n
|
|
310 |
HbIcon &icon\n
|
|
311 |
HbDataFormModelItem *parent\n
|
|
312 |
4. Expected result: \n
|
|
313 |
case run without verify failed.\n
|
|
314 |
*/
|
|
315 |
void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemData005()
|
|
316 |
{
|
|
317 |
HbDataForm * pForm1 = new HbDataForm();
|
|
318 |
QVERIFY(pForm1 != 0);
|
|
319 |
|
|
320 |
CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( CpSettingFormEntryItemData::ListEntryItem, pForm1, "text", "description" );
|
|
321 |
QVERIFY( pdataimp1 !=0 );
|
|
322 |
QString strtxt1 = "input texts";
|
|
323 |
pdataimp1->setText(strtxt1);
|
|
324 |
QVERIFY( pdataimp1->text() == strtxt1 );
|
|
325 |
|
|
326 |
QString strDes1 = "input descriptions";
|
|
327 |
pdataimp1->setDescription(strDes1);
|
|
328 |
QVERIFY( pdataimp1->description() == strDes1);
|
|
329 |
|
|
330 |
QString strIconName1 = "input iconname";
|
|
331 |
pdataimp1->setIconName(strIconName1);
|
|
332 |
QVERIFY( pdataimp1->iconName() == strIconName1);
|
|
333 |
|
|
334 |
HbIcon itemIcon1(QString(""));
|
|
335 |
pdataimp1->setEntryItemIcon(itemIcon1);
|
|
336 |
QVERIFY( pdataimp1->entryItemIcon() == itemIcon1);
|
|
337 |
|
|
338 |
delete pdataimp1;
|
|
339 |
delete pForm1;
|
|
340 |
}
|
|
341 |
|
|
342 |
/*!
|
|
343 |
* Test Case Description:\n
|
|
344 |
* 1. Fucntion Name: \n
|
|
345 |
CpSettingFormEntryItemDataImpl(
|
|
346 |
EntryItemType type,
|
|
347 |
HbDataForm *dataForm,
|
|
348 |
const QString &text = QString(),
|
|
349 |
const QString &description = QString(),
|
|
350 |
const QString &icon = QString(),
|
|
351 |
const HbDataFormModelItem *parent = 0) :
|
|
352 |
CpSettingFormEntryItemData(type,dataForm,text,description,icon,parent);\n
|
|
353 |
|
|
354 |
2. Function Descrition: \n
|
|
355 |
\n
|
|
356 |
3. Input Parameters: \n
|
|
357 |
EntryItemType type\n
|
|
358 |
HbDataForm *dataForm\n
|
|
359 |
QString &text\n
|
|
360 |
QString &description\n
|
|
361 |
HbIcon &icon\n
|
|
362 |
HbDataFormModelItem *parent\n
|
|
363 |
|
|
364 |
4. Expected result: \n
|
|
365 |
case run without verify failed.\n
|
|
366 |
*/
|
|
367 |
void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemData005a()
|
|
368 |
{
|
|
369 |
HbDataForm * pForm1 = new HbDataForm();
|
|
370 |
QVERIFY(pForm1 != 0);
|
|
371 |
|
|
372 |
CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( CpSettingFormEntryItemData::ButtonEntryItem, pForm1, "text", "description" );
|
|
373 |
QVERIFY( pdataimp1 !=0 );
|
|
374 |
QString strtxt1 = "input texts";
|
|
375 |
pdataimp1->setText(strtxt1);
|
|
376 |
QVERIFY( pdataimp1->text() == strtxt1 );
|
|
377 |
|
|
378 |
QString strDes1 = "input descriptions";
|
|
379 |
pdataimp1->setDescription(strDes1);
|
|
380 |
QVERIFY( pdataimp1->description() == strDes1);
|
|
381 |
|
|
382 |
QString strIconName1 = "input iconname";
|
|
383 |
pdataimp1->setIconName(strIconName1);
|
|
384 |
QVERIFY( pdataimp1->iconName() == strIconName1);
|
|
385 |
|
|
386 |
HbIcon itemIcon1(QString(""));
|
|
387 |
pdataimp1->setEntryItemIcon(itemIcon1);
|
|
388 |
QVERIFY( pdataimp1->entryItemIcon() == itemIcon1);
|
|
389 |
|
|
390 |
delete pdataimp1;
|
|
391 |
delete pForm1;
|
|
392 |
}
|
|
393 |
|
|
394 |
/*!
|
|
395 |
* Test Case Description:\n
|
|
396 |
* 1. Fucntion Name: \n
|
|
397 |
CpSettingFormEntryItemDataImpl(
|
|
398 |
EntryItemType type,
|
|
399 |
CpItemDataHelper &itemDataHelper,
|
|
400 |
const QString &text = QString(),
|
|
401 |
const QString &description = QString(),
|
|
402 |
const QString &icon = QString(),
|
|
403 |
const HbDataFormModelItem *parent = 0) :
|
|
404 |
CpSettingFormEntryItemData(type,itemDataHelper,text,description,icon,parent);\n
|
|
405 |
|
|
406 |
2. Function Descrition: \n
|
|
407 |
\n
|
|
408 |
3. Input Parameters: \n
|
|
409 |
EntryItemType type\n
|
|
410 |
CpItemDataHelper &itemDataHelper\n
|
|
411 |
QString &text\n
|
|
412 |
QString &description\n
|
|
413 |
HbIcon &icon\n
|
|
414 |
HbDataFormModelItem *parent\n
|
|
415 |
|
|
416 |
4. Expected result: \n
|
|
417 |
case run without verify failed.\n
|
|
418 |
*/
|
|
419 |
void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithListTypeAndHelper()
|
|
420 |
{
|
|
421 |
CpItemDataHelper *pHelper1 = new CpItemDataHelper();
|
|
422 |
QVERIFY(pHelper1 != 0);
|
|
423 |
|
|
424 |
CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( CpSettingFormEntryItemData::ListEntryItem, *pHelper1, "text", "description" );
|
|
425 |
QVERIFY( pdataimp1 !=0 );
|
|
426 |
QString strtxt1 = "input texts";
|
|
427 |
pdataimp1->setText(strtxt1);
|
|
428 |
QVERIFY( pdataimp1->text() == strtxt1 );
|
|
429 |
|
|
430 |
QString strDes1 = "input descriptions";
|
|
431 |
pdataimp1->setDescription(strDes1);
|
|
432 |
QVERIFY( pdataimp1->description() == strDes1);
|
|
433 |
|
|
434 |
QString strIconName1 = "input iconname";
|
|
435 |
pdataimp1->setIconName(strIconName1);
|
|
436 |
QVERIFY( pdataimp1->iconName() == strIconName1);
|
|
437 |
|
|
438 |
HbIcon itemIcon1(QString(""));
|
|
439 |
pdataimp1->setEntryItemIcon(itemIcon1);
|
|
440 |
QVERIFY( pdataimp1->entryItemIcon() == itemIcon1);
|
|
441 |
|
|
442 |
delete pdataimp1;
|
|
443 |
delete pHelper1;
|
|
444 |
}
|
|
445 |
|
|
446 |
/*!
|
|
447 |
* Test Case Description:\n
|
|
448 |
* 1. Fucntion Name: \n
|
|
449 |
CpSettingFormEntryItemDataImpl(
|
|
450 |
EntryItemType type,
|
|
451 |
CpItemDataHelper &itemDataHelper,
|
|
452 |
const QString &text = QString(),
|
|
453 |
const QString &description = QString(),
|
|
454 |
const QString &icon = QString(),
|
|
455 |
const HbDataFormModelItem *parent = 0) :
|
|
456 |
CpSettingFormEntryItemData(type,itemDataHelper,text,description,icon,parent);\n
|
|
457 |
|
|
458 |
2. Function Descrition: \n
|
|
459 |
\n
|
|
460 |
3. Input Parameters: \n
|
|
461 |
EntryItemType type\n
|
|
462 |
CpItemDataHelper &itemDataHelper\n
|
|
463 |
QString &text\n
|
|
464 |
QString &description\n
|
|
465 |
HbIcon &icon\n
|
|
466 |
HbDataFormModelItem *parent\n
|
|
467 |
|
|
468 |
4. Expected result: \n
|
|
469 |
case run without verify failed.\n
|
|
470 |
*/
|
|
471 |
void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithButtonTypeAndHelper()
|
|
472 |
{
|
|
473 |
CpItemDataHelper *pHelper1 = new CpItemDataHelper();
|
|
474 |
QVERIFY(pHelper1 != 0);
|
|
475 |
|
|
476 |
CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( CpSettingFormEntryItemData::ButtonEntryItem, *pHelper1, "text", "description" );
|
|
477 |
QVERIFY( pdataimp1 !=0 );
|
|
478 |
QString strtxt1 = "input texts";
|
|
479 |
pdataimp1->setText(strtxt1);
|
|
480 |
QVERIFY( pdataimp1->text() == strtxt1 );
|
|
481 |
|
|
482 |
QString strDes1 = "input descriptions";
|
|
483 |
pdataimp1->setDescription(strDes1);
|
|
484 |
QVERIFY( pdataimp1->description() == strDes1);
|
|
485 |
|
|
486 |
QString strIconName1 = "input iconname";
|
|
487 |
pdataimp1->setIconName(strIconName1);
|
|
488 |
QVERIFY( pdataimp1->iconName() == strIconName1);
|
|
489 |
|
|
490 |
HbIcon itemIcon1(QString(""));
|
|
491 |
pdataimp1->setEntryItemIcon(itemIcon1);
|
|
492 |
QVERIFY( pdataimp1->entryItemIcon() == itemIcon1);
|
|
493 |
|
|
494 |
delete pdataimp1;
|
|
495 |
delete pHelper1;
|
|
496 |
}
|
|
497 |
|
|
498 |
/*!
|
|
499 |
* Test Case Description:\n
|
|
500 |
* 1. Fucntion Name: \n
|
|
501 |
CpSettingFormEntryItemDataImpl(
|
|
502 |
EntryItemType type,
|
|
503 |
CpItemDataHelper &itemDataHelper,
|
|
504 |
const QString &text = QString(),
|
|
505 |
const QString &description = QString(),
|
|
506 |
const QString &icon = QString(),
|
|
507 |
const HbDataFormModelItem *parent = 0) :
|
|
508 |
CpSettingFormEntryItemData(type,itemDataHelper,text,description,icon,parent);\n
|
|
509 |
|
|
510 |
2. Function Descrition: \n
|
|
511 |
\n
|
|
512 |
3. Input Parameters: \n
|
|
513 |
EntryItemType type\n
|
|
514 |
CpItemDataHelper &itemDataHelper\n
|
|
515 |
QString &text\n
|
|
516 |
QString &description\n
|
|
517 |
HbIcon &icon\n
|
|
518 |
HbDataFormModelItem *parent\n
|
|
519 |
|
|
520 |
4. Expected result: \n
|
|
521 |
case run without verify failed.\n
|
|
522 |
*/
|
|
523 |
void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithListTypeAndHelperForm()
|
|
524 |
{
|
|
525 |
HbDataForm * pForm1 = new HbDataForm();
|
|
526 |
QVERIFY(pForm1 != 0);
|
|
527 |
|
|
528 |
CpItemDataHelper *pHelper1 = new CpItemDataHelper(pForm1);
|
|
529 |
QVERIFY(pHelper1 != 0);
|
|
530 |
|
|
531 |
CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( CpSettingFormEntryItemData::ListEntryItem, *pHelper1, "text", "description" );
|
|
532 |
QVERIFY( pdataimp1 !=0 );
|
|
533 |
QString strtxt1 = "input texts";
|
|
534 |
pdataimp1->setText(strtxt1);
|
|
535 |
QVERIFY( pdataimp1->text() == strtxt1 );
|
|
536 |
|
|
537 |
QString strDes1 = "input descriptions";
|
|
538 |
pdataimp1->setDescription(strDes1);
|
|
539 |
QVERIFY( pdataimp1->description() == strDes1);
|
|
540 |
|
|
541 |
QString strIconName1 = "input iconname";
|
|
542 |
pdataimp1->setIconName(strIconName1);
|
|
543 |
QVERIFY( pdataimp1->iconName() == strIconName1);
|
|
544 |
|
|
545 |
HbIcon itemIcon1(QString(""));
|
|
546 |
pdataimp1->setEntryItemIcon(itemIcon1);
|
|
547 |
QVERIFY( pdataimp1->entryItemIcon() == itemIcon1);
|
|
548 |
|
|
549 |
delete pdataimp1;
|
|
550 |
delete pHelper1;
|
|
551 |
delete pForm1;
|
|
552 |
}
|
|
553 |
|
|
554 |
/*!
|
|
555 |
* Test Case Description:\n
|
|
556 |
* 1. Fucntion Name: \n
|
|
557 |
CpSettingFormEntryItemDataImpl(
|
|
558 |
EntryItemType type,
|
|
559 |
CpItemDataHelper &itemDataHelper,
|
|
560 |
const QString &text = QString(),
|
|
561 |
const QString &description = QString(),
|
|
562 |
const QString &icon = QString(),
|
|
563 |
const HbDataFormModelItem *parent = 0) :
|
|
564 |
CpSettingFormEntryItemData(type,itemDataHelper,text,description,icon,parent);\n
|
|
565 |
|
|
566 |
2. Function Descrition: \n
|
|
567 |
\n
|
|
568 |
3. Input Parameters: \n
|
|
569 |
EntryItemType type\n
|
|
570 |
CpItemDataHelper &itemDataHelper\n
|
|
571 |
QString &text\n
|
|
572 |
QString &description\n
|
|
573 |
HbIcon &icon\n
|
|
574 |
HbDataFormModelItem *parent\n
|
|
575 |
|
|
576 |
4. Expected result: \n
|
|
577 |
case run without verify failed.\n
|
|
578 |
*/
|
|
579 |
void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithButtonTypeAndHelperForm()
|
|
580 |
{
|
|
581 |
HbDataForm * pForm1 = new HbDataForm();
|
|
582 |
QVERIFY(pForm1 != 0);
|
|
583 |
|
|
584 |
CpItemDataHelper *pHelper1 = new CpItemDataHelper(pForm1);
|
|
585 |
QVERIFY(pHelper1 != 0);
|
|
586 |
|
|
587 |
CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( CpSettingFormEntryItemData::ButtonEntryItem, *pHelper1, "text", "description" );
|
|
588 |
QVERIFY( pdataimp1 !=0 );
|
|
589 |
QString strtxt1 = "input texts";
|
|
590 |
pdataimp1->setText(strtxt1);
|
|
591 |
QVERIFY( pdataimp1->text() == strtxt1 );
|
|
592 |
|
|
593 |
QString strDes1 = "input descriptions";
|
|
594 |
pdataimp1->setDescription(strDes1);
|
|
595 |
QVERIFY( pdataimp1->description() == strDes1);
|
|
596 |
|
|
597 |
QString strIconName1 = "input iconname";
|
|
598 |
pdataimp1->setIconName(strIconName1);
|
|
599 |
QVERIFY( pdataimp1->iconName() == strIconName1);
|
|
600 |
|
|
601 |
HbIcon itemIcon1(QString(""));
|
|
602 |
pdataimp1->setEntryItemIcon(itemIcon1);
|
|
603 |
QVERIFY( pdataimp1->entryItemIcon() == itemIcon1);
|
|
604 |
|
|
605 |
delete pdataimp1;
|
|
606 |
delete pHelper1;
|
|
607 |
delete pForm1;
|
|
608 |
}
|
|
609 |
|
|
610 |
/*!
|
|
611 |
* Test Case Description:\n
|
|
612 |
* 1. Fucntion Name: \n
|
|
613 |
CpSettingFormEntryItemDataImpl(HbDataForm *dataForm,
|
|
614 |
const QString &text = QString(),
|
|
615 |
const QString &description = QString(),
|
|
616 |
const HbIcon &icon = HbIcon(),
|
|
617 |
const HbDataFormModelItem *parent = 0) :
|
|
618 |
CpSettingFormEntryItemData(dataForm,text,description,icon,parent);\n
|
|
619 |
|
|
620 |
2. Function Descrition: \n
|
|
621 |
\n
|
|
622 |
3. Input Parameters: \n
|
|
623 |
HbDataForm *dataForm\n
|
|
624 |
QString &text\n
|
|
625 |
QString &description\n
|
|
626 |
HbIcon &icon\n
|
|
627 |
HbDataFormModelItem *parent\n
|
|
628 |
|
|
629 |
4. Expected result: \n
|
|
630 |
case run without verify failed.\n
|
|
631 |
*/
|
|
632 |
void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithFormParam()
|
|
633 |
{
|
|
634 |
HbDataForm * form = new HbDataForm();
|
|
635 |
QVERIFY(form != 0);
|
|
636 |
|
|
637 |
CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>(form);
|
|
638 |
QVERIFY( pdataimp1 !=0 );
|
|
639 |
QString strtxt1 = "input texts";
|
|
640 |
pdataimp1->setText(strtxt1);
|
|
641 |
QVERIFY( pdataimp1->text() == strtxt1 );
|
|
642 |
|
|
643 |
QString strDes1 = "input descriptions";
|
|
644 |
pdataimp1->setDescription(strDes1);
|
|
645 |
QVERIFY( pdataimp1->description() == strDes1);
|
|
646 |
delete pdataimp1;
|
|
647 |
delete form;
|
|
648 |
}
|
|
649 |
|
|
650 |
/*!
|
|
651 |
* Test Case Description:\n
|
|
652 |
* 1. Fucntion Name: \n
|
|
653 |
CpSettingFormEntryItemDataImpl(CpItemDataHelper &itemDataHelper,
|
|
654 |
const QString &text = QString(),
|
|
655 |
const QString &description = QString(),
|
|
656 |
const HbIcon &icon = HbIcon(),
|
|
657 |
const HbDataFormModelItem *parent = 0) :
|
|
658 |
CpSettingFormEntryItemData(itemDataHelper,text,description,icon,parent);\n
|
|
659 |
|
|
660 |
2. Function Descrition: \n
|
|
661 |
\n
|
|
662 |
3. Input Parameters: \n
|
|
663 |
CpItemDataHelper &itemDataHelper\n
|
|
664 |
QString &text\n
|
|
665 |
QString &description\n
|
|
666 |
HbIcon &icon\n
|
|
667 |
HbDataFormModelItem *parent\n
|
|
668 |
|
|
669 |
4. Expected result: \n
|
|
670 |
case run without verify failed.\n
|
|
671 |
*/
|
|
672 |
void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithHelperParam()
|
|
673 |
{
|
|
674 |
CpItemDataHelper *pHelper1 = new CpItemDataHelper();
|
|
675 |
QVERIFY(pHelper1 != 0);
|
|
676 |
|
|
677 |
CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>(*pHelper1);
|
|
678 |
QVERIFY( pdataimp1 !=0 );
|
|
679 |
QString strtxt1 = "input texts";
|
|
680 |
pdataimp1->setText(strtxt1);
|
|
681 |
QVERIFY( pdataimp1->text() == strtxt1 );
|
|
682 |
|
|
683 |
QString strDes1 = "input descriptions";
|
|
684 |
pdataimp1->setDescription(strDes1);
|
|
685 |
QVERIFY( pdataimp1->description() == strDes1);
|
|
686 |
delete pdataimp1;
|
|
687 |
delete pHelper1;
|
|
688 |
}
|
|
689 |
|
|
690 |
/*!
|
|
691 |
* Test Case Description:\n
|
|
692 |
* 1. Fucntion Name: \n
|
|
693 |
CpSettingFormEntryItemDataImpl(CpItemDataHelper &itemDataHelper,
|
|
694 |
const QString &text = QString(),
|
|
695 |
const QString &description = QString(),
|
|
696 |
const HbIcon &icon = HbIcon(),
|
|
697 |
const HbDataFormModelItem *parent = 0) :
|
|
698 |
CpSettingFormEntryItemData(itemDataHelper,text,description,icon,parent);\n
|
|
699 |
|
|
700 |
2. Function Descrition: \n
|
|
701 |
\n
|
|
702 |
3. Input Parameters: \n
|
|
703 |
CpItemDataHelper &itemDataHelper\n
|
|
704 |
QString &text\n
|
|
705 |
QString &description\n
|
|
706 |
HbIcon &icon\n
|
|
707 |
HbDataFormModelItem *parent\n
|
|
708 |
|
|
709 |
4. Expected result: \n
|
|
710 |
case run without verify failed.\n
|
|
711 |
*/
|
|
712 |
void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithHelperForm()
|
|
713 |
{
|
|
714 |
HbDataForm * pForm1 = new HbDataForm();
|
|
715 |
QVERIFY(pForm1 != 0);
|
|
716 |
|
|
717 |
CpItemDataHelper *pHelper1 = new CpItemDataHelper(pForm1);
|
|
718 |
QVERIFY(pHelper1 != 0);
|
|
719 |
|
|
720 |
CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>(*pHelper1);
|
|
721 |
QVERIFY( pdataimp1 !=0 );
|
|
722 |
QString strtxt1 = "input texts";
|
|
723 |
pdataimp1->setText(strtxt1);
|
|
724 |
QVERIFY( pdataimp1->text() == strtxt1 );
|
|
725 |
|
|
726 |
QString strDes1 = "input descriptions";
|
|
727 |
pdataimp1->setDescription(strDes1);
|
|
728 |
QVERIFY( pdataimp1->description() == strDes1);
|
|
729 |
delete pdataimp1;
|
|
730 |
delete pHelper1;
|
|
731 |
}
|
|
732 |
|
|
733 |
/*!
|
|
734 |
* Test Case Description:\n
|
|
735 |
* 1. Fucntion Name: \n
|
|
736 |
CpSettingFormEntryItemDataImpl(
|
|
737 |
EntryItemType type,
|
|
738 |
CpItemDataHelper &itemDataHelper,
|
|
739 |
const QString &text = QString(),
|
|
740 |
const QString &description = QString(),
|
|
741 |
const QString &icon = QString(),
|
|
742 |
const HbDataFormModelItem *parent = 0) :
|
|
743 |
CpSettingFormEntryItemData(type,itemDataHelper,text,description,icon,parent);\n
|
|
744 |
|
|
745 |
2. Function Descrition: \n
|
|
746 |
\n
|
|
747 |
3. Input Parameters: \n
|
|
748 |
EntryItemType type\n
|
|
749 |
CpItemDataHelper &itemDataHelper\n
|
|
750 |
QString &text\n
|
|
751 |
QString &description\n
|
|
752 |
HbIcon &icon\n
|
|
753 |
HbDataFormModelItem *parent\n
|
|
754 |
|
|
755 |
4. Expected result: \n
|
|
756 |
case run without verify failed.\n
|
|
757 |
*/
|
|
758 |
void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithListTypeNullPointer()
|
|
759 |
{
|
|
760 |
HbDataForm * pForm1 = new HbDataForm();
|
|
761 |
QVERIFY(pForm1 != 0);
|
|
762 |
|
|
763 |
CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( CpSettingFormEntryItemData::ListEntryItem, 0, "text", "description" );
|
|
764 |
QVERIFY( pdataimp1 !=0 );
|
|
765 |
QString strtxt1 = "input texts";
|
|
766 |
pdataimp1->setText(strtxt1);
|
|
767 |
QVERIFY( pdataimp1->text() == strtxt1 );
|
|
768 |
|
|
769 |
QString strDes1 = "input descriptions";
|
|
770 |
pdataimp1->setDescription(strDes1);
|
|
771 |
QVERIFY( pdataimp1->description() == strDes1);
|
|
772 |
delete pdataimp1;
|
|
773 |
delete pForm1;
|
|
774 |
}
|
|
775 |
|
|
776 |
/*!
|
|
777 |
* Test Case Description:\n
|
|
778 |
* 1. Fucntion Name: \n
|
|
779 |
CpSettingFormEntryItemDataImpl(
|
|
780 |
EntryItemType type,
|
|
781 |
CpItemDataHelper &itemDataHelper,
|
|
782 |
const QString &text = QString(),
|
|
783 |
const QString &description = QString(),
|
|
784 |
const QString &icon = QString(),
|
|
785 |
const HbDataFormModelItem *parent = 0) :
|
|
786 |
CpSettingFormEntryItemData(type,itemDataHelper,text,description,icon,parent);\n
|
|
787 |
|
|
788 |
2. Function Descrition: \n
|
|
789 |
\n
|
|
790 |
3. Input Parameters: \n
|
|
791 |
EntryItemType type\n
|
|
792 |
CpItemDataHelper &itemDataHelper\n
|
|
793 |
QString &text\n
|
|
794 |
QString &description\n
|
|
795 |
HbIcon &icon\n
|
|
796 |
HbDataFormModelItem *parent\n
|
|
797 |
|
|
798 |
4. Expected result: \n
|
|
799 |
case run without verify failed.\n
|
|
800 |
*/
|
|
801 |
void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithButtonTypeNullPointer()
|
|
802 |
{
|
|
803 |
HbDataForm * pForm1 = new HbDataForm();
|
|
804 |
QVERIFY(pForm1 != 0);
|
|
805 |
|
|
806 |
CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( CpSettingFormEntryItemData::ButtonEntryItem, 0, "text", "description" );
|
|
807 |
QVERIFY( pdataimp1 !=0 );
|
|
808 |
QString strtxt1 = "input texts";
|
|
809 |
pdataimp1->setText(strtxt1);
|
|
810 |
QVERIFY( pdataimp1->text() == strtxt1 );
|
|
811 |
|
|
812 |
QString strDes1 = "input descriptions";
|
|
813 |
pdataimp1->setDescription(strDes1);
|
|
814 |
QVERIFY( pdataimp1->description() == strDes1);
|
|
815 |
delete pdataimp1;
|
|
816 |
delete pForm1;
|
|
817 |
}
|
|
818 |
|
|
819 |
/*!
|
|
820 |
* Test Case Description:\n
|
|
821 |
* 1. Fucntion Name: \n
|
|
822 |
CpSettingFormEntryItemDataImpl(
|
|
823 |
EntryItemType type,
|
|
824 |
CpItemDataHelper &itemDataHelper,
|
|
825 |
const QString &text = QString(),
|
|
826 |
const QString &description = QString(),
|
|
827 |
const QString &icon = QString(),
|
|
828 |
const HbDataFormModelItem *parent = 0) :
|
|
829 |
CpSettingFormEntryItemData(type,itemDataHelper,text,description,icon,parent);\n
|
|
830 |
|
|
831 |
2. Function Descrition: \n
|
|
832 |
\n
|
|
833 |
3. Input Parameters: \n
|
|
834 |
EntryItemType type\n
|
|
835 |
CpItemDataHelper &itemDataHelper\n
|
|
836 |
QString &text\n
|
|
837 |
QString &description\n
|
|
838 |
HbIcon &icon\n
|
|
839 |
HbDataFormModelItem *parent\n
|
|
840 |
|
|
841 |
4. Expected result: \n
|
|
842 |
case run without verify failed.\n
|
|
843 |
*/
|
|
844 |
void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithInvalidTypeNullPointer()
|
|
845 |
{
|
|
846 |
HbDataForm * pForm1 = new HbDataForm();
|
|
847 |
QVERIFY(pForm1 != 0);
|
|
848 |
|
|
849 |
CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( CpSettingFormEntryItemData::ButtonEntryItem, 0, "text", "description" );
|
|
850 |
QVERIFY( pdataimp1 !=0 );
|
|
851 |
QString strtxt1 = "input texts";
|
|
852 |
pdataimp1->setText(strtxt1);
|
|
853 |
QVERIFY( pdataimp1->text() == strtxt1 );
|
|
854 |
|
|
855 |
QString strDes1 = "input descriptions";
|
|
856 |
pdataimp1->setDescription(strDes1);
|
|
857 |
QVERIFY( pdataimp1->description() == strDes1);
|
|
858 |
delete pdataimp1;
|
|
859 |
delete pForm1;
|
|
860 |
}
|
|
861 |
|
|
862 |
/*!
|
|
863 |
* Test Case Description:\n
|
|
864 |
* 1. Fucntion Name: \n
|
|
865 |
CpSettingFormEntryItemData(const HbDataFormModelItem *parent);\n
|
|
866 |
|
|
867 |
2. Function Descrition: \n
|
|
868 |
\n
|
|
869 |
3. Input Parameters: \n
|
|
870 |
HbDataFormModelItem *parent\n
|
|
871 |
|
|
872 |
4. Expected result: \n
|
|
873 |
case run without verify failed.\n
|
|
874 |
*/
|
|
875 |
void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithParentParam()
|
|
876 |
{
|
|
877 |
MyCpSettingFormEntryItemData * item = new MyCpSettingFormEntryItemData(0);
|
|
878 |
QVERIFY(item != 0);
|
|
879 |
|
|
880 |
delete item;
|
|
881 |
}
|
|
882 |
|
|
883 |
/*!
|
|
884 |
* Test Case Description:\n
|
|
885 |
* 1. Fucntion Name: \n
|
|
886 |
onLaunchView();\n
|
|
887 |
|
|
888 |
2. Function Descrition: \n
|
|
889 |
\n
|
|
890 |
3. Input Parameters: \n
|
|
891 |
QString &text\n
|
|
892 |
QString &description\n
|
|
893 |
HbIcon &icon\n
|
|
894 |
HbDataFormModelItem *parent\n
|
|
895 |
|
|
896 |
4. Expected result: \n
|
|
897 |
case run without verify failed.\n
|
|
898 |
*/
|
|
899 |
void TestCpSettingFormEntryItemData::testOnLaunchViewNoParam()
|
|
900 |
{
|
|
901 |
HbDataForm *pForm2 = new HbDataForm(0);
|
|
902 |
QVERIFY(pForm2 != 0);
|
|
903 |
|
|
904 |
CpItemDataHelper *pHelper2 = new CpItemDataHelper(pForm2);
|
|
905 |
QVERIFY( pHelper2 != 0 );
|
|
906 |
|
|
907 |
CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp2 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( *pHelper2, "text", "description" );
|
|
908 |
QVERIFY( pdataimp2 !=0 );
|
|
909 |
|
|
910 |
pdataimp2->onLaunchView();
|
|
911 |
pdataimp2->onLaunchView();
|
|
912 |
|
|
913 |
QString strtxt2 = "input texts";
|
|
914 |
pdataimp2->setText(strtxt2);
|
|
915 |
QVERIFY( pdataimp2->text() == strtxt2 );
|
|
916 |
|
|
917 |
QString strDes2 = "input descriptions";
|
|
918 |
pdataimp2->setDescription(strDes2);
|
|
919 |
QVERIFY( pdataimp2->description() == strDes2);
|
|
920 |
|
|
921 |
delete pdataimp2;
|
|
922 |
delete pHelper2;
|
|
923 |
delete pForm2;
|
|
924 |
}
|
|
925 |
|
|
926 |
QTEST_MAIN(TestCpSettingFormEntryItemData)
|