e0580d07429355ef04a5c9510c39d1e932d35e5d
[platform/core/uifw/dali-adaptor.git] / automated-tests / src / dali-adaptor / utc-Dali-Window.cpp
1 /*
2  * Copyright (c) 2021 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 #include <dali-test-suite-utils.h>
19 #include <dali/dali.h>
20 #include <dali/devel-api/adaptor-framework/window-devel.h>
21 #include <dali/internal/system/linux/dali-ecore-x.h>
22
23 using namespace Dali;
24
25 void utc_dali_window_startup(void)
26 {
27   test_return_value = TET_UNDEF;
28 }
29
30 void utc_dali_window_cleanup(void)
31 {
32   test_return_value = TET_PASS;
33 }
34
35 namespace
36 {
37 intptr_t screenId = 0; // intptr_t has the same size as a pointer and is platform independent so this can be returned as a pointer in ecore_x_default_screen_get below without compilation warnings
38
39 } // unnamed namespace
40
41 extern "C"
42 {
43   Ecore_X_Screen* ecore_x_default_screen_get(void)
44   {
45     screenId += 8;
46     return (Ecore_X_Screen*)screenId;
47   }
48
49   void ecore_x_screen_size_get(const Ecore_X_Screen* screen, int* w, int* h)
50   {
51     *w = 100;
52     *h = 100;
53   }
54
55   Ecore_X_Window ecore_x_window_argb_new(Ecore_X_Window parent, int x, int y, int w, int h)
56   {
57     return 0;
58   }
59 }
60
61 int UtcDaliWindowConstructorP(void)
62 {
63   Dali::Window window;
64   DALI_TEST_CHECK(!window);
65   END_TEST;
66 }
67
68 int UtcDaliWindowCopyConstructorP(void)
69 {
70   Dali::Window window;
71   Dali::Window copy(window);
72   DALI_TEST_CHECK(copy == window);
73
74   END_TEST;
75 }
76
77 int UtcDaliWindowConstructorFromInternalPointerN(void)
78 {
79   Internal::Adaptor::Window* internalWindow = NULL;
80   Dali::Window               window(internalWindow);
81   DALI_TEST_CHECK(!window); // Should not reach here!
82
83   END_TEST;
84 }
85
86 int UtcDaliWindowAssignmentOperatorP(void)
87 {
88   const Dali::Window window;
89   Dali::Window       copy;
90   DALI_TEST_CHECK(!copy);
91   copy = window;
92   DALI_TEST_CHECK(copy == window);
93
94   END_TEST;
95 }
96
97 int UtcDaliWindowDestructorP(void)
98 {
99   Dali::Window* window = new Dali::Window();
100   delete window;
101
102   DALI_TEST_CHECK(true);
103   END_TEST;
104 }
105
106 int UtcDaliWindowNewN(void)
107 {
108   // Attempt to create a new window
109   try
110   {
111     PositionSize windowPosition(0, 0, 0, 0);
112     Dali::Window window = Dali::Window::New(windowPosition, "test-window", true);
113
114     tet_result(TET_FAIL);
115   }
116   catch(DaliException& e)
117   {
118     DALI_TEST_ASSERT(e, "Failed to create X window", TEST_LOCATION);
119   }
120
121   // Attempt to create a new window
122   try
123   {
124     PositionSize windowPosition(0, 0, 0, 0);
125     Dali::Window window = Dali::Window::New(windowPosition, "test-window", "test-window-class", true);
126
127     tet_result(TET_FAIL);
128   }
129   catch(DaliException& e)
130   {
131     DALI_TEST_ASSERT(e, "Failed to create X window", TEST_LOCATION);
132   }
133
134   END_TEST;
135 }
136
137 int UtcDaliWindowSetClassN(void)
138 {
139   Dali::Window window;
140   try
141   {
142     window.SetClass("window-name", "window-class");
143     DALI_TEST_CHECK(false); // Should not reach here!
144   }
145   catch(...)
146   {
147     DALI_TEST_CHECK(true);
148   }
149
150   END_TEST;
151 }
152
153 int UtcDaliWindowRaiseN(void)
154 {
155   Dali::Window window;
156   try
157   {
158     window.Raise();
159     DALI_TEST_CHECK(false); // Should not reach here!
160   }
161   catch(...)
162   {
163     DALI_TEST_CHECK(true);
164   }
165
166   END_TEST;
167 }
168
169 int UtcDaliWindowLowerN(void)
170 {
171   Dali::Window window;
172   try
173   {
174     window.Lower();
175     DALI_TEST_CHECK(false); // Should not reach here!
176   }
177   catch(...)
178   {
179     DALI_TEST_CHECK(true);
180   }
181
182   END_TEST;
183 }
184
185 int UtcDaliWindowActivateN(void)
186 {
187   Dali::Window window;
188   try
189   {
190     window.Activate();
191     DALI_TEST_CHECK(false); // Should not reach here!
192   }
193   catch(...)
194   {
195     DALI_TEST_CHECK(true);
196   }
197
198   END_TEST;
199 }
200
201 int UtcDaliWindowAddAvailableOrientationN(void)
202 {
203   Dali::Window window;
204   try
205   {
206     window.AddAvailableOrientation(Dali::WindowOrientation::PORTRAIT);
207     DALI_TEST_CHECK(false); // Should not reach here!
208   }
209   catch(...)
210   {
211     DALI_TEST_CHECK(true);
212   }
213
214   END_TEST;
215 }
216
217 int UtcDaliWindowRemoveAvailableOrientationN(void)
218 {
219   Dali::Window window;
220   try
221   {
222     window.RemoveAvailableOrientation(Dali::WindowOrientation::PORTRAIT);
223     DALI_TEST_CHECK(false); // Should not reach here!
224   }
225   catch(...)
226   {
227     DALI_TEST_CHECK(true);
228   }
229
230   END_TEST;
231 }
232
233 int UtcDaliWindowSetPreferredOrientationN(void)
234 {
235   Dali::Window window;
236   try
237   {
238     window.SetPreferredOrientation(Dali::WindowOrientation::PORTRAIT);
239     DALI_TEST_CHECK(false); // Should not reach here!
240   }
241   catch(...)
242   {
243     DALI_TEST_CHECK(true);
244   }
245
246   END_TEST;
247 }
248
249 int UtcDaliWindowGetPreferredOrientationN(void)
250 {
251   Dali::Window window;
252   try
253   {
254     Dali::WindowOrientation orientation = window.GetPreferredOrientation();
255     DALI_TEST_CHECK(orientation == Dali::WindowOrientation::PORTRAIT); // Should not reach here!
256   }
257   catch(...)
258   {
259     DALI_TEST_CHECK(true);
260   }
261
262   END_TEST;
263 }
264
265 int UtcDaliWindowSetPositionSizeWithOrientationN(void)
266 {
267   Dali::Window window;
268   try
269   {
270     DevelWindow::SetPositionSizeWithOrientation(window, PositionSize(0, 0, 200, 100), Dali::WindowOrientation::PORTRAIT);
271     DALI_TEST_CHECK(false); // Should not reach here!
272   }
273   catch(...)
274   {
275     DALI_TEST_CHECK(true);
276   }
277
278   END_TEST;
279 }
280
281 int UtcDaliWindowGetNativeHandleN(void)
282 {
283   Dali::Window window;
284   try
285   {
286     Dali::Any handle = window.GetNativeHandle();
287     DALI_TEST_CHECK(false); // Should not reach here!
288   }
289   catch(...)
290   {
291     DALI_TEST_CHECK(true);
292   }
293
294   END_TEST;
295 }
296
297 int UtcDaliWindowSetAcceptFocusN(void)
298 {
299   Dali::Window window;
300   try
301   {
302     window.SetAcceptFocus(true);
303     DALI_TEST_CHECK(false); // Should not reach here!
304   }
305   catch(...)
306   {
307     DALI_TEST_CHECK(true);
308   }
309
310   END_TEST;
311 }
312
313 int UtcDaliWindowIsFocusAcceptableN(void)
314 {
315   Dali::Window window;
316   try
317   {
318     window.IsFocusAcceptable();
319     DALI_TEST_CHECK(false); // Should not reach here!
320   }
321   catch(...)
322   {
323     DALI_TEST_CHECK(true);
324   }
325
326   END_TEST;
327 }
328
329 int UtcDaliWindowFocusChangeSignalN(void)
330 {
331   Dali::Window window;
332   try
333   {
334     window.FocusChangeSignal();
335     DALI_TEST_CHECK(false); // Should not reach here!
336   }
337   catch(...)
338   {
339     DALI_TEST_CHECK(true);
340   }
341
342   END_TEST;
343 }
344
345 int UtcDaliWindowSetPositionNegative(void)
346 {
347   Dali::Window instance;
348   try
349   {
350     Dali::Uint16Pair arg1;
351     instance.SetPosition(arg1);
352     DALI_TEST_CHECK(false); // Should not get here
353   }
354   catch(...)
355   {
356     DALI_TEST_CHECK(true); // We expect an assert
357   }
358   END_TEST;
359 }
360
361 int UtcDaliWindowResizeSignalNegative(void)
362 {
363   Dali::Window instance;
364   try
365   {
366     instance.ResizeSignal();
367     DALI_TEST_CHECK(false); // Should not get here
368   }
369   catch(...)
370   {
371     DALI_TEST_CHECK(true); // We expect an assert
372   }
373   END_TEST;
374 }
375
376 int UtcDaliWindowSetBrightnessNegative(void)
377 {
378   Dali::Window instance;
379   try
380   {
381     int arg1(0);
382     instance.SetBrightness(arg1);
383     DALI_TEST_CHECK(false); // Should not get here
384   }
385   catch(...)
386   {
387     DALI_TEST_CHECK(true); // We expect an assert
388   }
389   END_TEST;
390 }
391
392 int UtcDaliWindowTouchedSignalNegative(void)
393 {
394   Dali::Window instance;
395   try
396   {
397     instance.TouchedSignal();
398     DALI_TEST_CHECK(false); // Should not get here
399   }
400   catch(...)
401   {
402     DALI_TEST_CHECK(true); // We expect an assert
403   }
404   END_TEST;
405 }
406
407 int UtcDaliWindowKeyEventSignalNegative(void)
408 {
409   Dali::Window instance;
410   try
411   {
412     instance.KeyEventSignal();
413     DALI_TEST_CHECK(false); // Should not get here
414   }
415   catch(...)
416   {
417     DALI_TEST_CHECK(true); // We expect an assert
418   }
419   END_TEST;
420 }
421
422 int UtcDaliWindowSetAcceptFocusNegative(void)
423 {
424   Dali::Window instance;
425   try
426   {
427     bool arg1(false);
428     instance.SetAcceptFocus(arg1);
429     DALI_TEST_CHECK(false); // Should not get here
430   }
431   catch(...)
432   {
433     DALI_TEST_CHECK(true); // We expect an assert
434   }
435   END_TEST;
436 }
437
438 int UtcDaliWindowSetInputRegionNegative(void)
439 {
440   Dali::Window instance;
441   try
442   {
443     Dali::Rect<int> arg1;
444     instance.SetInputRegion(arg1);
445     DALI_TEST_CHECK(false); // Should not get here
446   }
447   catch(...)
448   {
449     DALI_TEST_CHECK(true); // We expect an assert
450   }
451   END_TEST;
452 }
453
454 int UtcDaliWindowSetOpaqueStateNegative(void)
455 {
456   Dali::Window instance;
457   try
458   {
459     bool arg1(false);
460     instance.SetOpaqueState(arg1);
461     DALI_TEST_CHECK(false); // Should not get here
462   }
463   catch(...)
464   {
465     DALI_TEST_CHECK(true); // We expect an assert
466   }
467   END_TEST;
468 }
469
470 int UtcDaliWindowSetTransparencyNegative(void)
471 {
472   Dali::Window instance;
473   try
474   {
475     bool arg1(false);
476     instance.SetTransparency(arg1);
477     DALI_TEST_CHECK(false); // Should not get here
478   }
479   catch(...)
480   {
481     DALI_TEST_CHECK(true); // We expect an assert
482   }
483   END_TEST;
484 }
485
486 int UtcDaliWindowAddAuxiliaryHintNegative(void)
487 {
488   Dali::Window instance;
489   try
490   {
491     std::string arg1;
492     std::string arg2;
493     instance.AddAuxiliaryHint(arg1, arg2);
494     DALI_TEST_CHECK(false); // Should not get here
495   }
496   catch(...)
497   {
498     DALI_TEST_CHECK(true); // We expect an assert
499   }
500   END_TEST;
501 }
502
503 int UtcDaliWindowSetScreenOffModeNegative(void)
504 {
505   Dali::Window instance;
506   try
507   {
508     Dali::WindowScreenOffMode arg1(Dali::WindowScreenOffMode::NEVER);
509     instance.SetScreenOffMode(arg1);
510     DALI_TEST_CHECK(false); // Should not get here
511   }
512   catch(...)
513   {
514     DALI_TEST_CHECK(true); // We expect an assert
515   }
516   END_TEST;
517 }
518
519 int UtcDaliWindowFocusChangeSignalNegative(void)
520 {
521   Dali::Window instance;
522   try
523   {
524     instance.FocusChangeSignal();
525     DALI_TEST_CHECK(false); // Should not get here
526   }
527   catch(...)
528   {
529     DALI_TEST_CHECK(true); // We expect an assert
530   }
531   END_TEST;
532 }
533
534 int UtcDaliWindowGetRenderTaskListNegative(void)
535 {
536   Dali::Window instance;
537   try
538   {
539     instance.GetRenderTaskList();
540     DALI_TEST_CHECK(false); // Should not get here
541   }
542   catch(...)
543   {
544     DALI_TEST_CHECK(true); // We expect an assert
545   }
546   END_TEST;
547 }
548
549 int UtcDaliWindowSetBackgroundColorNegative(void)
550 {
551   Dali::Window instance;
552   try
553   {
554     Dali::Vector4 arg1;
555     instance.SetBackgroundColor(arg1);
556     DALI_TEST_CHECK(false); // Should not get here
557   }
558   catch(...)
559   {
560     DALI_TEST_CHECK(true); // We expect an assert
561   }
562   END_TEST;
563 }
564
565 int UtcDaliWindowRemoveAuxiliaryHintNegative(void)
566 {
567   Dali::Window instance;
568   try
569   {
570     unsigned int arg1(0u);
571     instance.RemoveAuxiliaryHint(arg1);
572     DALI_TEST_CHECK(false); // Should not get here
573   }
574   catch(...)
575   {
576     DALI_TEST_CHECK(true); // We expect an assert
577   }
578   END_TEST;
579 }
580
581 int UtcDaliWindowSetNotificationLevelNegative(void)
582 {
583   Dali::Window instance;
584   try
585   {
586     Dali::WindowNotificationLevel arg1(Dali::WindowNotificationLevel::NONE);
587     instance.SetNotificationLevel(arg1);
588     DALI_TEST_CHECK(false); // Should not get here
589   }
590   catch(...)
591   {
592     DALI_TEST_CHECK(true); // We expect an assert
593   }
594   END_TEST;
595 }
596
597 int UtcDaliWindowSetAuxiliaryHintValueNegative(void)
598 {
599   Dali::Window instance;
600   try
601   {
602     unsigned int arg1(0u);
603     std::string  arg2;
604     instance.SetAuxiliaryHintValue(arg1, arg2);
605     DALI_TEST_CHECK(false); // Should not get here
606   }
607   catch(...)
608   {
609     DALI_TEST_CHECK(true); // We expect an assert
610   }
611   END_TEST;
612 }
613
614 int UtcDaliWindowAddAvailableOrientationNegative(void)
615 {
616   Dali::Window instance;
617   try
618   {
619     Dali::WindowOrientation arg1(Dali::WindowOrientation::PORTRAIT);
620     instance.AddAvailableOrientation(arg1);
621     DALI_TEST_CHECK(false); // Should not get here
622   }
623   catch(...)
624   {
625     DALI_TEST_CHECK(true); // We expect an assert
626   }
627   END_TEST;
628 }
629
630 int UtcDaliWindowGetPreferredOrientationNegative(void)
631 {
632   Dali::Window instance;
633   try
634   {
635     instance.GetPreferredOrientation();
636     DALI_TEST_CHECK(false); // Should not get here
637   }
638   catch(...)
639   {
640     DALI_TEST_CHECK(true); // We expect an assert
641   }
642   END_TEST;
643 }
644
645 int UtcDaliWindowSetPreferredOrientationNegative(void)
646 {
647   Dali::Window instance;
648   try
649   {
650     Dali::WindowOrientation arg1(Dali::WindowOrientation::PORTRAIT);
651     instance.SetPreferredOrientation(arg1);
652     DALI_TEST_CHECK(false); // Should not get here
653   }
654   catch(...)
655   {
656     DALI_TEST_CHECK(true); // We expect an assert
657   }
658   END_TEST;
659 }
660
661 int UtcDaliWindowRemoveAvailableOrientationNegative(void)
662 {
663   Dali::Window instance;
664   try
665   {
666     Dali::WindowOrientation arg1(Dali::WindowOrientation::PORTRAIT);
667     instance.RemoveAvailableOrientation(arg1);
668     DALI_TEST_CHECK(false); // Should not get here
669   }
670   catch(...)
671   {
672     DALI_TEST_CHECK(true); // We expect an assert
673   }
674   END_TEST;
675 }
676
677 int UtcDaliWindowAddNegative(void)
678 {
679   Dali::Window instance;
680   try
681   {
682     Dali::Actor arg1;
683     instance.Add(arg1);
684     DALI_TEST_CHECK(false); // Should not get here
685   }
686   catch(...)
687   {
688     DALI_TEST_CHECK(true); // We expect an assert
689   }
690   END_TEST;
691 }
692
693 int UtcDaliWindowHideNegative(void)
694 {
695   Dali::Window instance;
696   try
697   {
698     instance.Hide();
699     DALI_TEST_CHECK(false); // Should not get here
700   }
701   catch(...)
702   {
703     DALI_TEST_CHECK(true); // We expect an assert
704   }
705   END_TEST;
706 }
707
708 int UtcDaliWindowShowNegative(void)
709 {
710   Dali::Window instance;
711   try
712   {
713     instance.Show();
714     DALI_TEST_CHECK(false); // Should not get here
715   }
716   catch(...)
717   {
718     DALI_TEST_CHECK(true); // We expect an assert
719   }
720   END_TEST;
721 }
722
723 int UtcDaliWindowLowerNegative(void)
724 {
725   Dali::Window instance;
726   try
727   {
728     instance.Lower();
729     DALI_TEST_CHECK(false); // Should not get here
730   }
731   catch(...)
732   {
733     DALI_TEST_CHECK(true); // We expect an assert
734   }
735   END_TEST;
736 }
737
738 int UtcDaliWindowRaiseNegative(void)
739 {
740   Dali::Window instance;
741   try
742   {
743     instance.Raise();
744     DALI_TEST_CHECK(false); // Should not get here
745   }
746   catch(...)
747   {
748     DALI_TEST_CHECK(true); // We expect an assert
749   }
750   END_TEST;
751 }
752
753 int UtcDaliWindowRemoveNegative(void)
754 {
755   Dali::Window instance;
756   try
757   {
758     Dali::Actor arg1;
759     instance.Remove(arg1);
760     DALI_TEST_CHECK(false); // Should not get here
761   }
762   catch(...)
763   {
764     DALI_TEST_CHECK(true); // We expect an assert
765   }
766   END_TEST;
767 }
768
769 int UtcDaliWindowSetSizeNegative(void)
770 {
771   Dali::Window instance;
772   try
773   {
774     Dali::Uint16Pair arg1;
775     instance.SetSize(arg1);
776     DALI_TEST_CHECK(false); // Should not get here
777   }
778   catch(...)
779   {
780     DALI_TEST_CHECK(true); // We expect an assert
781   }
782   END_TEST;
783 }
784
785 int UtcDaliWindowSetTypeNegative(void)
786 {
787   Dali::Window instance;
788   try
789   {
790     Dali::WindowType arg1(Dali::WindowType::NORMAL);
791     instance.SetType(arg1);
792     DALI_TEST_CHECK(false); // Should not get here
793   }
794   catch(...)
795   {
796     DALI_TEST_CHECK(true); // We expect an assert
797   }
798   END_TEST;
799 }
800
801 int UtcDaliWindowActivateNegative(void)
802 {
803   Dali::Window instance;
804   try
805   {
806     instance.Activate();
807     DALI_TEST_CHECK(false); // Should not get here
808   }
809   catch(...)
810   {
811     DALI_TEST_CHECK(true); // We expect an assert
812   }
813   END_TEST;
814 }
815
816 int UtcDaliWindowSetClassNegative(void)
817 {
818   Dali::Window instance;
819   try
820   {
821     std::string arg1;
822     std::string arg2;
823     instance.SetClass(arg1, arg2);
824     DALI_TEST_CHECK(false); // Should not get here
825   }
826   catch(...)
827   {
828     DALI_TEST_CHECK(true); // We expect an assert
829   }
830   END_TEST;
831 }
832
833 int UtcDaliWindowGetPositionNegative(void)
834 {
835   Dali::Window instance;
836   try
837   {
838     instance.GetPosition();
839     DALI_TEST_CHECK(false); // Should not get here
840   }
841   catch(...)
842   {
843     DALI_TEST_CHECK(true); // We expect an assert
844   }
845   END_TEST;
846 }
847
848 int UtcDaliWindowGetRootLayerNegative(void)
849 {
850   Dali::Window instance;
851   try
852   {
853     instance.GetRootLayer();
854     DALI_TEST_CHECK(false); // Should not get here
855   }
856   catch(...)
857   {
858     DALI_TEST_CHECK(true); // We expect an assert
859   }
860   END_TEST;
861 }
862
863 int UtcDaliWindowGetBrightnessNegative(void)
864 {
865   Dali::Window instance;
866   try
867   {
868     instance.GetBrightness();
869     DALI_TEST_CHECK(false); // Should not get here
870   }
871   catch(...)
872   {
873     DALI_TEST_CHECK(true); // We expect an assert
874   }
875   END_TEST;
876 }
877
878 int UtcDaliWindowGetLayerCountNegative(void)
879 {
880   Dali::Window instance;
881   try
882   {
883     instance.GetLayerCount();
884     DALI_TEST_CHECK(false); // Should not get here
885   }
886   catch(...)
887   {
888     DALI_TEST_CHECK(true); // We expect an assert
889   }
890   END_TEST;
891 }
892
893 int UtcDaliWindowIsOpaqueStateNegative(void)
894 {
895   Dali::Window instance;
896   try
897   {
898     instance.IsOpaqueState();
899     DALI_TEST_CHECK(false); // Should not get here
900   }
901   catch(...)
902   {
903     DALI_TEST_CHECK(true); // We expect an assert
904   }
905   END_TEST;
906 }
907
908 int UtcDaliWindowGetNativeHandleNegative(void)
909 {
910   Dali::Window instance;
911   try
912   {
913     instance.GetNativeHandle();
914     DALI_TEST_CHECK(false); // Should not get here
915   }
916   catch(...)
917   {
918     DALI_TEST_CHECK(true); // We expect an assert
919   }
920   END_TEST;
921 }
922
923 int UtcDaliWindowGetScreenOffModeNegative(void)
924 {
925   Dali::Window instance;
926   try
927   {
928     instance.GetScreenOffMode();
929     DALI_TEST_CHECK(false); // Should not get here
930   }
931   catch(...)
932   {
933     DALI_TEST_CHECK(true); // We expect an assert
934   }
935   END_TEST;
936 }
937
938 int UtcDaliWindowIsFocusAcceptableNegative(void)
939 {
940   Dali::Window instance;
941   try
942   {
943     instance.IsFocusAcceptable();
944     DALI_TEST_CHECK(false); // Should not get here
945   }
946   catch(...)
947   {
948     DALI_TEST_CHECK(true); // We expect an assert
949   }
950   END_TEST;
951 }
952
953 int UtcDaliWindowGetAuxiliaryHintIdNegative(void)
954 {
955   Dali::Window instance;
956   try
957   {
958     std::string arg1;
959     instance.GetAuxiliaryHintId(arg1);
960     DALI_TEST_CHECK(false); // Should not get here
961   }
962   catch(...)
963   {
964     DALI_TEST_CHECK(true); // We expect an assert
965   }
966   END_TEST;
967 }
968
969 int UtcDaliWindowGetBackgroundColorNegative(void)
970 {
971   Dali::Window instance;
972   try
973   {
974     instance.GetBackgroundColor();
975     DALI_TEST_CHECK(false); // Should not get here
976   }
977   catch(...)
978   {
979     DALI_TEST_CHECK(true); // We expect an assert
980   }
981   END_TEST;
982 }
983
984 int UtcDaliWindowGetNotificationLevelNegative(void)
985 {
986   Dali::Window instance;
987   try
988   {
989     instance.GetNotificationLevel();
990     DALI_TEST_CHECK(false); // Should not get here
991   }
992   catch(...)
993   {
994     DALI_TEST_CHECK(true); // We expect an assert
995   }
996   END_TEST;
997 }
998
999 int UtcDaliWindowGetAuxiliaryHintValueNegative(void)
1000 {
1001   Dali::Window instance;
1002   try
1003   {
1004     unsigned int arg1(0u);
1005     instance.GetAuxiliaryHintValue(arg1);
1006     DALI_TEST_CHECK(false); // Should not get here
1007   }
1008   catch(...)
1009   {
1010     DALI_TEST_CHECK(true); // We expect an assert
1011   }
1012   END_TEST;
1013 }
1014
1015 int UtcDaliWindowGetSupportedAuxiliaryHintNegative(void)
1016 {
1017   Dali::Window instance;
1018   try
1019   {
1020     unsigned int arg1(0u);
1021     instance.GetSupportedAuxiliaryHint(arg1);
1022     DALI_TEST_CHECK(false); // Should not get here
1023   }
1024   catch(...)
1025   {
1026     DALI_TEST_CHECK(true); // We expect an assert
1027   }
1028   END_TEST;
1029 }
1030
1031 int UtcDaliWindowGetSupportedAuxiliaryHintCountNegative(void)
1032 {
1033   Dali::Window instance;
1034   try
1035   {
1036     instance.GetSupportedAuxiliaryHintCount();
1037     DALI_TEST_CHECK(false); // Should not get here
1038   }
1039   catch(...)
1040   {
1041     DALI_TEST_CHECK(true); // We expect an assert
1042   }
1043   END_TEST;
1044 }
1045
1046 int UtcDaliWindowGetDpiNegative(void)
1047 {
1048   Dali::Window instance;
1049   try
1050   {
1051     instance.GetDpi();
1052     DALI_TEST_CHECK(false); // Should not get here
1053   }
1054   catch(...)
1055   {
1056     DALI_TEST_CHECK(true); // We expect an assert
1057   }
1058   END_TEST;
1059 }
1060
1061 int UtcDaliWindowGetSizeNegative(void)
1062 {
1063   Dali::Window instance;
1064   try
1065   {
1066     instance.GetSize();
1067     DALI_TEST_CHECK(false); // Should not get here
1068   }
1069   catch(...)
1070   {
1071     DALI_TEST_CHECK(true); // We expect an assert
1072   }
1073   END_TEST;
1074 }
1075
1076 int UtcDaliWindowGetTypeNegative(void)
1077 {
1078   Dali::Window instance;
1079   try
1080   {
1081     instance.GetType();
1082     DALI_TEST_CHECK(false); // Should not get here
1083   }
1084   catch(...)
1085   {
1086     DALI_TEST_CHECK(true); // We expect an assert
1087   }
1088   END_TEST;
1089 }
1090
1091 int UtcDaliWindowGetLayerNegative(void)
1092 {
1093   Dali::Window instance;
1094   try
1095   {
1096     unsigned int arg1(0u);
1097     instance.GetLayer(arg1);
1098     DALI_TEST_CHECK(false); // Should not get here
1099   }
1100   catch(...)
1101   {
1102     DALI_TEST_CHECK(true); // We expect an assert
1103   }
1104   END_TEST;
1105 }
1106
1107 int UtcDaliWindowIsVisibleNegative(void)
1108 {
1109   Dali::Window instance;
1110   try
1111   {
1112     instance.IsVisible();
1113     DALI_TEST_CHECK(false); // Should not get here
1114   }
1115   catch(...)
1116   {
1117     DALI_TEST_CHECK(true); // We expect an assert
1118   }
1119   END_TEST;
1120 }
1121
1122 int UtcDaliWindowGetNativeIdNegative(void)
1123 {
1124   try
1125   {
1126     Dali::Window arg1;
1127     DevelWindow::GetNativeId(arg1);
1128     DALI_TEST_CHECK(false); // Should not get here
1129   }
1130   catch(...)
1131   {
1132     DALI_TEST_CHECK(true); // We expect an assert
1133   }
1134   END_TEST;
1135 }
1136
1137 int UtcDaliWindowSetPositionSizeNegative(void)
1138 {
1139   try
1140   {
1141     Dali::Window    arg1;
1142     Dali::Rect<int> arg2;
1143     DevelWindow::SetPositionSize(arg1, arg2);
1144     DALI_TEST_CHECK(false); // Should not get here
1145   }
1146   catch(...)
1147   {
1148     DALI_TEST_CHECK(true); // We expect an assert
1149   }
1150   END_TEST;
1151 }
1152
1153 int UtcDaliWindowWheelEventSignalNegative(void)
1154 {
1155   try
1156   {
1157     Dali::Window arg1;
1158     DevelWindow::WheelEventSignal(arg1);
1159     DALI_TEST_CHECK(false); // Should not get here
1160   }
1161   catch(...)
1162   {
1163     DALI_TEST_CHECK(true); // We expect an assert
1164   }
1165   END_TEST;
1166 }
1167
1168 int UtcDaliWindowGetCurrentOrientationNegative(void)
1169 {
1170   try
1171   {
1172     Dali::Window arg1;
1173     DevelWindow::GetCurrentOrientation(arg1);
1174     DALI_TEST_CHECK(false); // Should not get here
1175   }
1176   catch(...)
1177   {
1178     DALI_TEST_CHECK(true); // We expect an assert
1179   }
1180   END_TEST;
1181 }
1182
1183 int UtcDaliWindowGetPhysicalOrientationNegative(void)
1184 {
1185   try
1186   {
1187     Dali::Window arg1;
1188     DevelWindow::GetPhysicalOrientation(arg1);
1189     DALI_TEST_CHECK(false); // Should not get here
1190   }
1191   catch(...)
1192   {
1193     DALI_TEST_CHECK(true); // We expect an assert
1194   }
1195   END_TEST;
1196 }
1197
1198 int UtcDaliWindowVisibilityChangedSignalNegative(void)
1199 {
1200   try
1201   {
1202     Dali::Window arg1;
1203     DevelWindow::VisibilityChangedSignal(arg1);
1204     DALI_TEST_CHECK(false); // Should not get here
1205   }
1206   catch(...)
1207   {
1208     DALI_TEST_CHECK(true); // We expect an assert
1209   }
1210   END_TEST;
1211 }
1212
1213 int UtcDaliWindowAddFrameRenderedCallbackNegative(void)
1214 {
1215   try
1216   {
1217     Dali::Window                        arg1;
1218     std::unique_ptr<Dali::CallbackBase> arg2;
1219     int                                 arg3(0);
1220     DevelWindow::AddFrameRenderedCallback(arg1, std::move(arg2), arg3);
1221     DALI_TEST_CHECK(false); // Should not get here
1222   }
1223   catch(...)
1224   {
1225     DALI_TEST_CHECK(true); // We expect an assert
1226   }
1227   END_TEST;
1228 }
1229
1230 int UtcDaliWindowSetAvailableOrientationsNegative(void)
1231 {
1232   try
1233   {
1234     Dali::Window                          arg1;
1235     Dali::Vector<Dali::WindowOrientation> arg2;
1236     DevelWindow::SetAvailableOrientations(arg1, arg2);
1237     DALI_TEST_CHECK(false); // Should not get here
1238   }
1239   catch(...)
1240   {
1241     DALI_TEST_CHECK(true); // We expect an assert
1242   }
1243   END_TEST;
1244 }
1245
1246 int UtcDaliWindowAddFramePresentedCallbackNegative(void)
1247 {
1248   try
1249   {
1250     Dali::Window                        arg1;
1251     std::unique_ptr<Dali::CallbackBase> arg2;
1252     int                                 arg3(0);
1253     DevelWindow::AddFramePresentedCallback(arg1, std::move(arg2), arg3);
1254     DALI_TEST_CHECK(false); // Should not get here
1255   }
1256   catch(...)
1257   {
1258     DALI_TEST_CHECK(true); // We expect an assert
1259   }
1260   END_TEST;
1261 }
1262
1263 int UtcDaliWindowTransitionEffectEventSignalNegative(void)
1264 {
1265   try
1266   {
1267     Dali::Window arg1;
1268     DevelWindow::TransitionEffectEventSignal(arg1);
1269     DALI_TEST_CHECK(false); // Should not get here
1270   }
1271   catch(...)
1272   {
1273     DALI_TEST_CHECK(true); // We expect an assert
1274   }
1275   END_TEST;
1276 }
1277
1278 int UtcDaliWindowEventProcessingFinishedSignalNegative(void)
1279 {
1280   try
1281   {
1282     Dali::Window arg1;
1283     DevelWindow::EventProcessingFinishedSignal(arg1);
1284     DALI_TEST_CHECK(false); // Should not get here
1285   }
1286   catch(...)
1287   {
1288     DALI_TEST_CHECK(true); // We expect an assert
1289   }
1290   END_TEST;
1291 }
1292
1293 int UtcDaliWindowKeyboardRepeatSettingsChangedSignalNegative(void)
1294 {
1295   try
1296   {
1297     Dali::Window arg1;
1298     DevelWindow::KeyboardRepeatSettingsChangedSignal(arg1);
1299     DALI_TEST_CHECK(false); // Should not get here
1300   }
1301   catch(...)
1302   {
1303     DALI_TEST_CHECK(true); // We expect an assert
1304   }
1305   END_TEST;
1306 }
1307
1308 int UtcDaliWindowUnparentNegative(void)
1309 {
1310   try
1311   {
1312     Dali::Window arg1;
1313     DevelWindow::Unparent(arg1);
1314     DALI_TEST_CHECK(false); // Should not get here
1315   }
1316   catch(...)
1317   {
1318     DALI_TEST_CHECK(true); // We expect an assert
1319   }
1320   END_TEST;
1321 }
1322
1323 int UtcDaliWindowGetParentNegative(void)
1324 {
1325   try
1326   {
1327     Dali::Window arg1;
1328     DevelWindow::GetParent(arg1);
1329     DALI_TEST_CHECK(false); // Should not get here
1330   }
1331   catch(...)
1332   {
1333     DALI_TEST_CHECK(true); // We expect an assert
1334   }
1335   END_TEST;
1336 }
1337
1338 int UtcDaliWindowSetParentNegative(void)
1339 {
1340   try
1341   {
1342     Dali::Window arg1;
1343     Dali::Window arg2;
1344     DevelWindow::SetParent(arg1, arg2);
1345     DALI_TEST_CHECK(false); // Should not get here
1346   }
1347   catch(...)
1348   {
1349     DALI_TEST_CHECK(true); // We expect an assert
1350   }
1351   END_TEST;
1352 }