Initialize Tizen 2.3
[framework/system/deviced.git] / test / testcase / utc_system_deviced_display.c
1 /*
2  *
3  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4  * PROPRIETARY/CONFIDENTIAL
5  *
6  * This software is the confidential and proprietary information of SAMSUNG
7  * ELECTRONICS ("Confidential Information"). You agree and acknowledge that
8  * this software is owned by Samsung and you shall not disclose such
9  * Confidential Information and shall use it only in accordance with the terms
10  * of the license agreement you entered into with SAMSUNG ELECTRONICS. SAMSUNG
11  * make no representations or warranties about the suitability of the software,
12  * either express or implied, including but not limited to the implied
13  * warranties of merchantability, fitness for a particular purpose, or
14  * non-infringement. SAMSUNG shall not be liable for any damages suffered by
15  * licensee arising out of or related to this software.
16  *
17  */
18 #include <tet_api.h>
19 #include <stdbool.h>
20 #include <dd-display.h>
21
22 #define API_NAME_DISPLAY_GET_COUNT "display_get_count"
23 #define API_NAME_DISPLAY_GET_MAX_BRIGHTNESS "display_get_max_brightness"
24 #define API_NAME_DISPLAY_GET_MIN_BRIGHTNESS "display_get_min_brightness"
25 #define API_NAME_DISPLAY_GET_BRIGHTNESS "display_get_brightness"
26 #define API_NAME_DISPLAY_SET_BRIGHTNESS_WITH_SETTING "display_set_brightness_with_setting"
27 #define API_NAME_DISPLAY_SET_BRIGHTNESS "display_set_brightness"
28 #define API_NAME_DISPLAY_RELEASE_BRIGHTNESS "display_release_brightness"
29 #define API_NAME_DISPLAY_GET_ACL_STATUS "display_get_acl_status"
30 #define API_NAME_DISPLAY_SET_ACL_STATUS "display_set_acl_status"
31 #define API_NAME_DISPLAY_GET_IMAGE_ENHANCE_INFO "display_get_enhance_info"
32 #define API_NAME_DISPLAY_GET_IMAGE_ENHANCE "display_get_image_enhance"
33 #define API_NAME_DISPLAY_SET_IMAGE_ENHANCE "display_set_image_enhance"
34 #define API_NAME_DISPLAY_SET_REFRESH_RATE "display_set_refresh_rate"
35 #define API_NAME_DISPLAY_LOCK_STATE "display_lock_state"
36 #define API_NAME_DISPLAY_UNLOCK_STATE "display_unlock_state"
37 #define API_NAME_DISPLAY_CHANGE_STATE "display_change_state"
38 #define API_NAME_DISPLAY_GET_AUTO_SCREEN_TONE "display_get_auto_screen_tone"
39 #define API_NAME_DISPLAY_SET_AUTO_SCREEN_TONE "display_Set_auto_screen_tone"
40 #define API_NAME_DISPLAY_GET_COLOR_BLIND "display_get_color_blind"
41 #define API_NAME_DISPLAY_SET_COLOR_BLIND "display_set_color_blind"
42 #define API_NAME_DISPLAY_GET_ENHANCED_TOUCH "display_get_enhanced_touch"
43 #define API_NAME_DISPLAY_SET_ENHANCED_TOUCH "display_set_enhanced_touch"
44
45 static void startup(void);
46 static void cleanup(void);
47
48 void (*tet_startup)(void) = startup;
49 void (*tet_cleanup)(void) = cleanup;
50
51
52 static void utc_system_deviced_display_get_count_p(void);
53 static void utc_system_deviced_display_get_max_brightness_p(void);
54 static void utc_system_deviced_display_get_min_brightness_p(void);
55 static void utc_system_deviced_display_get_brightness_p(void);
56 static void utc_system_deviced_display_set_brightness_with_setting_p(void);
57 static void utc_system_deviced_display_set_brightness_with_setting_n(void);
58 static void utc_system_deviced_display_set_brightness_p(void);
59 static void utc_system_deviced_display_set_brightness_n(void);
60 static void utc_system_deviced_display_release_brightness_p(void);
61 static void utc_system_deviced_display_get_acl_status_p(void);
62 static void utc_system_deviced_display_set_acl_status_p_1(void);
63 static void utc_system_deviced_display_set_acl_status_p_2(void);
64 static void utc_system_deviced_display_set_acl_status_n(void);
65 static void utc_system_deviced_display_get_image_enhance_info_p(void);
66 static void utc_system_deviced_display_get_image_enhance_p(void);
67 static void utc_system_deviced_display_get_image_enhance_n(void);
68 static void utc_system_deviced_display_set_image_enhance_p(void);
69 static void utc_system_deviced_display_set_image_enhance_n_1(void);
70 static void utc_system_deviced_display_set_image_enhance_n_2(void);
71 static void utc_system_deviced_display_set_refresh_rate_p(void);
72 static void utc_system_deviced_display_set_refresh_rate_n_1(void);
73 static void utc_system_deviced_display_set_refresh_rate_n_2(void);
74 static void utc_system_deviced_display_lock_state_p(void);
75 static void utc_system_deviced_display_lock_state_n_1(void);
76 static void utc_system_deviced_display_lock_state_n_2(void);
77 static void utc_system_deviced_display_lock_state_n_3(void);
78 static void utc_system_deviced_display_unlock_state_p(void);
79 static void utc_system_deviced_display_unlock_state_n_1(void);
80 static void utc_system_deviced_display_unlock_state_n_2(void);
81 static void utc_system_deviced_display_change_state_p(void);
82 static void utc_system_deviced_display_change_state_n(void);
83 static void utc_system_deviced_display_get_auto_screen_tone_p(void);
84 static void utc_system_deviced_display_set_auto_screen_tone_p_1(void);
85 static void utc_system_deviced_display_set_auto_screen_tone_p_2(void);
86 static void utc_system_deviced_display_set_auto_screen_tone_n(void);
87 static void utc_system_deviced_display_get_color_blind_p(void);
88 static void utc_system_deviced_display_set_color_blind_p_1(void);
89 static void utc_system_deviced_display_set_color_blind_p_2(void);
90 static void utc_system_deviced_display_set_color_blind_n_1(void);
91 static void utc_system_deviced_display_set_color_blind_n_2(void);
92 static void utc_system_deviced_display_get_enhanced_touch_p(void);
93 static void utc_system_deviced_display_set_enhanced_touch_p_1(void);
94 static void utc_system_deviced_display_set_enhanced_touch_p_2(void);
95 static void utc_system_deviced_display_set_enhanced_touch_n(void);
96
97 enum {
98         POSITIVE_TC_IDX = 0x01,
99         NEGATIVE_TC_IDX,
100 };
101
102 struct tet_testlist tet_testlist[] = {
103         { utc_system_deviced_display_get_count_p, POSITIVE_TC_IDX },
104         { utc_system_deviced_display_get_max_brightness_p, POSITIVE_TC_IDX },
105         { utc_system_deviced_display_get_min_brightness_p, POSITIVE_TC_IDX },
106         { utc_system_deviced_display_get_brightness_p, POSITIVE_TC_IDX },
107         { utc_system_deviced_display_set_brightness_with_setting_p, POSITIVE_TC_IDX },
108         { utc_system_deviced_display_set_brightness_with_setting_n, NEGATIVE_TC_IDX },
109         { utc_system_deviced_display_set_brightness_p, POSITIVE_TC_IDX },
110         { utc_system_deviced_display_set_brightness_n, NEGATIVE_TC_IDX },
111         { utc_system_deviced_display_release_brightness_p, POSITIVE_TC_IDX },
112         { utc_system_deviced_display_get_acl_status_p, POSITIVE_TC_IDX },
113         { utc_system_deviced_display_set_acl_status_p_1, POSITIVE_TC_IDX },
114         { utc_system_deviced_display_set_acl_status_p_2, POSITIVE_TC_IDX },
115         { utc_system_deviced_display_set_acl_status_n, NEGATIVE_TC_IDX },
116         { utc_system_deviced_display_get_image_enhance_info_p, POSITIVE_TC_IDX },
117         { utc_system_deviced_display_get_image_enhance_p, POSITIVE_TC_IDX },
118         { utc_system_deviced_display_get_image_enhance_n, NEGATIVE_TC_IDX },
119         { utc_system_deviced_display_set_image_enhance_p, POSITIVE_TC_IDX },
120         { utc_system_deviced_display_set_image_enhance_n_1, NEGATIVE_TC_IDX },
121         { utc_system_deviced_display_set_image_enhance_n_2, NEGATIVE_TC_IDX },
122         { utc_system_deviced_display_set_refresh_rate_p, POSITIVE_TC_IDX },
123         { utc_system_deviced_display_set_refresh_rate_n_1, NEGATIVE_TC_IDX },
124         { utc_system_deviced_display_set_refresh_rate_n_2, NEGATIVE_TC_IDX },
125         { utc_system_deviced_display_lock_state_p, POSITIVE_TC_IDX },
126         { utc_system_deviced_display_lock_state_n_1, NEGATIVE_TC_IDX },
127         { utc_system_deviced_display_lock_state_n_2, NEGATIVE_TC_IDX },
128         { utc_system_deviced_display_lock_state_n_3, NEGATIVE_TC_IDX },
129         { utc_system_deviced_display_unlock_state_p, POSITIVE_TC_IDX },
130         { utc_system_deviced_display_unlock_state_n_1, NEGATIVE_TC_IDX },
131         { utc_system_deviced_display_unlock_state_n_2, NEGATIVE_TC_IDX },
132         { utc_system_deviced_display_change_state_p, POSITIVE_TC_IDX },
133         { utc_system_deviced_display_change_state_n, NEGATIVE_TC_IDX },
134         { utc_system_deviced_display_get_auto_screen_tone_p, POSITIVE_TC_IDX },
135         { utc_system_deviced_display_set_auto_screen_tone_p_1, POSITIVE_TC_IDX },
136         { utc_system_deviced_display_set_auto_screen_tone_p_2, POSITIVE_TC_IDX },
137         { utc_system_deviced_display_set_auto_screen_tone_n, NEGATIVE_TC_IDX },
138         { utc_system_deviced_display_get_color_blind_p, POSITIVE_TC_IDX },
139         { utc_system_deviced_display_set_color_blind_p_1, POSITIVE_TC_IDX },
140         { utc_system_deviced_display_set_color_blind_p_2, POSITIVE_TC_IDX },
141         { utc_system_deviced_display_set_color_blind_n_1, NEGATIVE_TC_IDX },
142         { utc_system_deviced_display_set_color_blind_n_2, NEGATIVE_TC_IDX },
143         { utc_system_deviced_display_get_enhanced_touch_p, POSITIVE_TC_IDX },
144         { utc_system_deviced_display_set_enhanced_touch_p_1, POSITIVE_TC_IDX },
145         { utc_system_deviced_display_set_enhanced_touch_p_2, POSITIVE_TC_IDX },
146         { utc_system_deviced_display_set_enhanced_touch_n, NEGATIVE_TC_IDX },
147         { NULL, 0 },
148 };
149
150 static void startup(void)
151 {
152 }
153
154 static void cleanup(void)
155 {
156 }
157
158 /**
159  * @brief Positive test case of display_get_count()
160  */
161 static void utc_system_deviced_display_get_count_p(void)
162 {
163         int ret;
164
165         ret = display_get_count();
166         dts_check_ge(API_NAME_DISPLAY_GET_COUNT, ret, 0);
167 }
168
169 /**
170  * @brief Positive test case of display_get_max_brightness()
171  */
172 static void utc_system_deviced_display_get_max_brightness_p(void)
173 {
174         int ret;
175
176         ret = display_get_max_brightness();
177         dts_check_ge(API_NAME_DISPLAY_GET_MAX_BRIGHTNESS, ret, 0);
178 }
179
180 /**
181  * @brief Positive test case of display_get_min_brightness()
182  */
183 static void utc_system_deviced_display_get_min_brightness_p(void)
184 {
185         int ret;
186
187         ret = display_get_min_brightness();
188         dts_check_ge(API_NAME_DISPLAY_GET_MIN_BRIGHTNESS, ret, 0);
189 }
190
191 /**
192  * @brief Positive test case of display_get_brightness()
193  */
194 static void utc_system_deviced_display_get_brightness_p(void)
195 {
196         int ret;
197
198         ret = display_get_brightness();
199         dts_check_ge(API_NAME_DISPLAY_GET_BRIGHTNESS, ret, 0);
200 }
201
202 /**
203  * @brief Positive test case of display_set_brightness_with_setting()
204  */
205 static void utc_system_deviced_display_set_brightness_with_setting_p(void)
206 {
207         int ret;
208
209         ret = display_set_brightness_with_setting(100);
210         dts_check_eq(API_NAME_DISPLAY_SET_BRIGHTNESS_WITH_SETTING, ret, 0);
211 }
212
213 /**
214  * @brief Negative test case of display_set_brightness_with_setting()
215  */
216 static void utc_system_deviced_display_set_brightness_with_setting_n(void)
217 {
218         int ret;
219
220         ret = display_set_brightness_with_setting(-1);
221         dts_check_ne(API_NAME_DISPLAY_SET_BRIGHTNESS_WITH_SETTING, ret, 0);
222 }
223
224 /**
225  * @brief Positive test case of display_set_brightness()
226  */
227 static void utc_system_deviced_display_set_brightness_p(void)
228 {
229         int ret;
230
231         ret = display_set_brightness(50);
232         dts_check_eq(API_NAME_DISPLAY_SET_BRIGHTNESS, ret, 0);
233 }
234
235 /**
236  * @brief Negative test case of display_set_brightness()
237  */
238 static void utc_system_deviced_display_set_brightness_n(void)
239 {
240         int ret;
241
242         ret = display_set_brightness(-1);
243         dts_check_ne(API_NAME_DISPLAY_SET_BRIGHTNESS, ret, 0);
244 }
245
246 /**
247  * @brief Positive test case of display_release_brightness()
248  */
249 static void utc_system_deviced_display_release_brightness_p(void)
250 {
251         int ret;
252
253         ret = display_release_brightness();
254         dts_check_eq(API_NAME_DISPLAY_RELEASE_BRIGHTNESS, ret, 0);
255 }
256
257 /**
258  * @brief Positive test case of display_get_acl_status()
259  */
260 static void utc_system_deviced_display_get_acl_status_p(void)
261 {
262         int ret;
263
264         ret = display_get_acl_status();
265         dts_check_ge(API_NAME_DISPLAY_GET_ACL_STATUS, ret, 0);
266 }
267
268 /**
269  * @brief Positive test case of display_set_acl_status()
270  */
271 static void utc_system_deviced_display_set_acl_status_p_1(void)
272 {
273         int ret;
274
275         ret = display_set_acl_status(1);
276         dts_check_eq(API_NAME_DISPLAY_SET_ACL_STATUS, ret, 0, "Enable acl");
277 }
278
279 /**
280  * @brief Positive test case of display_set_acl_status()
281  */
282 static void utc_system_deviced_display_set_acl_status_p_2(void)
283 {
284         int ret;
285
286         ret = display_set_acl_status(0);
287         dts_check_eq(API_NAME_DISPLAY_SET_ACL_STATUS, ret, 0, "Disable acl");
288 }
289
290 /**
291  * @brief Negative test case of display_set_acl_status()
292  */
293 static void utc_system_deviced_display_set_acl_status_n(void)
294 {
295         int ret;
296
297         ret = display_set_acl_status(-1);
298         dts_check_ne(API_NAME_DISPLAY_SET_ACL_STATUS, ret, 0);
299 }
300
301 /**
302  * @brief Positive test case of display_get_image_enhance_info()
303  */
304 static void utc_system_deviced_display_get_image_enhance_info_p(void)
305 {
306         int ret;
307
308         ret = display_get_image_enhance_info();
309         dts_check_ge(API_NAME_DISPLAY_GET_IMAGE_ENHANCE_INFO, ret, 0);
310 }
311
312 /**
313  * @brief Positive test case of display_get_image_enhance()
314  */
315 static void utc_system_deviced_display_get_image_enhance_p(void)
316 {
317         int i, ret;
318
319         for (i = ENHANCE_MODE; i <= ENHANCE_OUTDOOR; ++i) {
320                 ret = display_get_image_enhance(i);
321                 dts_check_ge(API_NAME_DISPLAY_GET_IMAGE_ENHANCE, ret, 0, "enhance type : %d", i);
322         }
323 }
324
325 /**
326  * @brief Negative test case of display_get_image_enhance()
327  */
328 static void utc_system_deviced_display_get_image_enhance_n(void)
329 {
330         int ret;
331
332         ret = display_get_image_enhance(-1);
333         dts_check_ne(API_NAME_DISPLAY_GET_IMAGE_ENHANCE, ret, 0);
334 }
335
336 /**
337  * @brief Positive test case of display_set_image_enhance()
338  */
339 static void utc_system_deviced_display_set_image_enhance_p(void)
340 {
341         int i, ret;
342
343         for (i = ENHANCE_MODE; i <= ENHANCE_OUTDOOR; ++i) {
344                 ret = display_set_image_enhance(i, 0);
345                 dts_check_eq(API_NAME_DISPLAY_SET_IMAGE_ENHANCE, ret, 0, "enhance type : %d", i);
346         }
347 }
348
349 /**
350  * @brief Negative test case of display_set_image_enhance()
351  */
352 static void utc_system_deviced_display_set_image_enhance_n_1(void)
353 {
354         int ret;
355
356         ret = display_set_image_enhance(-1, 0);
357         dts_check_ne(API_NAME_DISPLAY_SET_IMAGE_ENHANCE, ret, 0);
358 }
359
360 /**
361  * @brief Negative test case of display_set_image_enhance()
362  */
363 static void utc_system_deviced_display_set_image_enhance_n_2(void)
364 {
365         int ret;
366
367         ret = display_set_image_enhance(0, -1);
368         dts_check_ne(API_NAME_DISPLAY_SET_IMAGE_ENHANCE, ret, 0);
369 }
370
371 /**
372  * @brief Positive test case of display_set_refresh_rate()
373  */
374 static void utc_system_deviced_display_set_refresh_rate_p(void)
375 {
376         int i, ret;
377
378         for (i = REFRESH_SETTING; i <= REFRESH_WEB; ++i) {
379                 ret = display_set_refresh_rate(i, 60);
380                 dts_check_eq(API_NAME_DISPLAY_SET_REFRESH_RATE, ret, 0, "refresh type : %d", i);
381         }
382 }
383
384 /**
385  * @brief Negative test case of display_set_refresh_rate()
386  */
387 static void utc_system_deviced_display_set_refresh_rate_n_1(void)
388 {
389         int ret;
390
391         ret = display_set_refresh_rate(-1, 60);
392         dts_check_ne(API_NAME_DISPLAY_SET_REFRESH_RATE, ret, 0);
393 }
394
395 /**
396  * @brief Negative test case of display_set_refresh_rate()
397  */
398 static void utc_system_deviced_display_set_refresh_rate_n_2(void)
399 {
400         int ret;
401
402         ret = display_set_refresh_rate(0, -1);
403         dts_check_ne(API_NAME_DISPLAY_SET_REFRESH_RATE, ret, 0);
404 }
405
406 /**
407  * @brief Positive test case of display_lock_state()
408  */
409 static void utc_system_deviced_display_lock_state_p(void)
410 {
411         int ret;
412
413         ret = display_lock_state(LCD_NORMAL, GOTO_STATE_NOW, 0);
414         dts_check_eq(API_NAME_DISPLAY_LOCK_STATE, ret, 0);
415 }
416
417 /**
418  * @brief Negative test case of display_lock_state()
419  */
420 static void utc_system_deviced_display_lock_state_n_1(void)
421 {
422         int ret;
423
424         ret = display_lock_state(-1, GOTO_STATE_NOW, 0);
425         dts_check_ne(API_NAME_DISPLAY_LOCK_STATE, ret, 0);
426 }
427
428 /**
429  * @brief Negative test case of display_lock_state()
430  */
431 static void utc_system_deviced_display_lock_state_n_2(void)
432 {
433         int ret;
434
435         ret = display_lock_state(LCD_NORMAL, -1, 0);
436         dts_check_ne(API_NAME_DISPLAY_LOCK_STATE, ret, 0);
437 }
438
439 /**
440  * @brief Negative test case of display_lock_state()
441  */
442 static void utc_system_deviced_display_lock_state_n_3(void)
443 {
444         int ret;
445
446         ret = display_lock_state(LCD_NORMAL, GOTO_STATE_NOW, -1);
447         dts_check_ne(API_NAME_DISPLAY_LOCK_STATE, ret, 0);
448 }
449
450 /**
451  * @brief Positive test case of display_unlock_state()
452  */
453 static void utc_system_deviced_display_unlock_state_p(void)
454 {
455         int ret;
456
457         ret = display_unlock_state(LCD_NORMAL, PM_RESET_TIMER);
458         dts_check_eq(API_NAME_DISPLAY_UNLOCK_STATE, ret, 0);
459 }
460
461 /**
462  * @brief Negative test case of display_unlock_state()
463  */
464 static void utc_system_deviced_display_unlock_state_n_1(void)
465 {
466         int ret;
467
468         ret = display_unlock_state(-1, PM_RESET_TIMER);
469         dts_check_ne(API_NAME_DISPLAY_UNLOCK_STATE, ret, 0);
470 }
471
472 /**
473  * @brief Negative test case of display_unlock_state()
474  */
475 static void utc_system_deviced_display_unlock_state_n_2(void)
476 {
477         int ret;
478
479         ret = display_unlock_state(LCD_NORMAL, -1);
480         dts_check_ne(API_NAME_DISPLAY_UNLOCK_STATE, ret, 0);
481 }
482
483 /**
484  * @brief Positive test case of display_change_state()
485  */
486 static void utc_system_deviced_display_change_state_p(void)
487 {
488         int ret;
489
490         ret = display_change_state(LCD_NORMAL);
491         dts_check_eq(API_NAME_DISPLAY_CHANGE_STATE, ret, 0);
492 }
493
494 /**
495  * @brief Positive test case of display_change_state()
496  */
497 static void utc_system_deviced_display_change_state_n(void)
498 {
499         int ret;
500
501         ret = display_change_state(-1);
502         dts_check_ne(API_NAME_DISPLAY_CHANGE_STATE, ret, 0);
503 }
504
505 /**
506  * @brief Positive test case of display_get_auto_screen_tone()
507  */
508 static void utc_system_deviced_display_get_auto_screen_tone_p(void)
509 {
510         int ret;
511
512         ret = display_get_auto_screen_tone();
513         dts_check_ge(API_NAME_DISPLAY_GET_AUTO_SCREEN_TONE, ret, 0);
514 }
515
516 /**
517  * @brief Positive test case of display_set_auto_screen_tone()
518  */
519 static void utc_system_deviced_display_set_auto_screen_tone_p_1(void)
520 {
521         int ret;
522
523         ret = display_set_auto_screen_tone(TONE_ON);
524         dts_check_eq(API_NAME_DISPLAY_SET_AUTO_SCREEN_TONE, ret, 0, "Enable auto screen tone");
525 }
526
527 /**
528  * @brief Positive test case of display_set_auto_screen_tone()
529  */
530 static void utc_system_deviced_display_set_auto_screen_tone_p_2(void)
531 {
532         int ret;
533
534         ret = display_set_auto_screen_tone(TONE_OFF);
535         dts_check_eq(API_NAME_DISPLAY_SET_AUTO_SCREEN_TONE, ret, 0, "Disable auto screen tone");
536 }
537
538 /**
539  * @brief Negative test case of display_set_auto_screen_tone()
540  */
541 static void utc_system_deviced_display_set_auto_screen_tone_n(void)
542 {
543         int ret;
544
545         ret = display_set_auto_screen_tone(-1);
546         dts_check_ne(API_NAME_DISPLAY_SET_AUTO_SCREEN_TONE, ret, 0);
547 }
548
549 /**
550  * @brief Positive test case of display_get_color_blind()
551  */
552 static void utc_system_deviced_display_get_color_blind_p(void)
553 {
554         int ret;
555
556         ret = display_get_color_blind();
557         dts_check_ge(API_NAME_DISPLAY_GET_COLOR_BLIND, ret, 0);
558 }
559
560 /**
561  * @brief Positive test case of display_set_color_blind()
562  */
563 static void utc_system_deviced_display_set_color_blind_p_1(void)
564 {
565         int ret;
566         struct blind_color_info info = {0,};
567
568         ret = display_set_color_blind(true, &info);
569         dts_check_eq(API_NAME_DISPLAY_SET_COLOR_BLIND, ret, 0);
570 }
571
572 /**
573  * @brief Positive test case of display_set_color_blind()
574  */
575 static void utc_system_deviced_display_set_color_blind_p_2(void)
576 {
577         int ret;
578         struct blind_color_info info = {0,};
579
580         ret = display_set_color_blind(false, &info);
581         dts_check_eq(API_NAME_DISPLAY_SET_COLOR_BLIND, ret, 0);
582 }
583
584 /**
585  * @brief Negative test case of display_set_color_blind()
586  */
587 static void utc_system_deviced_display_set_color_blind_n_1(void)
588 {
589         int ret;
590         struct blind_color_info info = {0,};
591
592         ret = display_set_color_blind(-1, &info);
593         dts_check_ne(API_NAME_DISPLAY_SET_COLOR_BLIND, ret, 0);
594 }
595
596 /**
597  * @brief Positive test case of display_set_color_blind()
598  */
599 static void utc_system_deviced_display_set_color_blind_n_2(void)
600 {
601         int ret;
602
603         ret = display_set_color_blind(true, NULL);
604         dts_check_ne(API_NAME_DISPLAY_SET_COLOR_BLIND, ret, 0);
605 }
606
607 /**
608  * @brief Positive test case of display_get_enhanced_touch()
609  */
610 static void utc_system_deviced_display_get_enhanced_touch_p(void)
611 {
612         int ret;
613
614         ret = display_get_enhanced_touch();
615         dts_check_ge(API_NAME_DISPLAY_GET_ENHANCED_TOUCH, ret, 0);
616 }
617
618 /**
619  * @brief Positive test case of display_set_enhanced_touch()
620  */
621 static void utc_system_deviced_display_set_enhanced_touch_p_1(void)
622 {
623         int ret;
624
625         ret = display_set_enhanced_touch(true);
626         dts_check_eq(API_NAME_DISPLAY_SET_ENHANCED_TOUCH, ret, 0, "Enable enhanced touch");
627 }
628
629 /**
630  * @brief Positive test case of display_set_enhanced_touch()
631  */
632 static void utc_system_deviced_display_set_enhanced_touch_p_2(void)
633 {
634         int ret;
635
636         ret = display_set_enhanced_touch(false);
637         dts_check_eq(API_NAME_DISPLAY_SET_ENHANCED_TOUCH, ret, 0, "Disable enhanced touch");
638 }
639
640 /**
641  * @brief Negative test case of display_set_enhanced_touch()
642  */
643 static void utc_system_deviced_display_set_enhanced_touch_n(void)
644 {
645         int ret;
646
647         ret = display_set_enhanced_touch(-1);
648         dts_check_ne(API_NAME_DISPLAY_SET_ENHANCED_TOUCH, ret, 0);
649 }