utests: apply coding style
[platform/core/uifw/libtdm.git] / utests / src / ut_tdm_helper.cpp
1 /**************************************************************************
2  *
3  * Copyright 2016 Samsung Electronics co., Ltd. All Rights Reserved.
4  *
5  * Contact: Konstantin Drabeniuk <k.drabeniuk@samsung.com>
6  * Contact: Andrii Sokolenko <a.sokolenko@samsung.com>
7  * Contact: Roman Marchenko <r.marchenko@samsung.com>
8  *
9  * Permission is hereby granted, free of charge, to any person obtaining a
10  * copy of this software and associated documentation files (the
11  * "Software"), to deal in the Software without restriction, including
12  * without limitation the rights to use, copy, modify, merge, publish,
13  * distribute, sub license, and/or sell copies of the Software, and to
14  * permit persons to whom the Software is furnished to do so, subject to
15  * the following conditions:
16  *
17  * The above copyright notice and this permission notice (including the
18  * next paragraph) shall be included in all copies or substantial portions
19  * of the Software.
20  *
21  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
24  * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
25  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
26  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28  *
29 **************************************************************************/
30
31 #include "ut_tdm.h"
32
33 class TDMHelper : public TDMOutput
34 {
35 public:
36         TDMHelper();
37         void SetUp(void);
38         void TearDown(void);
39 };
40
41 TDMHelper::TDMHelper()
42 {
43 }
44
45 void TDMHelper::SetUp(void)
46 {
47         TDMOutput::SetUp();
48 }
49
50 void TDMHelper::TearDown(void)
51 {
52         TDMOutput::TearDown();
53 }
54
55 TEST_P(TDMHelper, HelperGetTime)
56 {
57         ASSERT_GT(tdm_helper_get_time(), 0.0);
58 }
59
60 TEST_P(TDMHelper, HelperDumpBuffer)
61 {
62         tbm_surface_h buffer;
63
64         buffer = tbm_surface_create(TDM_UT_BUFFER_SIZE, TDM_UT_BUFFER_SIZE, TBM_FORMAT_ARGB8888);
65         ASSERT_NE(buffer, NULL);
66
67         tdm_test_buffer_fill(buffer, PATTERN_SMPTE);
68
69         char filename[256];
70         snprintf(filename, sizeof filename, "%s.png", typeid(*this).name());
71         tdm_helper_dump_buffer(buffer, (const char*)filename);
72
73         tbm_surface_destroy(buffer);
74 }
75
76 TEST_P(TDMHelper, HelperDumpBufferNullObject)
77 {
78         char filename[256];
79         tdm_helper_dump_buffer(NULL, (const char*)filename);
80 }
81
82 TEST_P(TDMHelper, HelperDumpBufferNullOther)
83 {
84         tbm_surface_h buffer = (tbm_surface_h)TDM_UT_INVALID_VALUE;
85         tdm_helper_dump_buffer(buffer, NULL);
86 }
87
88 TEST_P(TDMHelper, HelperClearBufferPos)
89 {
90         tbm_surface_h buffer;
91         tdm_pos pos = {.x = 40, .y = 40, .w = TDM_UT_BUFFER_SIZE - 80, .h = TDM_UT_BUFFER_SIZE - 80};
92
93         buffer = tbm_surface_create(TDM_UT_BUFFER_SIZE, TDM_UT_BUFFER_SIZE, TBM_FORMAT_ARGB8888);
94         ASSERT_NE(buffer, NULL);
95
96         tdm_test_buffer_fill(buffer, PATTERN_SMPTE);
97
98         tdm_helper_clear_buffer_pos(buffer, &pos);
99
100         char filename[256];
101         snprintf(filename, sizeof filename, "%s.png", typeid(*this).name());
102         tdm_helper_dump_buffer(buffer, (const char*)filename);
103
104         tbm_surface_destroy(buffer);
105 }
106
107 TEST_P(TDMHelper, HelperClearBufferColor)
108 {
109         tbm_surface_h buffer;
110         tdm_pos pos = {.x = 40, .y = 40, .w = TDM_UT_BUFFER_SIZE - 80, .h = TDM_UT_BUFFER_SIZE - 80};
111         unsigned int color = 0xffffff00;
112
113         buffer = tbm_surface_create(TDM_UT_BUFFER_SIZE, TDM_UT_BUFFER_SIZE, TBM_FORMAT_ARGB8888);
114         ASSERT_NE(buffer, NULL);
115
116         tdm_test_buffer_fill(buffer, PATTERN_SMPTE);
117
118         tdm_helper_clear_buffer_color(buffer, &pos, color);
119
120         char filename[256];
121         snprintf(filename, sizeof filename, "%s.png", typeid(*this).name());
122         tdm_helper_dump_buffer(buffer, (const char*)filename);
123
124         tbm_surface_destroy(buffer);
125 }
126
127 TEST_P(TDMHelper, HelperClearBufferARGB)
128 {
129         tbm_surface_h buffer;
130
131         buffer = tbm_surface_create(TDM_UT_BUFFER_SIZE, TDM_UT_BUFFER_SIZE, TBM_FORMAT_ARGB8888);
132         ASSERT_NE(buffer, NULL);
133
134         tdm_test_buffer_fill(buffer, PATTERN_SMPTE);
135
136         tdm_helper_clear_buffer(buffer);
137
138         char filename[256];
139         snprintf(filename, sizeof filename, "%s.png", typeid(*this).name());
140         tdm_helper_dump_buffer(buffer, (const char*)filename);
141
142         tbm_surface_destroy(buffer);
143 }
144
145 TEST_P(TDMHelper, HelperClearBufferXRGB)
146 {
147         tbm_surface_h buffer;
148
149         buffer = tbm_surface_create(TDM_UT_BUFFER_SIZE, TDM_UT_BUFFER_SIZE, TBM_FORMAT_XRGB8888);
150         ASSERT_NE(buffer, NULL);
151
152         tdm_test_buffer_fill(buffer, PATTERN_SMPTE);
153
154         tdm_helper_clear_buffer(buffer);
155
156         char filename[256];
157         snprintf(filename, sizeof filename, "%s.png", typeid(*this).name());
158         tdm_helper_dump_buffer(buffer, (const char*)filename);
159
160         tbm_surface_destroy(buffer);
161 }
162
163 TEST_P(TDMHelper, HelperClearBufferYUV420)
164 {
165         tbm_surface_h buffer;
166
167         buffer = tbm_surface_create(TDM_UT_BUFFER_SIZE, TDM_UT_BUFFER_SIZE, TBM_FORMAT_YUV420);
168         ASSERT_NE(buffer, NULL);
169
170         tdm_test_buffer_fill(buffer, PATTERN_SMPTE);
171
172         tdm_helper_clear_buffer(buffer);
173
174         char filename[256];
175         snprintf(filename, sizeof filename, "%s.png", typeid(*this).name());
176         tdm_helper_dump_buffer(buffer, (const char*)filename);
177
178         tbm_surface_destroy(buffer);
179 }
180
181 TEST_P(TDMHelper, HelperClearBufferNV12)
182 {
183         tbm_surface_h buffer;
184
185         buffer = tbm_surface_create(TDM_UT_BUFFER_SIZE, TDM_UT_BUFFER_SIZE, TBM_FORMAT_NV12);
186         ASSERT_NE(buffer, NULL);
187
188         tdm_test_buffer_fill(buffer, PATTERN_SMPTE);
189
190         tdm_helper_clear_buffer(buffer);
191
192         char filename[256];
193         snprintf(filename, sizeof filename, "%s.png", typeid(*this).name());
194         tdm_helper_dump_buffer(buffer, (const char*)filename);
195
196         tbm_surface_destroy(buffer);
197 }
198
199 TEST_P(TDMHelper, HelperClearBufferNV21)
200 {
201         tbm_surface_h buffer;
202
203         buffer = tbm_surface_create(TDM_UT_BUFFER_SIZE, TDM_UT_BUFFER_SIZE, TBM_FORMAT_NV21);
204         ASSERT_NE(buffer, NULL);
205
206         tdm_test_buffer_fill(buffer, PATTERN_SMPTE);
207
208         tdm_helper_clear_buffer(buffer);
209
210         char filename[256];
211         snprintf(filename, sizeof filename, "%s.png", typeid(*this).name());
212         tdm_helper_dump_buffer(buffer, (const char*)filename);
213
214         tbm_surface_destroy(buffer);
215 }
216
217 TEST_P(TDMHelper, HelperClearBufferYUYV)
218 {
219         tbm_surface_h buffer;
220
221         buffer = tbm_surface_create(TDM_UT_BUFFER_SIZE, TDM_UT_BUFFER_SIZE, TBM_FORMAT_YUYV);
222         ASSERT_NE(buffer, NULL);
223
224         tdm_test_buffer_fill(buffer, PATTERN_SMPTE);
225
226         tdm_helper_clear_buffer(buffer);
227
228         char filename[256];
229         snprintf(filename, sizeof filename, "%s.png", typeid(*this).name());
230         tdm_helper_dump_buffer(buffer, (const char*)filename);
231
232         tbm_surface_destroy(buffer);
233 }
234
235 TEST_P(TDMHelper, HelperClearBufferUYVY)
236 {
237         tbm_surface_h buffer;
238
239         buffer = tbm_surface_create(TDM_UT_BUFFER_SIZE, TDM_UT_BUFFER_SIZE, TBM_FORMAT_UYVY);
240         ASSERT_NE(buffer, NULL);
241
242         tdm_test_buffer_fill(buffer, PATTERN_SMPTE);
243
244         tdm_helper_clear_buffer(buffer);
245
246         char filename[256];
247         snprintf(filename, sizeof filename, "%s.png", typeid(*this).name());
248         tdm_helper_dump_buffer(buffer, (const char*)filename);
249
250         tbm_surface_destroy(buffer);
251 }
252
253 TEST_P(TDMHelper, HelperGetBufferFullSize)
254 {
255         tbm_surface_h buffer;
256         int w = TDM_UT_INVALID_VALUE, h = TDM_UT_INVALID_VALUE;
257
258         buffer = tbm_surface_create(TDM_UT_BUFFER_SIZE, TDM_UT_BUFFER_SIZE, TBM_FORMAT_ARGB8888);
259         ASSERT_NE(buffer, NULL);
260
261         tdm_helper_get_buffer_full_size(buffer, &w, &h);
262         ASSERT_NE(w, TDM_UT_INVALID_VALUE);
263         ASSERT_GE(w, tbm_surface_get_width(buffer));
264         ASSERT_NE(h, TDM_UT_INVALID_VALUE);
265         ASSERT_GE(h, tbm_surface_get_height(buffer));
266
267         tbm_surface_destroy(buffer);
268 }
269
270 TEST_P(TDMHelper, HelperConvertBufferRotate0)
271 {
272         tbm_surface_h buffer, temp;
273         tdm_pos sp, dp;
274
275         buffer = tbm_surface_create(TDM_UT_BUFFER_SIZE, TDM_UT_BUFFER_SIZE, TBM_FORMAT_ARGB8888);
276         ASSERT_NE(buffer, NULL);
277         tdm_test_buffer_fill(buffer, PATTERN_SMPTE);
278
279         temp = tbm_surface_create(TDM_UT_BUFFER_SIZE * 2, TDM_UT_BUFFER_SIZE * 2, TBM_FORMAT_ARGB8888);
280         ASSERT_NE(temp, NULL);
281
282         sp.x = sp.y = 0, sp.w = sp.h = TDM_UT_BUFFER_SIZE;
283         dp.x = dp.y = 0, dp.w = dp.h = TDM_UT_BUFFER_SIZE * 2;
284
285         ASSERT_EQ(tdm_helper_convert_buffer(buffer, temp, &sp, &dp, TDM_TRANSFORM_NORMAL, 0), TDM_ERROR_NONE);
286
287         char filename[256];
288         snprintf(filename, sizeof filename, "%s.png", typeid(*this).name());
289         tdm_helper_dump_buffer(temp, (const char*)filename);
290
291         tbm_surface_destroy(buffer);
292         tbm_surface_destroy(temp);
293 }
294
295 TEST_P(TDMHelper, HelperConvertBufferRotate0Flip)
296 {
297         tbm_surface_h buffer, temp;
298         tdm_pos sp, dp;
299
300         buffer = tbm_surface_create(TDM_UT_BUFFER_SIZE, TDM_UT_BUFFER_SIZE, TBM_FORMAT_ARGB8888);
301         ASSERT_NE(buffer, NULL);
302         tdm_test_buffer_fill(buffer, PATTERN_SMPTE);
303
304         temp = tbm_surface_create(TDM_UT_BUFFER_SIZE * 2, TDM_UT_BUFFER_SIZE * 2, TBM_FORMAT_ARGB8888);
305         ASSERT_NE(temp, NULL);
306
307         sp.x = sp.y = 0, sp.w = sp.h = TDM_UT_BUFFER_SIZE;
308         dp.x = dp.y = 0, dp.w = dp.h = TDM_UT_BUFFER_SIZE * 2;
309
310         ASSERT_EQ(tdm_helper_convert_buffer(buffer, temp, &sp, &dp, TDM_TRANSFORM_FLIPPED, 0), TDM_ERROR_NONE);
311
312         char filename[256];
313         snprintf(filename, sizeof filename, "%s.png", typeid(*this).name());
314         tdm_helper_dump_buffer(temp, (const char*)filename);
315
316         tbm_surface_destroy(buffer);
317         tbm_surface_destroy(temp);
318 }
319
320 TEST_P(TDMHelper, HelperConvertBufferRotate90)
321 {
322         tbm_surface_h buffer, temp;
323         tdm_pos sp, dp;
324
325         buffer = tbm_surface_create(TDM_UT_BUFFER_SIZE, TDM_UT_BUFFER_SIZE, TBM_FORMAT_ARGB8888);
326         ASSERT_NE(buffer, NULL);
327         tdm_test_buffer_fill(buffer, PATTERN_SMPTE);
328
329         temp = tbm_surface_create(TDM_UT_BUFFER_SIZE * 2, TDM_UT_BUFFER_SIZE * 2, TBM_FORMAT_ARGB8888);
330         ASSERT_NE(temp, NULL);
331
332         sp.x = sp.y = 0, sp.w = sp.h = TDM_UT_BUFFER_SIZE;
333         dp.x = dp.y = 0, dp.w = dp.h = TDM_UT_BUFFER_SIZE * 2;
334
335         ASSERT_EQ(tdm_helper_convert_buffer(buffer, temp, &sp, &dp, TDM_TRANSFORM_90, 0), TDM_ERROR_NONE);
336
337         char filename[256];
338         snprintf(filename, sizeof filename, "%s.png", typeid(*this).name());
339         tdm_helper_dump_buffer(temp, (const char*)filename);
340
341         tbm_surface_destroy(buffer);
342         tbm_surface_destroy(temp);
343 }
344
345 TEST_P(TDMHelper, HelperConvertBufferRotate180)
346 {
347         tbm_surface_h buffer, temp;
348         tdm_pos sp, dp;
349
350         buffer = tbm_surface_create(TDM_UT_BUFFER_SIZE, TDM_UT_BUFFER_SIZE, TBM_FORMAT_ARGB8888);
351         ASSERT_NE(buffer, NULL);
352         tdm_test_buffer_fill(buffer, PATTERN_SMPTE);
353
354         temp = tbm_surface_create(TDM_UT_BUFFER_SIZE * 2, TDM_UT_BUFFER_SIZE * 2, TBM_FORMAT_ARGB8888);
355         ASSERT_NE(temp, NULL);
356
357         sp.x = sp.y = 0, sp.w = sp.h = TDM_UT_BUFFER_SIZE;
358         dp.x = dp.y = 0, dp.w = dp.h = TDM_UT_BUFFER_SIZE * 2;
359
360         ASSERT_EQ(tdm_helper_convert_buffer(buffer, temp, &sp, &dp, TDM_TRANSFORM_180, 0), TDM_ERROR_NONE);
361
362         char filename[256];
363         snprintf(filename, sizeof filename, "%s.png", typeid(*this).name());
364         tdm_helper_dump_buffer(temp, (const char*)filename);
365
366         tbm_surface_destroy(buffer);
367         tbm_surface_destroy(temp);
368 }
369
370 TEST_P(TDMHelper, HelperConvertBufferRotate270)
371 {
372         tbm_surface_h buffer, temp;
373         tdm_pos sp, dp;
374
375         buffer = tbm_surface_create(TDM_UT_BUFFER_SIZE, TDM_UT_BUFFER_SIZE, TBM_FORMAT_ARGB8888);
376         ASSERT_NE(buffer, NULL);
377         tdm_test_buffer_fill(buffer, PATTERN_SMPTE);
378
379         temp = tbm_surface_create(TDM_UT_BUFFER_SIZE * 2, TDM_UT_BUFFER_SIZE * 2, TBM_FORMAT_ARGB8888);
380         ASSERT_NE(temp, NULL);
381
382         sp.x = sp.y = 0, sp.w = sp.h = TDM_UT_BUFFER_SIZE;
383         dp.x = dp.y = 0, dp.w = dp.h = TDM_UT_BUFFER_SIZE * 2;
384
385         ASSERT_EQ(tdm_helper_convert_buffer(buffer, temp, &sp, &dp, TDM_TRANSFORM_270, 0), TDM_ERROR_NONE);
386
387         char filename[256];
388         snprintf(filename, sizeof filename, "%s.png", typeid(*this).name());
389         tdm_helper_dump_buffer(temp, (const char*)filename);
390
391         tbm_surface_destroy(buffer);
392         tbm_surface_destroy(temp);
393 }
394
395 TEST_P(TDMHelper, HelperConvertBufferYUV420)
396 {
397         tbm_surface_h buffer, temp;
398         tdm_pos sp, dp;
399
400         buffer = tbm_surface_create(TDM_UT_BUFFER_SIZE, TDM_UT_BUFFER_SIZE, TBM_FORMAT_YUV420);
401         ASSERT_NE(buffer, NULL);
402         tdm_test_buffer_fill(buffer, PATTERN_SMPTE);
403
404         temp = tbm_surface_create(TDM_UT_BUFFER_SIZE * 2, TDM_UT_BUFFER_SIZE * 2, TBM_FORMAT_YUV420);
405         ASSERT_NE(temp, NULL);
406
407         sp.x = sp.y = 0, sp.w = sp.h = TDM_UT_BUFFER_SIZE;
408         dp.x = dp.y = 0, dp.w = dp.h = TDM_UT_BUFFER_SIZE * 2;
409
410         ASSERT_EQ(tdm_helper_convert_buffer(buffer, temp, &sp, &dp, TDM_TRANSFORM_NORMAL, 0), TDM_ERROR_OPERATION_FAILED);
411
412         tbm_surface_destroy(buffer);
413         tbm_surface_destroy(temp);
414 }
415
416 TEST_P(TDMHelper, HelperGetFD)
417 {
418         int fd = tdm_helper_get_fd("TDM_DRM_MASTER_FD");
419         ASSERT_GE(fd, 0);
420         close(fd);
421         fd = tdm_helper_get_fd("BLURBLUR");
422         ASSERT_EQ(fd, -1);
423 }
424
425 TEST_P(TDMHelper, HelperSetFD)
426 {
427         tdm_helper_set_fd("TDM_DRM_MASTER_FD", -1);
428         tdm_helper_set_fd("BLURBLUR", -1);
429 }
430
431 TEST_P(TDMHelper, HelperDumpStart)
432 {
433         char path[256];
434         int count = 0;
435         snprintf(path, sizeof path, "blurblur");
436         tdm_helper_dump_start(path, &count);
437         tdm_helper_dump_stop();
438 }
439
440 static void
441 _ut_tdm_helper_capture_cb(tbm_surface_h buffer, void *user_data)
442 {
443 }
444
445 TEST_P(TDMHelper, HelperCaptureOutput)
446 {
447         tdm_error ret;
448         tdm_output *output;
449
450         for (int o = 0; o < output_count; o++) {
451                 tbm_surface_h dump;
452
453                 output = tdm_display_get_output(dpy, o, &ret);
454                 ASSERT_EQ(ret, TDM_ERROR_NONE);
455                 ASSERT_NE(output, NULL);
456
457                 if (!ut_tdm_output_is_connected(output))
458                         continue;
459
460                 ASSERT_EQ(ut_tdm_output_prepare(dpy, output, true), true);
461
462                 dump = tbm_surface_create(TDM_UT_BUFFER_SIZE, TDM_UT_BUFFER_SIZE, TBM_FORMAT_ARGB8888);
463                 ASSERT_NE(dump, NULL);
464
465                 ASSERT_EQ(tdm_helper_capture_output(output, dump, 0, 0, TDM_UT_BUFFER_SIZE, TDM_UT_BUFFER_SIZE,
466                                                                                         _ut_tdm_helper_capture_cb, NULL), TDM_ERROR_NONE);
467
468                 char filename[256];
469                 snprintf(filename, sizeof filename, "%s.png", typeid(*this).name());
470                 tdm_helper_dump_buffer(dump, (const char*)filename);
471
472                 tbm_surface_destroy(dump);
473         }
474 }
475
476
477 TEST_P(TDMHelper, HelperCaptureOutputNullObject)
478 {
479         tbm_surface_h dump = (tbm_surface_h)TDM_UT_INVALID_VALUE;
480
481         ASSERT_EQ(tdm_helper_capture_output(NULL, dump, 0, 0, TDM_UT_BUFFER_SIZE, TDM_UT_BUFFER_SIZE,
482                                                                                 _ut_tdm_helper_capture_cb, NULL), TDM_ERROR_INVALID_PARAMETER);
483 }
484
485 TEST_P(TDMHelper, HelperCaptureOutputNullOther)
486 {
487         for (int o = 0; o < output_count; o++) {
488                 tdm_error ret;
489                 tdm_output *output = tdm_display_get_output(dpy, o, &ret);
490                 ASSERT_EQ(ret, TDM_ERROR_NONE);
491                 ASSERT_NE(output, NULL);
492                 tdm_helper_output_commit_per_vblank_enabled(output);
493         }
494
495         tbm_surface_h dump = (tbm_surface_h)TDM_UT_INVALID_VALUE;
496
497         ASSERT_EQ(tdm_helper_capture_output(NULL, dump, 0, 0, TDM_UT_BUFFER_SIZE, TDM_UT_BUFFER_SIZE,
498                                                                                 _ut_tdm_helper_capture_cb, NULL), TDM_ERROR_INVALID_PARAMETER);
499 }
500
501 TEST_P(TDMHelper, HelperGetDisplayInformation)
502 {
503         char reply[8192];
504         int len = sizeof reply;
505
506         for (int o = 0; o < output_count; o++) {
507                 tdm_error ret;
508                 tdm_output *output = tdm_display_get_output(dpy, o, &ret);
509                 ASSERT_EQ(ret, TDM_ERROR_NONE);
510                 ASSERT_NE(output, NULL);
511                 if (!ut_tdm_output_is_connected(output))
512                         continue;
513                 ASSERT_EQ(ut_tdm_output_prepare(dpy, output, true), true);
514         }
515
516         tdm_helper_get_display_information(dpy, reply, &len);
517         TDM_INFO("%s", reply);
518 }
519
520 TEST_P(TDMHelper, HelperGetDisplayInformationNullObject)
521 {
522         char reply[8192];
523         int len = sizeof reply;
524
525         tdm_helper_get_display_information(NULL, reply, &len);
526 }
527
528 TEST_P(TDMHelper, HelperGetDisplayInformationNullOther)
529 {
530         tdm_helper_get_display_information(dpy, NULL, NULL);
531 }
532
533 TEST_P(TDMHelper, HelperCommitPerVblankEnabled)
534 {
535         tdm_helper_commit_per_vblank_enabled(dpy);
536 }
537
538 TEST_P(TDMHelper, HelperCommitPerVblankEnabledNullOBject)
539 {
540         tdm_helper_commit_per_vblank_enabled(NULL);
541 }
542
543 TEST_P(TDMHelper, HelperOutputCommitPerVblankEnabled)
544 {
545         for (int o = 0; o < output_count; o++) {
546                 tdm_error ret;
547                 tdm_output *output = tdm_display_get_output(dpy, o, &ret);
548                 ASSERT_EQ(ret, TDM_ERROR_NONE);
549                 ASSERT_NE(output, NULL);
550                 tdm_helper_output_commit_per_vblank_enabled(output);
551         }
552 }
553
554 TEST_P(TDMHelper, HelperOutputCommitPerVblankEnabledNullObject)
555 {
556         tdm_helper_output_commit_per_vblank_enabled(NULL);
557 }
558
559 #ifdef TDM_UT_TEST_WITH_PARAMS
560 INSTANTIATE_TEST_CASE_P(TDMHelperParams,
561                                                 TDMHelper,
562                                                 Combine(Bool(), Bool(), Values(TDM_DEFAULT_MODULE)));
563 #else
564 INSTANTIATE_TEST_CASE_P(TDMHelperParams,
565                                                 TDMHelper,
566                                                 Values(TDM_DEFAULT_MODULE));
567 #endif