15 * |
15 * |
16 */ |
16 */ |
17 #include <QTest> |
17 #include <QTest> |
18 #include <QDebug> |
18 #include <QDebug> |
19 #include <QSignalSpy> |
19 #include <QSignalSpy> |
20 |
20 #include <QMetaType> |
|
21 |
|
22 #include "cxutils.h" |
21 #include "cxetestutils.h" |
23 #include "cxetestutils.h" |
22 #include "cxefakesettingsmodel.h" |
24 #include "cxefakesettingsstore.h" |
23 #include "unittest_cxesettingsimp.h" |
25 #include "unittest_cxesettingsimp.h" |
|
26 #include "cxecenrepkeys.h" |
24 |
27 |
25 const char* FAIL_TEST_SETTING = "Fail test"; |
28 const char* FAIL_TEST_SETTING = "Fail test"; |
|
29 const char* EMPTY_STRING = ""; |
|
30 const int CAMERA_MODE_STILL = 0; |
|
31 const int CAMERA_MODE_VIDEO = 1; |
|
32 //Default EV compensation value for auto still and auto video scene mode |
|
33 const int SCENE_AUTO_EV_VALUE = 0; |
|
34 const int SIGNAL_TIMEOUT = 3000; //milliseconds |
26 |
35 |
27 UnitTestCxeSettingsImp::UnitTestCxeSettingsImp() : |
36 UnitTestCxeSettingsImp::UnitTestCxeSettingsImp() : |
28 mSettingsModel(NULL), |
37 mSettingsImp(NULL), mSettingsStore(NULL) |
29 mSettingsImp(NULL) |
|
30 { |
38 { |
31 qRegisterMetaType<CxeScene>("CxeScene"); |
39 qRegisterMetaType<CxeScene>("CxeScene"); |
32 qRegisterMetaType<CxeError::Id>("CxeError::Id"); |
40 qRegisterMetaType<CxeError::Id>("CxeError::Id"); |
33 qRegisterMetaType<Cxe::CameraMode>("Cxe::CameraMode"); |
41 qRegisterMetaType<Cxe::CameraMode>("Cxe::CameraMode"); |
34 } |
42 } |
35 |
43 |
36 UnitTestCxeSettingsImp::~UnitTestCxeSettingsImp() |
44 UnitTestCxeSettingsImp::~UnitTestCxeSettingsImp() |
37 { |
45 { |
38 cleanup(); |
|
39 } |
46 } |
40 |
47 |
41 void UnitTestCxeSettingsImp::init() |
48 void UnitTestCxeSettingsImp::init() |
42 { |
49 { |
43 mSettingsModel = new CxeFakeSettingsModel; |
50 mSettingsStore = new CxeFakeSettingsStore(); |
44 mSettingsImp = new CxeSettingsImp(*mSettingsModel); |
51 mSettingsImp = new CxeSettingsImp(mSettingsStore); |
45 } |
52 } |
46 |
53 |
47 void UnitTestCxeSettingsImp::cleanup() |
54 void UnitTestCxeSettingsImp::cleanup() |
48 { |
55 { |
49 delete mSettingsModel; |
|
50 mSettingsModel = NULL; |
|
51 |
|
52 delete mSettingsImp; |
56 delete mSettingsImp; |
53 mSettingsImp = NULL; |
57 mSettingsImp = NULL; |
54 } |
58 } |
55 |
59 |
56 void UnitTestCxeSettingsImp::testLoadSettings() |
60 /* |
57 { |
61 * Testing loadSettings() with Cxe::ImageMode argument |
58 Cxe::CameraMode mode; |
62 */ |
59 |
63 void UnitTestCxeSettingsImp::testLoadImageSettings() |
60 /* Observe sceneChanged signal from mSettingsImp |
64 { |
61 */ |
65 CX_DEBUG_ENTER_FUNCTION(); |
62 CxeScene sigSce; |
66 QSignalSpy spy(mSettingsImp, SIGNAL(settingValueChanged(QString,QVariant))); |
63 QSignalSpy spyStateChange(mSettingsImp, SIGNAL(sceneChanged(CxeScene &))); |
|
64 QVERIFY( spyStateChange.isValid() ); |
|
65 |
|
66 /* Test load settings in camera/video mode. Helpper method is used to get the |
|
67 * new camera mode to test loadSettings method has set right camera mode |
|
68 */ |
|
69 mSettingsImp->loadSettings(Cxe::ImageMode); |
67 mSettingsImp->loadSettings(Cxe::ImageMode); |
70 mode = mSettingsModel->getDummyCameraMode(); |
68 |
71 QCOMPARE(mode, Cxe::ImageMode); |
69 //signal should be emitted when loading settings |
72 QVERIFY(CxeTestUtils::waitForSignal(spyStateChange, 1000)); // verify statechanges |
70 QVERIFY(spy.count() > 0); |
73 |
71 |
|
72 //now let's take a look inside a signal content |
|
73 QList<QVariant> arguments = spy.takeFirst(); |
|
74 QVERIFY(arguments.at(0).toString().toAscii() == CxeSettingIds::IMAGE_SCENE); |
|
75 CX_DEBUG_EXIT_FUNCTION(); |
|
76 } |
|
77 |
|
78 /* |
|
79 * Testing loadSettings() with Cxe::VideoMode argument |
|
80 */ |
|
81 void UnitTestCxeSettingsImp::testLoadVideoSettings() |
|
82 { |
|
83 CX_DEBUG_ENTER_FUNCTION(); |
|
84 QSignalSpy spy(mSettingsImp, SIGNAL(settingValueChanged(QString,QVariant))); |
74 mSettingsImp->loadSettings(Cxe::VideoMode); |
85 mSettingsImp->loadSettings(Cxe::VideoMode); |
75 mode = mSettingsModel->getDummyCameraMode(); |
86 |
76 QCOMPARE(mode, Cxe::VideoMode); |
87 //signal should be emitted when loading settings |
77 QVERIFY(CxeTestUtils::waitForSignal(spyStateChange, 1000)); // verify statechanges |
88 QVERIFY(spy.count() > 0); |
78 } |
89 |
79 |
90 //now let's take a look inside a signal content |
80 |
91 QList<QVariant> arguments = spy.takeFirst(); |
|
92 QVERIFY(arguments.at(0).toString().toAscii() == CxeSettingIds::VIDEO_SCENE); |
|
93 |
|
94 CX_DEBUG_EXIT_FUNCTION(); |
|
95 } |
|
96 |
|
97 /* |
|
98 * Advanced test case for loadSettings() |
|
99 */ |
|
100 void UnitTestCxeSettingsImp::testLoadImageAndVideoSettings() |
|
101 { |
|
102 CX_DEBUG_ENTER_FUNCTION(); |
|
103 QSignalSpy spy(mSettingsImp, SIGNAL(settingValueChanged(QString,QVariant))); |
|
104 mSettingsImp->loadSettings(Cxe::VideoMode); |
|
105 |
|
106 //signal should be emitted when loading settings |
|
107 QVERIFY(spy.count() > 0); |
|
108 |
|
109 //now let's take a look inside a signal content |
|
110 QList<QVariant> arguments = spy.takeFirst(); |
|
111 QVERIFY(arguments.at(0).toString().toAscii() == CxeSettingIds::VIDEO_SCENE); |
|
112 spy.clear(); |
|
113 |
|
114 mSettingsImp->loadSettings(Cxe::ImageMode); |
|
115 |
|
116 //signal should be emitted when loading settings |
|
117 QVERIFY(spy.count() > 0); |
|
118 |
|
119 //now let's take a look inside a signal content |
|
120 arguments = spy.takeFirst(); |
|
121 QVERIFY(arguments.at(0).toString().toAscii() == CxeSettingIds::IMAGE_SCENE); |
|
122 |
|
123 CX_DEBUG_EXIT_FUNCTION(); |
|
124 } |
|
125 |
|
126 /* |
|
127 * Testing inline get(const QString &key) |
|
128 * defined in cxesettings.h as template |
|
129 */ |
81 void UnitTestCxeSettingsImp::testGet() |
130 void UnitTestCxeSettingsImp::testGet() |
82 { |
131 { |
|
132 CX_DEBUG_ENTER_FUNCTION(); |
83 CxeError::Id err = CxeError::None; |
133 CxeError::Id err = CxeError::None; |
84 |
134 |
85 QString stringValue; |
135 // The idea of this test case is to test as much of different type of settings |
86 QString expectedValue = "1"; |
136 // as possible |
|
137 |
|
138 // Testing reading brightness setting value |
|
139 int brightnessValue; |
87 QVariant testValue; |
140 QVariant testValue; |
88 |
141 |
89 /* Test that get -method accepts key and returns correct value. Fakeclass method |
142 try { |
90 * is used to check that returned value matches with fakeclass' test values |
143 brightnessValue = mSettingsImp->CxeSettings::get<int>(CxeSettingIds::BRIGHTNESS); |
91 */ |
144 } |
92 err = mSettingsImp->get(CxeSettingIds::BRIGHTNESS, stringValue); |
145 catch (CxeException exception) { |
93 QCOMPARE(err, CxeError::None); |
146 QString message = "Exception thrown, error id = "; |
94 mSettingsModel->getSettingValue(CxeSettingIds::BRIGHTNESS, testValue); |
147 message.append(exception.error()); |
95 QCOMPARE(stringValue, QString(testValue.toString())); |
148 QFAIL(message.toAscii()); |
96 |
149 return; |
97 /* Test that returned value can be viewed as string and int, since get -method |
150 } |
98 * may be used for both strings and integers |
151 |
99 */ |
152 mSettingsStore->get(CxeSettingIds::BRIGHTNESS, testValue); |
100 int num = 1; |
153 QCOMPARE(brightnessValue, testValue.toInt()); |
101 QCOMPARE(stringValue, expectedValue); |
154 |
102 QVERIFY(stringValue.toInt() == num); |
155 // Testing reading color tone setting value |
103 |
156 Cxe::Colortone colorTone; |
104 err = mSettingsImp->get(CxeSettingIds::COLOR_TONE, stringValue); |
157 try { |
105 QCOMPARE(err, CxeError::None); |
158 colorTone = mSettingsImp->CxeSettings::get<Cxe::Colortone>(CxeSettingIds::COLOR_TONE); |
106 mSettingsModel->getSettingValue(CxeSettingIds::COLOR_TONE, testValue); |
159 } |
107 QCOMPARE(stringValue, QString(testValue.toString())); |
160 catch (CxeException exception) { |
108 |
161 QString message = "Exception thrown, error id = "; |
109 err = mSettingsImp->get(CxeSettingIds::CONTRAST, stringValue); |
162 message.append(exception.error()); |
110 QCOMPARE(err, CxeError::None); |
163 QFAIL(message.toAscii()); |
111 mSettingsModel->getSettingValue(CxeSettingIds::CONTRAST, testValue); |
164 return; |
112 QCOMPARE(stringValue, QString(testValue.toString())); |
165 } |
113 |
166 |
114 err = mSettingsImp->get(CxeSettingIds::EV_COMPENSATION_VALUE, stringValue); |
167 QVariant colorTone2; |
115 QCOMPARE(err, CxeError::None); |
168 mSettingsStore->get(CxeSettingIds::COLOR_TONE, colorTone2); |
116 mSettingsModel->getSettingValue(CxeSettingIds::EV_COMPENSATION_VALUE, testValue); |
169 QVERIFY(colorTone2 == colorTone); |
117 QCOMPARE(stringValue, QString(testValue.toString())); |
170 |
118 |
171 // Testing reading contrast setting value |
119 err = mSettingsImp->get(CxeSettingIds::EXPOSURE_MODE, stringValue); |
172 int contrastValue; |
120 QCOMPARE(err, CxeError::None); |
173 try { |
121 mSettingsModel->getSettingValue(CxeSettingIds::EXPOSURE_MODE, testValue); |
174 contrastValue = mSettingsImp->CxeSettings::get<int>(CxeSettingIds::CONTRAST); |
122 QCOMPARE(stringValue, QString(testValue.toString())); |
175 } |
123 |
176 catch (CxeException exception) { |
124 err = mSettingsImp->get(CxeSettingIds::FLASH_MODE, stringValue); |
177 QString message = "Exception thrown, error id = "; |
125 QCOMPARE(err, CxeError::None); |
178 message.append(exception.error()); |
126 mSettingsModel->getSettingValue(CxeSettingIds::FLASH_MODE, testValue); |
179 QFAIL(message.toAscii()); |
127 QCOMPARE(stringValue, QString(testValue.toString())); |
180 return; |
128 |
181 } |
129 err = mSettingsImp->get(CxeSettingIds::FNAME_FOLDER_SUFFIX, stringValue); |
182 |
130 QCOMPARE(err, CxeError::None); |
183 mSettingsStore->get(CxeSettingIds::CONTRAST, testValue); |
131 mSettingsModel->getSettingValue(CxeSettingIds::FNAME_FOLDER_SUFFIX, testValue); |
184 QCOMPARE(testValue.toInt(), contrastValue); |
132 QCOMPARE(stringValue, QString(testValue.toString())); |
185 |
133 |
186 // Testing reading file name folder suffix setting value |
134 err = mSettingsImp->get(CxeSettingIds::FNAME_IMAGE_COUNTER, stringValue); |
187 QString fnameValue; |
135 QCOMPARE(err, CxeError::None); |
188 try { |
136 mSettingsModel->getSettingValue(CxeSettingIds::FNAME_IMAGE_COUNTER, testValue); |
189 fnameValue = mSettingsImp->CxeSettings::get<QString>(CxeSettingIds::FNAME_FOLDER_SUFFIX); |
137 QCOMPARE(stringValue, QString(testValue.toString())); |
190 } |
138 |
191 catch (CxeException exception) { |
139 err = mSettingsImp->get(CxeSettingIds::FNAME_MONTH_FOLDER, stringValue); |
192 QString message = "Exception thrown, error id = "; |
140 QCOMPARE(err, CxeError::None); |
193 message.append(exception.error()); |
141 mSettingsModel->getSettingValue(CxeSettingIds::FNAME_MONTH_FOLDER, testValue); |
194 QFAIL(message.toAscii()); |
142 QCOMPARE(stringValue, QString(testValue.toString())); |
195 return; |
143 |
196 } |
144 err = mSettingsImp->get(CxeSettingIds::FNAME_VIDEO_COUNTER, stringValue); |
197 |
145 QCOMPARE(err, CxeError::None); |
198 mSettingsStore->get(CxeSettingIds::FNAME_FOLDER_SUFFIX, testValue); |
146 mSettingsModel->getSettingValue(CxeSettingIds::FNAME_VIDEO_COUNTER, testValue); |
199 QCOMPARE(testValue.toString(), fnameValue); |
147 QCOMPARE(stringValue, QString(testValue.toString())); |
200 |
148 |
201 // Testing reading scene data |
149 err = mSettingsImp->get(CxeSettingIds::FOCAL_RANGE, stringValue); |
202 QVariantMap sceneData; |
150 QCOMPARE(err, CxeError::None); |
203 |
151 mSettingsModel->getSettingValue(CxeSettingIds::FOCAL_RANGE, testValue); |
204 // First set the still camera scene to auto |
152 QCOMPARE(stringValue, QString(testValue.toString())); |
205 mSettingsStore->set(CxeSettingIds::IMAGE_SCENE, Cxe::IMAGE_SCENE_AUTO); |
153 |
206 |
154 err = mSettingsImp->get(CxeSettingIds::FRAME_RATE, stringValue); |
207 try { |
155 QCOMPARE(err, CxeError::None); |
208 sceneData = mSettingsImp->CxeSettings::get<QVariantMap>(CxeSettingIds::IMAGE_SCENE_DATA); |
156 mSettingsModel->getSettingValue(CxeSettingIds::FRAME_RATE, testValue); |
209 } |
157 QCOMPARE(stringValue, QString(testValue.toString())); |
210 catch (CxeException exception) { |
158 |
211 QString message = "Exception thrown, error id = "; |
159 err = mSettingsImp->get(CxeSettingIds::IMAGE_QUALITY, stringValue); |
212 message.append(exception.error()); |
160 QCOMPARE(err, CxeError::None); |
213 QFAIL(message.toAscii()); |
161 mSettingsModel->getSettingValue(CxeSettingIds::IMAGE_QUALITY, testValue); |
214 return; |
162 QCOMPARE(stringValue, QString(testValue.toString())); |
215 } |
163 |
216 |
164 err = mSettingsImp->get(CxeSettingIds::IMAGE_SCENE, stringValue); |
217 QCOMPARE(sceneData[CxeSettingIds::EV_COMPENSATION_VALUE].toInt(), SCENE_AUTO_EV_VALUE); |
165 QCOMPARE(err, CxeError::None); |
218 |
166 CxeScene scene = mSettingsModel->currentImageScene(); |
219 // Now let's try same with video scene |
167 QCOMPARE(stringValue, scene[CxeSettingIds::SCENE_ID].toString()); |
220 sceneData.clear(); |
168 |
221 mSettingsStore->set(CxeSettingIds::VIDEO_SCENE, Cxe::VIDEO_SCENE_AUTO); |
169 err = mSettingsImp->get(CxeSettingIds::LIGHT_SENSITIVITY, stringValue); |
222 try { |
170 QCOMPARE(err, CxeError::None); |
223 sceneData = mSettingsImp->CxeSettings::get<QVariantMap>(CxeSettingIds::VIDEO_SCENE_DATA); |
171 mSettingsModel->getSettingValue(CxeSettingIds::LIGHT_SENSITIVITY, testValue); |
224 } |
172 QCOMPARE(stringValue, QString(testValue.toString())); |
225 catch (CxeException exception) { |
173 |
226 QString message = "Exception thrown, error id = "; |
174 err = mSettingsImp->get(CxeSettingIds::SCENE_ID, stringValue); |
227 message.append(exception.error()); |
175 QCOMPARE(err, CxeError::None); |
228 QFAIL(message.toAscii()); |
176 mSettingsModel->getSettingValue(CxeSettingIds::SCENE_ID, testValue); |
229 return; |
177 QCOMPARE(stringValue, QString(testValue.toString())); |
230 } |
178 |
231 |
179 err = mSettingsImp->get(CxeSettingIds::SECONDARY_CAMERA, stringValue); |
232 QCOMPARE(sceneData[CxeSettingIds::EV_COMPENSATION_VALUE].toInt(), SCENE_AUTO_EV_VALUE); |
180 QCOMPARE(err, CxeError::None); |
233 |
181 mSettingsModel->getSettingValue(CxeSettingIds::SECONDARY_CAMERA, testValue); |
234 CX_DEBUG_EXIT_FUNCTION(); |
182 QCOMPARE(stringValue, QString(testValue.toString())); |
235 } |
183 |
236 |
184 err = mSettingsImp->get(CxeSettingIds::SELF_TIMER, stringValue); |
237 /* |
185 QCOMPARE(err, CxeError::None); |
238 * Testing get(long int uid, |
186 mSettingsModel->getSettingValue(CxeSettingIds::SELF_TIMER, testValue); |
239 * unsigned long int key, |
187 QCOMPARE(stringValue, QString(testValue.toString())); |
240 * Cxe::SettingKeyType type, |
188 |
241 * QVariant &value) |
189 err = mSettingsImp->get(CxeSettingIds::SHARPNESS, stringValue); |
242 */ |
190 QCOMPARE(err, CxeError::None); |
|
191 mSettingsModel->getSettingValue(CxeSettingIds::SHARPNESS, testValue); |
|
192 QCOMPARE(stringValue, QString(testValue.toString())); |
|
193 |
|
194 err = mSettingsImp->get(CxeSettingIds::VIDEO_SCENE, stringValue); |
|
195 QCOMPARE(err, CxeError::None); |
|
196 scene = mSettingsModel->currentVideoScene(); |
|
197 QCOMPARE(stringValue, scene[CxeSettingIds::SCENE_ID].toString()); |
|
198 |
|
199 err = mSettingsImp->get(CxeSettingIds::WHITE_BALANCE, stringValue); |
|
200 QCOMPARE(err, CxeError::None); |
|
201 mSettingsModel->getSettingValue(CxeSettingIds::WHITE_BALANCE, testValue); |
|
202 QCOMPARE(stringValue, QString(testValue.toString())); |
|
203 |
|
204 /* Test error values |
|
205 */ |
|
206 err = mSettingsImp->get(FAIL_TEST_SETTING , stringValue); |
|
207 QCOMPARE(err, CxeError::NotFound); |
|
208 } |
|
209 |
|
210 void UnitTestCxeSettingsImp::testGet2() |
243 void UnitTestCxeSettingsImp::testGet2() |
211 { |
244 { |
|
245 CX_DEBUG_ENTER_FUNCTION(); |
212 QVariant value; |
246 QVariant value; |
213 QVariant reference; |
247 |
214 |
248 mSettingsImp->get(CxSettingsCrUid, FileNameSuffixCr, Cxe::Repository, value); |
215 mSettingsImp->get(0, 0, Cxe::Repository, value); |
249 // 42 is just a test value from cxefakesettingsstore |
216 mSettingsModel->getSettingValue(0, 0, Cxe::Repository, reference); |
250 // we just check that it is correctly returned |
217 QCOMPARE(value, reference); |
251 QCOMPARE(value.toInt(), 42); |
218 |
252 |
219 mSettingsImp->get(0, 0, Cxe::PublishAndSubscribe, value); |
253 mSettingsImp->get(0, 0, Cxe::PublishAndSubscribe, value); |
220 mSettingsModel->getSettingValue(0, 0, Cxe::PublishAndSubscribe, reference); |
254 // 42 is just a test value from cxefakesettingsstore |
221 QCOMPARE(value, reference); |
255 // we just check that it is correctly returned |
222 |
256 QCOMPARE(value.toInt(), 42); |
223 } |
257 CX_DEBUG_EXIT_FUNCTION(); |
224 |
258 } |
|
259 |
|
260 /* |
|
261 * Testing get(const QString &key, const T &defaultValue) |
|
262 * defined in cxesettings.h as template |
|
263 */ |
|
264 void UnitTestCxeSettingsImp::testGet3() |
|
265 { |
|
266 CX_DEBUG_ENTER_FUNCTION(); |
|
267 Cxe::Colortone defaultTone = Cxe::ColortoneNormal; |
|
268 mSettingsStore->set(CxeSettingIds::COLOR_TONE, Cxe::ColortoneVivid); |
|
269 Cxe::Colortone colorTone = mSettingsImp->CxeSettings::get<Cxe::Colortone>( |
|
270 CxeSettingIds::COLOR_TONE, defaultTone); |
|
271 QVERIFY(colorTone == Cxe::ColortoneVivid); |
|
272 |
|
273 // Now when using this version of the overloaded get<int>() |
|
274 // with invalid key parameter, it should internally |
|
275 // catch the exception and not modify the default value |
|
276 int defaultValue = 0; |
|
277 int value = mSettingsImp->CxeSettings::get<int>( |
|
278 FAIL_TEST_SETTING, defaultValue); |
|
279 QVERIFY(value == defaultValue); |
|
280 CX_DEBUG_EXIT_FUNCTION(); |
|
281 } |
|
282 |
|
283 /* |
|
284 * Testing inputting some garbage into CxeSettingsImp::get() |
|
285 */ |
|
286 void UnitTestCxeSettingsImp::testGetGarbage() |
|
287 { |
|
288 CX_DEBUG_ENTER_FUNCTION(); |
|
289 int intTestValue = 0; |
|
290 CxeError::Id errorId; |
|
291 |
|
292 try { |
|
293 mSettingsImp->CxeSettings::get<int>(EMPTY_STRING, intTestValue); |
|
294 } |
|
295 catch (CxeException exception) { |
|
296 QString message = "Exception thrown, error id = "; |
|
297 message.append(exception.error()); |
|
298 errorId = CxeError::Id(exception.error()); |
|
299 QCOMPARE(errorId, CxeError::NotFound); |
|
300 } |
|
301 |
|
302 try { |
|
303 mSettingsImp->CxeSettings::get<int>(FAIL_TEST_SETTING, intTestValue); |
|
304 } |
|
305 catch (CxeException exception) { |
|
306 QString message = "Exception thrown, error id = "; |
|
307 message.append(exception.error()); |
|
308 errorId = CxeError::Id(exception.error()); |
|
309 QCOMPARE(errorId, CxeError::NotFound); |
|
310 } |
|
311 |
|
312 CX_DEBUG_EXIT_FUNCTION(); |
|
313 } |
|
314 |
|
315 /* |
|
316 * Testing inline void set(const QString &key, const T &value) |
|
317 * defined in cxesettings.h |
|
318 */ |
225 void UnitTestCxeSettingsImp::testSet() |
319 void UnitTestCxeSettingsImp::testSet() |
226 { |
320 { |
227 CxeError::Id error; |
321 CX_DEBUG_ENTER_FUNCTION(); |
228 int range = 0; |
322 |
229 QString string = ""; |
323 // Point of this test case is to try all versions of the set() |
230 QVariant variant(1); |
324 // method defined in cxesettings.inl |
231 QVariant checkValue; |
325 |
232 |
326 // Testing set<int>() version |
233 /* Test that signal is corresponding correctly when setting value is changed |
327 QVariant value; |
234 */ |
328 try { |
235 QList<QVariant> spyArguments; |
329 mSettingsImp->set(CxeSettingIds::COLOR_TONE, Cxe::ColortoneBlackAndWhite); |
236 QSignalSpy signalSpy(mSettingsImp, SIGNAL(settingValueChanged(QString, QVariant))); |
330 } |
237 QVERIFY( signalSpy.isValid() ); |
331 catch (CxeException exception) { |
238 |
332 QString message = "Exception thrown, error id = "; |
239 error = mSettingsImp->set(CxeSettingIds::BRIGHTNESS, range); |
333 message.append(exception.error()); |
|
334 QFAIL(message.toAscii()); |
|
335 return; |
|
336 } |
|
337 mSettingsStore->get(CxeSettingIds::COLOR_TONE, value); |
|
338 QCOMPARE(value.toInt(), (int)Cxe::ColortoneBlackAndWhite); |
|
339 |
|
340 // Testing set<QString>() version |
|
341 QString stringValue = "some text"; |
|
342 try { |
|
343 mSettingsImp->set(CxeSettingIds::FNAME_FOLDER_SUFFIX, stringValue); |
|
344 } |
|
345 catch (CxeException exception) { |
|
346 QString message = "Exception thrown, error id = "; |
|
347 message.append(exception.error()); |
|
348 QFAIL(message.toAscii()); |
|
349 return; |
|
350 } |
|
351 mSettingsStore->get(CxeSettingIds::FNAME_FOLDER_SUFFIX, value); |
|
352 QCOMPARE(value.toString(), stringValue); |
|
353 |
|
354 // Testing set<bool>() version |
|
355 bool boolValue = true; |
|
356 try { |
|
357 mSettingsImp->set(CxeSettingIds::STILL_SHOWCAPTURED, boolValue); |
|
358 } |
|
359 catch (CxeException exception) { |
|
360 QString message = "Exception thrown, error id = "; |
|
361 message.append(exception.error()); |
|
362 QFAIL(message.toAscii()); |
|
363 return; |
|
364 } |
|
365 mSettingsStore->get(CxeSettingIds::STILL_SHOWCAPTURED, value); |
|
366 QCOMPARE(value.toBool(), boolValue); |
|
367 |
|
368 // Testing set<qreal>() version |
|
369 qreal qrealValue = -1.25; |
|
370 try { |
|
371 mSettingsImp->set(CxeSettingIds::EV_COMPENSATION_VALUE, qrealValue); |
|
372 } |
|
373 catch (CxeException exception) { |
|
374 QString message = "Exception thrown, error id = "; |
|
375 message.append(exception.error()); |
|
376 QFAIL(message.toAscii()); |
|
377 return; |
|
378 } |
|
379 mSettingsStore->get(CxeSettingIds::EV_COMPENSATION_VALUE, value); |
|
380 QCOMPARE(value.toReal(), qrealValue); |
|
381 |
|
382 // Testing set<QVariantMap>() version |
|
383 CxeScene testSceneData; |
|
384 |
|
385 testSceneData.insert(CxeSettingIds::SCENE_ID, Cxe::IMAGE_SCENE_AUTO); |
|
386 testSceneData.insert(CxeSettingIds::WHITE_BALANCE, Cxe::WhitebalanceAutomatic); |
|
387 testSceneData.insert(CxeSettingIds::EXPOSURE_MODE, Cxe::ExposureAuto); |
|
388 testSceneData.insert(CxeSettingIds::COLOR_TONE, Cxe::ColortoneNormal); |
|
389 testSceneData.insert(CxeSettingIds::CONTRAST, 5); |
|
390 testSceneData.insert(CxeSettingIds::SHARPNESS, Cxe::SharpnessNormal); |
|
391 testSceneData.insert(CxeSettingIds::LIGHT_SENSITIVITY, Cxe::LightSensitivityAutomatic); |
|
392 testSceneData.insert(CxeSettingIds::EV_COMPENSATION_VALUE, -2); |
|
393 testSceneData.insert(CxeSettingIds::BRIGHTNESS, 8); |
|
394 testSceneData.insert(CxeSettingIds::FLASH_MODE, Cxe::FlashAuto); |
|
395 testSceneData.insert(CxeSettingIds::FACE_TRACKING, 1); |
|
396 |
|
397 // First set the still camera scene to auto |
|
398 mSettingsStore->set(CxeSettingIds::IMAGE_SCENE, Cxe::IMAGE_SCENE_AUTO); |
|
399 |
|
400 // Now setting the value |
|
401 try { |
|
402 //This should throw an exception with CxeError::NotSupported |
|
403 mSettingsImp->set(CxeSettingIds::IMAGE_SCENE_DATA, testSceneData); |
|
404 } |
|
405 catch (CxeException exception) { |
|
406 QString message = "Exception thrown, error id = "; |
|
407 message.append((int)exception.error()); |
|
408 QCOMPARE(exception.error(), (int)CxeError::NotSupported); |
|
409 } |
|
410 |
|
411 CX_DEBUG_EXIT_FUNCTION(); |
|
412 } |
|
413 |
|
414 /* |
|
415 * This will test calling void method of reset() |
|
416 */ |
|
417 void UnitTestCxeSettingsImp::testReset() |
|
418 { |
|
419 CX_DEBUG_ENTER_FUNCTION(); |
|
420 mSettingsImp->reset(); |
|
421 CX_DEBUG_EXIT_FUNCTION(); |
|
422 } |
|
423 |
|
424 void UnitTestCxeSettingsImp::testGetVariationSetting() |
|
425 { |
|
426 CX_DEBUG_ENTER_FUNCTION(); |
|
427 QVariant value; |
|
428 CxeError::Id error = mSettingsImp->getVariationValue(CxeVariationKeys::STILL_MAX_ZOOM_LIMITS, value); |
240 QCOMPARE(error, CxeError::None); |
429 QCOMPARE(error, CxeError::None); |
241 QVERIFY(CxeTestUtils::waitForSignal(signalSpy, 1000)); // verify statechanges |
430 |
242 |
431 error = mSettingsImp->getVariationValue(FAIL_TEST_SETTING, value); |
243 spyArguments = signalSpy.takeFirst(); |
|
244 QCOMPARE(spyArguments.at(0).toString(), QString(CxeSettingIds::BRIGHTNESS)); |
|
245 QCOMPARE(spyArguments.at(1).toInt(), range); |
|
246 |
|
247 /* Test parameters |
|
248 */ |
|
249 error = mSettingsImp->set(CxeSettingIds::BRIGHTNESS, range); |
|
250 QCOMPARE(error, CxeError::None); |
|
251 mSettingsModel->getSettingValue(CxeSettingIds::BRIGHTNESS, checkValue); |
|
252 QCOMPARE(int(checkValue.toInt()), range); |
|
253 |
|
254 error = mSettingsImp->set(CxeSettingIds::COLOR_TONE, Cxe::ColortoneNormal); |
|
255 QCOMPARE(error, CxeError::None); |
|
256 mSettingsModel->getSettingValue(CxeSettingIds::COLOR_TONE, checkValue); |
|
257 QCOMPARE(int(checkValue.toInt()), ((int)Cxe::ColortoneNormal)); |
|
258 |
|
259 error = mSettingsImp->set(CxeSettingIds::COLOR_TONE, Cxe::ColortoneSepia); |
|
260 QCOMPARE(error, CxeError::None); |
|
261 mSettingsModel->getSettingValue(CxeSettingIds::COLOR_TONE, checkValue); |
|
262 QCOMPARE(int(checkValue.toInt()), ((int)Cxe::ColortoneSepia)); |
|
263 |
|
264 error = mSettingsImp->set(CxeSettingIds::COLOR_TONE, Cxe::ColortoneNegative); |
|
265 QCOMPARE(error, CxeError::None); |
|
266 mSettingsModel->getSettingValue(CxeSettingIds::COLOR_TONE, checkValue); |
|
267 QCOMPARE(int(checkValue.toInt()), ((int)Cxe::ColortoneNegative)); |
|
268 |
|
269 error = mSettingsImp->set(CxeSettingIds::COLOR_TONE, Cxe::ColortoneBlackAndWhite); |
|
270 QCOMPARE(error, CxeError::None); |
|
271 mSettingsModel->getSettingValue(CxeSettingIds::COLOR_TONE, checkValue); |
|
272 QCOMPARE(int(checkValue.toInt()), ((int)Cxe::ColortoneBlackAndWhite)); |
|
273 |
|
274 error = mSettingsImp->set(CxeSettingIds::COLOR_TONE, Cxe::ColortoneVivid); |
|
275 QCOMPARE(error, CxeError::None); |
|
276 mSettingsModel->getSettingValue(CxeSettingIds::COLOR_TONE, checkValue); |
|
277 QCOMPARE(int(checkValue.toInt()), ((int)Cxe::ColortoneVivid)); |
|
278 |
|
279 error = mSettingsImp->set(CxeSettingIds::CONTRAST, range); |
|
280 QCOMPARE(error, CxeError::None); |
|
281 mSettingsModel->getSettingValue(CxeSettingIds::CONTRAST, checkValue); |
|
282 QCOMPARE(int(checkValue.toInt()), range); |
|
283 |
|
284 error = mSettingsImp->set(CxeSettingIds::EV_COMPENSATION_VALUE, range); |
|
285 QCOMPARE(error, CxeError::None); |
|
286 mSettingsModel->getSettingValue(CxeSettingIds::EV_COMPENSATION_VALUE, checkValue); |
|
287 QCOMPARE(int(checkValue.toInt()), range); |
|
288 |
|
289 error = mSettingsImp->set(CxeSettingIds::EXPOSURE_MODE, Cxe::ExposureAuto); |
|
290 QCOMPARE(error, CxeError::None); |
|
291 mSettingsModel->getSettingValue(CxeSettingIds::EXPOSURE_MODE, checkValue); |
|
292 QCOMPARE(int(checkValue.toInt()), ((int)Cxe::ExposureAuto)); |
|
293 |
|
294 error = mSettingsImp->set(CxeSettingIds::EXPOSURE_MODE, Cxe::ExposureBacklight); |
|
295 QCOMPARE(error, CxeError::None); |
|
296 mSettingsModel->getSettingValue(CxeSettingIds::EXPOSURE_MODE, checkValue); |
|
297 QCOMPARE(int(checkValue.toInt()), ((int)Cxe::ExposureBacklight)); |
|
298 |
|
299 error = mSettingsImp->set(CxeSettingIds::EXPOSURE_MODE, Cxe::ExposureNight); |
|
300 QCOMPARE(error, CxeError::None); |
|
301 mSettingsModel->getSettingValue(CxeSettingIds::EXPOSURE_MODE, checkValue); |
|
302 QCOMPARE(int(checkValue.toInt()), ((int)Cxe::ExposureNight)); |
|
303 |
|
304 error = mSettingsImp->set(CxeSettingIds::EXPOSURE_MODE, Cxe::ExposureSport); |
|
305 QCOMPARE(error, CxeError::None); |
|
306 mSettingsModel->getSettingValue(CxeSettingIds::EXPOSURE_MODE, checkValue); |
|
307 QCOMPARE(int(checkValue.toInt()), ((int)Cxe::ExposureSport)); |
|
308 |
|
309 error = mSettingsImp->set(CxeSettingIds::FLASH_MODE, Cxe::FlashAntiRedEye); |
|
310 QCOMPARE(error, CxeError::None); |
|
311 mSettingsModel->getSettingValue(CxeSettingIds::FLASH_MODE, checkValue); |
|
312 QCOMPARE(int(checkValue.toInt()), ((int)Cxe::FlashAntiRedEye)); |
|
313 |
|
314 error = mSettingsImp->set(CxeSettingIds::FLASH_MODE, Cxe::FlashAuto); |
|
315 QCOMPARE(error, CxeError::None); |
|
316 mSettingsModel->getSettingValue(CxeSettingIds::FLASH_MODE, checkValue); |
|
317 QCOMPARE(int(checkValue.toInt()), ((int)Cxe::FlashAuto)); |
|
318 |
|
319 error = mSettingsImp->set(CxeSettingIds::FLASH_MODE, Cxe::FlashOff); |
|
320 QCOMPARE(error, CxeError::None); |
|
321 mSettingsModel->getSettingValue(CxeSettingIds::FLASH_MODE, checkValue); |
|
322 QCOMPARE(int(checkValue.toInt()), ((int)Cxe::FlashOff)); |
|
323 |
|
324 error = mSettingsImp->set(CxeSettingIds::FLASH_MODE, Cxe::FlashOn); |
|
325 QCOMPARE(error, CxeError::None); |
|
326 mSettingsModel->getSettingValue(CxeSettingIds::FLASH_MODE, checkValue); |
|
327 QCOMPARE(int(checkValue.toInt()), ((int)Cxe::FlashOn)); |
|
328 |
|
329 error = mSettingsImp->set(CxeSettingIds::FNAME_FOLDER_SUFFIX, range); |
|
330 QCOMPARE(error, CxeError::None); |
|
331 mSettingsModel->getSettingValue(CxeSettingIds::FNAME_FOLDER_SUFFIX, checkValue); |
|
332 QCOMPARE(int(checkValue.toInt()), range); |
|
333 |
|
334 error = mSettingsImp->set(CxeSettingIds::FNAME_IMAGE_COUNTER, range); |
|
335 QCOMPARE(error, CxeError::None); |
|
336 mSettingsModel->getSettingValue(CxeSettingIds::FNAME_IMAGE_COUNTER, checkValue); |
|
337 QCOMPARE(int(checkValue.toInt()), range); |
|
338 |
|
339 error = mSettingsImp->set(CxeSettingIds::FNAME_MONTH_FOLDER, range); |
|
340 QCOMPARE(error, CxeError::None); |
|
341 mSettingsModel->getSettingValue(CxeSettingIds::FNAME_MONTH_FOLDER, checkValue); |
|
342 QCOMPARE(int(checkValue.toInt()), range); |
|
343 |
|
344 error = mSettingsImp->set(CxeSettingIds::FNAME_VIDEO_COUNTER, range); |
|
345 QCOMPARE(error, CxeError::None); |
|
346 mSettingsModel->getSettingValue(CxeSettingIds::FNAME_VIDEO_COUNTER, checkValue); |
|
347 QCOMPARE(int(checkValue.toInt()), range); |
|
348 |
|
349 error = mSettingsImp->set(CxeSettingIds::FOCAL_RANGE, range); |
|
350 QCOMPARE(error, CxeError::None); |
|
351 mSettingsModel->getSettingValue(CxeSettingIds::FOCAL_RANGE, checkValue); |
|
352 QCOMPARE(int(checkValue.toInt()), range); |
|
353 |
|
354 error = mSettingsImp->set(CxeSettingIds::IMAGE_QUALITY, range); |
|
355 QCOMPARE(error, CxeError::None); |
|
356 mSettingsModel->getSettingValue(CxeSettingIds::IMAGE_QUALITY, checkValue); |
|
357 QCOMPARE(int(checkValue.toInt()), range); |
|
358 |
|
359 error = mSettingsImp->set(CxeSettingIds::IMAGE_SCENE, range); |
|
360 QCOMPARE(error, CxeError::None); |
|
361 mSettingsModel->getSettingValue(CxeSettingIds::IMAGE_SCENE, checkValue); |
|
362 QCOMPARE(int(checkValue.toInt()), range); |
|
363 |
|
364 error = mSettingsImp->set(CxeSettingIds::LIGHT_SENSITIVITY, Cxe::LightSensitivityAutomatic); |
|
365 QCOMPARE(error, CxeError::None); |
|
366 mSettingsModel->getSettingValue(CxeSettingIds::LIGHT_SENSITIVITY, checkValue); |
|
367 QCOMPARE(int(checkValue.toInt()), ((int)Cxe::LightSensitivityAutomatic)); |
|
368 |
|
369 error = mSettingsImp->set(CxeSettingIds::LIGHT_SENSITIVITY, Cxe::LightSensitivityHigh); |
|
370 QCOMPARE(error, CxeError::None); |
|
371 mSettingsModel->getSettingValue(CxeSettingIds::LIGHT_SENSITIVITY, checkValue); |
|
372 QCOMPARE(int(checkValue.toInt()), ((int)Cxe::LightSensitivityHigh)); |
|
373 |
|
374 error = mSettingsImp->set(CxeSettingIds::LIGHT_SENSITIVITY, Cxe::LightSensitivityLow); |
|
375 QCOMPARE(error, CxeError::None); |
|
376 mSettingsModel->getSettingValue(CxeSettingIds::LIGHT_SENSITIVITY, checkValue); |
|
377 QCOMPARE(int(checkValue.toInt()), ((int)Cxe::LightSensitivityLow)); |
|
378 |
|
379 error = mSettingsImp->set(CxeSettingIds::LIGHT_SENSITIVITY, Cxe::LightSensitivityMedium); |
|
380 QCOMPARE(error, CxeError::None); |
|
381 mSettingsModel->getSettingValue(CxeSettingIds::LIGHT_SENSITIVITY, checkValue); |
|
382 QCOMPARE(int(checkValue.toInt()), ((int)Cxe::LightSensitivityMedium)); |
|
383 |
|
384 error = mSettingsImp->set(CxeSettingIds::SCENE_ID, range); |
|
385 QCOMPARE(error, CxeError::None); |
|
386 mSettingsModel->getSettingValue(CxeSettingIds::SCENE_ID, checkValue); |
|
387 QCOMPARE(int(checkValue.toInt()), range); |
|
388 |
|
389 error = mSettingsImp->set(CxeSettingIds::SECONDARY_CAMERA, range); |
|
390 QCOMPARE(error, CxeError::None); |
|
391 mSettingsModel->getSettingValue(CxeSettingIds::SECONDARY_CAMERA, checkValue); |
|
392 QCOMPARE(int(checkValue.toInt()), range); |
|
393 |
|
394 error = mSettingsImp->set(CxeSettingIds::SELF_TIMER, range); |
|
395 QCOMPARE(error, CxeError::None); |
|
396 mSettingsModel->getSettingValue(CxeSettingIds::SELF_TIMER, checkValue); |
|
397 QCOMPARE(int(checkValue.toInt()), range); |
|
398 |
|
399 error = mSettingsImp->set(CxeSettingIds::SHARPNESS, Cxe::SharpnessHard); |
|
400 QCOMPARE(error, CxeError::None); |
|
401 mSettingsModel->getSettingValue(CxeSettingIds::SHARPNESS, checkValue); |
|
402 QCOMPARE(int(checkValue.toInt()), ((int)Cxe::SharpnessHard)); |
|
403 |
|
404 error = mSettingsImp->set(CxeSettingIds::SHARPNESS, Cxe::SharpnessNormal); |
|
405 QCOMPARE(error, CxeError::None); |
|
406 mSettingsModel->getSettingValue(CxeSettingIds::SHARPNESS, checkValue); |
|
407 QCOMPARE(int(checkValue.toInt()), ((int)Cxe::SharpnessNormal)); |
|
408 |
|
409 error = mSettingsImp->set(CxeSettingIds::SHARPNESS, Cxe::SharpnessSoft); |
|
410 QCOMPARE(error, CxeError::None); |
|
411 mSettingsModel->getSettingValue(CxeSettingIds::SHARPNESS, checkValue); |
|
412 QCOMPARE(int(checkValue.toInt()), ((int)Cxe::SharpnessSoft)); |
|
413 |
|
414 error = mSettingsImp->set(CxeSettingIds::VIDEO_SCENE, range); |
|
415 QCOMPARE(error, CxeError::None); |
|
416 mSettingsModel->getSettingValue(CxeSettingIds::VIDEO_SCENE, checkValue); |
|
417 QCOMPARE(int(checkValue.toInt()), range); |
|
418 |
|
419 error = mSettingsImp->set(CxeSettingIds::WHITE_BALANCE, Cxe::WhitebalanceAutomatic); |
|
420 QCOMPARE(error, CxeError::None); |
|
421 mSettingsModel->getSettingValue(CxeSettingIds::WHITE_BALANCE, checkValue); |
|
422 QCOMPARE(int(checkValue.toInt()), ((int)Cxe::WhitebalanceAutomatic)); |
|
423 |
|
424 error = mSettingsImp->set(CxeSettingIds::WHITE_BALANCE, Cxe::WhitebalanceCloudy); |
|
425 QCOMPARE(error, CxeError::None); |
|
426 mSettingsModel->getSettingValue(CxeSettingIds::WHITE_BALANCE, checkValue); |
|
427 QCOMPARE(int(checkValue.toInt()), ((int)Cxe::WhitebalanceCloudy)); |
|
428 |
|
429 error = mSettingsImp->set(CxeSettingIds::WHITE_BALANCE, Cxe::WhitebalanceFluorescent); |
|
430 QCOMPARE(error, CxeError::None); |
|
431 mSettingsModel->getSettingValue(CxeSettingIds::WHITE_BALANCE, checkValue); |
|
432 QCOMPARE(int(checkValue.toInt()), ((int)Cxe::WhitebalanceFluorescent)); |
|
433 |
|
434 error = mSettingsImp->set(CxeSettingIds::WHITE_BALANCE, Cxe::WhitebalanceIncandescent); |
|
435 QCOMPARE(error, CxeError::None); |
|
436 mSettingsModel->getSettingValue(CxeSettingIds::WHITE_BALANCE, checkValue); |
|
437 QCOMPARE(int(checkValue.toInt()), ((int)Cxe::WhitebalanceIncandescent)); |
|
438 |
|
439 error = mSettingsImp->set(CxeSettingIds::WHITE_BALANCE, Cxe::WhitebalanceSunny); |
|
440 QCOMPARE(error, CxeError::None); |
|
441 mSettingsModel->getSettingValue(CxeSettingIds::WHITE_BALANCE, checkValue); |
|
442 QCOMPARE(int(checkValue.toInt()), ((int)Cxe::WhitebalanceSunny)); |
|
443 |
|
444 /* Test fail parameter |
|
445 */ |
|
446 error = mSettingsImp->set(FAIL_TEST_SETTING, Cxe::ColortoneNormal); |
|
447 QCOMPARE(error, CxeError::NotFound); |
432 QCOMPARE(error, CxeError::NotFound); |
|
433 CX_DEBUG_EXIT_FUNCTION(); |
|
434 } |
|
435 |
|
436 void UnitTestCxeSettingsImp::testListenForSetting() |
|
437 { |
|
438 CX_DEBUG_ENTER_FUNCTION(); |
|
439 |
|
440 // This test case will initialize listening for certain setting changes |
|
441 // and will verify that listener has succesfully deployed the signal |
|
442 |
|
443 // First let's initialize a signal spy |
|
444 QSignalSpy spy(mSettingsImp, SIGNAL(settingValueChanged(QString, QVariant))); |
|
445 |
|
446 // Initializing the original value to make sure it changes later on |
|
447 mSettingsStore->set(CxeSettingIds::CAMERA_MODE, Cxe::ImageMode); |
|
448 |
|
449 // Now start listening and verify that starting was succesfull |
|
450 bool result = mSettingsImp->listenForSetting(CxeSettingIds::CAMERA_MODE, this, SLOT(testSlot())); |
|
451 QVERIFY(result); |
|
452 |
|
453 // Now change the setting and wait for the signal |
|
454 //mSettingsStore->set(CxeSettingIds::CAMERA_MODE, Cxe::VideoMode); |
|
455 mSettingsImp->set(CxeSettingIds::CAMERA_MODE, Cxe::VideoMode); |
|
456 |
|
457 |
|
458 // Check that signal was emitted |
|
459 QVERIFY(CxeTestUtils::waitForSignal(spy, SIGNAL_TIMEOUT)); |
|
460 |
|
461 // One more check with invalid input parameter |
|
462 result = mSettingsImp->listenForSetting(FAIL_TEST_SETTING, this, SLOT(testSlot())); |
|
463 QVERIFY(!result); |
|
464 |
|
465 // Now disconnecting the listener and checking if the signal is still emitted |
|
466 disconnect(mSettingsImp, SIGNAL(settingValueChanged(QString,QVariant)), this, SLOT(testSlot())); |
|
467 delete mSettingsImp; |
|
468 mSettingsImp = NULL; |
|
469 |
|
470 mSettingsStore->set(CxeSettingIds::CAMERA_MODE, Cxe::ImageMode); |
|
471 |
|
472 // Make sure that no additional signals are emitted |
|
473 QVERIFY(!CxeTestUtils::waitForSignal(spy, SIGNAL_TIMEOUT)); |
|
474 |
|
475 CX_DEBUG_EXIT_FUNCTION(); |
|
476 } |
|
477 |
|
478 /* |
|
479 * Just a dummy slot |
|
480 */ |
|
481 void UnitTestCxeSettingsImp::testSlot() |
|
482 { |
|
483 CX_DEBUG_IN_FUNCTION(); |
448 } |
484 } |
449 |
485 |
450 // main() function non-GUI testing |
486 // main() function non-GUI testing |
451 QTEST_MAIN(UnitTestCxeSettingsImp) |
487 QTEST_MAIN(UnitTestCxeSettingsImp) |
452 |
488 |