Merge branch 'devel/master' into tizen
[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 UtcDaliWindowGetNativeHandleN(void)
266 {
267   Dali::Window window;
268   try
269   {
270     Dali::Any handle = window.GetNativeHandle();
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 UtcDaliWindowSetAcceptFocusN(void)
282 {
283   Dali::Window window;
284   try
285   {
286     window.SetAcceptFocus(true);
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 UtcDaliWindowIsFocusAcceptableN(void)
298 {
299   Dali::Window window;
300   try
301   {
302     window.IsFocusAcceptable();
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 UtcDaliWindowFocusChangeSignalN(void)
314 {
315   Dali::Window window;
316   try
317   {
318     window.FocusChangeSignal();
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 UtcDaliWindowSetPositionNegative(void)
330 {
331   Dali::Window instance;
332   try
333   {
334     Dali::Uint16Pair arg1;
335     instance.SetPosition(arg1);
336     DALI_TEST_CHECK(false); // Should not get here
337   }
338   catch(...)
339   {
340     DALI_TEST_CHECK(true); // We expect an assert
341   }
342   END_TEST;
343 }
344
345 int UtcDaliWindowResizeSignalNegative(void)
346 {
347   Dali::Window instance;
348   try
349   {
350     instance.ResizeSignal();
351     DALI_TEST_CHECK(false); // Should not get here
352   }
353   catch(...)
354   {
355     DALI_TEST_CHECK(true); // We expect an assert
356   }
357   END_TEST;
358 }
359
360 int UtcDaliWindowSetBrightnessNegative(void)
361 {
362   Dali::Window instance;
363   try
364   {
365     int arg1(0);
366     instance.SetBrightness(arg1);
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 UtcDaliWindowTouchedSignalNegative(void)
377 {
378   Dali::Window instance;
379   try
380   {
381     instance.TouchedSignal();
382     DALI_TEST_CHECK(false); // Should not get here
383   }
384   catch(...)
385   {
386     DALI_TEST_CHECK(true); // We expect an assert
387   }
388   END_TEST;
389 }
390
391 int UtcDaliWindowKeyEventSignalNegative(void)
392 {
393   Dali::Window instance;
394   try
395   {
396     instance.KeyEventSignal();
397     DALI_TEST_CHECK(false); // Should not get here
398   }
399   catch(...)
400   {
401     DALI_TEST_CHECK(true); // We expect an assert
402   }
403   END_TEST;
404 }
405
406 int UtcDaliWindowSetAcceptFocusNegative(void)
407 {
408   Dali::Window instance;
409   try
410   {
411     bool arg1(false);
412     instance.SetAcceptFocus(arg1);
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 UtcDaliWindowSetInputRegionNegative(void)
423 {
424   Dali::Window instance;
425   try
426   {
427     Dali::Rect<int> arg1;
428     instance.SetInputRegion(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 UtcDaliWindowSetOpaqueStateNegative(void)
439 {
440   Dali::Window instance;
441   try
442   {
443     bool arg1(false);
444     instance.SetOpaqueState(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 UtcDaliWindowSetTransparencyNegative(void)
455 {
456   Dali::Window instance;
457   try
458   {
459     bool arg1(false);
460     instance.SetTransparency(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 UtcDaliWindowAddAuxiliaryHintNegative(void)
471 {
472   Dali::Window instance;
473   try
474   {
475     std::string arg1;
476     std::string arg2;
477     instance.AddAuxiliaryHint(arg1,arg2);
478     DALI_TEST_CHECK(false); // Should not get here
479   }
480   catch(...)
481   {
482     DALI_TEST_CHECK(true); // We expect an assert
483   }
484   END_TEST;
485 }
486
487 int UtcDaliWindowSetScreenOffModeNegative(void)
488 {
489   Dali::Window instance;
490   try
491   {
492     Dali::WindowScreenOffMode arg1(Dali::WindowScreenOffMode::NEVER);
493     instance.SetScreenOffMode(arg1);
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 UtcDaliWindowFocusChangeSignalNegative(void)
504 {
505   Dali::Window instance;
506   try
507   {
508     instance.FocusChangeSignal();
509     DALI_TEST_CHECK(false); // Should not get here
510   }
511   catch(...)
512   {
513     DALI_TEST_CHECK(true); // We expect an assert
514   }
515   END_TEST;
516 }
517
518 int UtcDaliWindowGetRenderTaskListNegative(void)
519 {
520   Dali::Window instance;
521   try
522   {
523     instance.GetRenderTaskList();
524     DALI_TEST_CHECK(false); // Should not get here
525   }
526   catch(...)
527   {
528     DALI_TEST_CHECK(true); // We expect an assert
529   }
530   END_TEST;
531 }
532
533 int UtcDaliWindowSetBackgroundColorNegative(void)
534 {
535   Dali::Window instance;
536   try
537   {
538     Dali::Vector4 arg1;
539     instance.SetBackgroundColor(arg1);
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 UtcDaliWindowRemoveAuxiliaryHintNegative(void)
550 {
551   Dali::Window instance;
552   try
553   {
554     unsigned int arg1(0u);
555     instance.RemoveAuxiliaryHint(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 UtcDaliWindowSetNotificationLevelNegative(void)
566 {
567   Dali::Window instance;
568   try
569   {
570     Dali::WindowNotificationLevel arg1(Dali::WindowNotificationLevel::NONE);
571     instance.SetNotificationLevel(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 UtcDaliWindowSetAuxiliaryHintValueNegative(void)
582 {
583   Dali::Window instance;
584   try
585   {
586     unsigned int arg1(0u);
587     std::string arg2;
588     instance.SetAuxiliaryHintValue(arg1,arg2);
589     DALI_TEST_CHECK(false); // Should not get here
590   }
591   catch(...)
592   {
593     DALI_TEST_CHECK(true); // We expect an assert
594   }
595   END_TEST;
596 }
597
598 int UtcDaliWindowAddAvailableOrientationNegative(void)
599 {
600   Dali::Window instance;
601   try
602   {
603     Dali::WindowOrientation arg1(Dali::WindowOrientation::PORTRAIT);
604     instance.AddAvailableOrientation(arg1);
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 UtcDaliWindowGetPreferredOrientationNegative(void)
615 {
616   Dali::Window instance;
617   try
618   {
619     instance.GetPreferredOrientation();
620     DALI_TEST_CHECK(false); // Should not get here
621   }
622   catch(...)
623   {
624     DALI_TEST_CHECK(true); // We expect an assert
625   }
626   END_TEST;
627 }
628
629 int UtcDaliWindowSetPreferredOrientationNegative(void)
630 {
631   Dali::Window instance;
632   try
633   {
634     Dali::WindowOrientation arg1(Dali::WindowOrientation::PORTRAIT);
635     instance.SetPreferredOrientation(arg1);
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 UtcDaliWindowRemoveAvailableOrientationNegative(void)
646 {
647   Dali::Window instance;
648   try
649   {
650     Dali::WindowOrientation arg1(Dali::WindowOrientation::PORTRAIT);
651     instance.RemoveAvailableOrientation(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 UtcDaliWindowAddNegative(void)
662 {
663   Dali::Window instance;
664   try
665   {
666     Dali::Actor arg1;
667     instance.Add(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 UtcDaliWindowHideNegative(void)
678 {
679   Dali::Window instance;
680   try
681   {
682     instance.Hide();
683     DALI_TEST_CHECK(false); // Should not get here
684   }
685   catch(...)
686   {
687     DALI_TEST_CHECK(true); // We expect an assert
688   }
689   END_TEST;
690 }
691
692 int UtcDaliWindowShowNegative(void)
693 {
694   Dali::Window instance;
695   try
696   {
697     instance.Show();
698     DALI_TEST_CHECK(false); // Should not get here
699   }
700   catch(...)
701   {
702     DALI_TEST_CHECK(true); // We expect an assert
703   }
704   END_TEST;
705 }
706
707 int UtcDaliWindowLowerNegative(void)
708 {
709   Dali::Window instance;
710   try
711   {
712     instance.Lower();
713     DALI_TEST_CHECK(false); // Should not get here
714   }
715   catch(...)
716   {
717     DALI_TEST_CHECK(true); // We expect an assert
718   }
719   END_TEST;
720 }
721
722 int UtcDaliWindowRaiseNegative(void)
723 {
724   Dali::Window instance;
725   try
726   {
727     instance.Raise();
728     DALI_TEST_CHECK(false); // Should not get here
729   }
730   catch(...)
731   {
732     DALI_TEST_CHECK(true); // We expect an assert
733   }
734   END_TEST;
735 }
736
737 int UtcDaliWindowRemoveNegative(void)
738 {
739   Dali::Window instance;
740   try
741   {
742     Dali::Actor arg1;
743     instance.Remove(arg1);
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 UtcDaliWindowSetSizeNegative(void)
754 {
755   Dali::Window instance;
756   try
757   {
758     Dali::Uint16Pair arg1;
759     instance.SetSize(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 UtcDaliWindowSetTypeNegative(void)
770 {
771   Dali::Window instance;
772   try
773   {
774     Dali::WindowType arg1(Dali::WindowType::NORMAL);
775     instance.SetType(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 UtcDaliWindowActivateNegative(void)
786 {
787   Dali::Window instance;
788   try
789   {
790     instance.Activate();
791     DALI_TEST_CHECK(false); // Should not get here
792   }
793   catch(...)
794   {
795     DALI_TEST_CHECK(true); // We expect an assert
796   }
797   END_TEST;
798 }
799
800 int UtcDaliWindowSetClassNegative(void)
801 {
802   Dali::Window instance;
803   try
804   {
805     std::string arg1;
806     std::string arg2;
807     instance.SetClass(arg1,arg2);
808     DALI_TEST_CHECK(false); // Should not get here
809   }
810   catch(...)
811   {
812     DALI_TEST_CHECK(true); // We expect an assert
813   }
814   END_TEST;
815 }
816
817 int UtcDaliWindowGetPositionNegative(void)
818 {
819   Dali::Window instance;
820   try
821   {
822     instance.GetPosition();
823     DALI_TEST_CHECK(false); // Should not get here
824   }
825   catch(...)
826   {
827     DALI_TEST_CHECK(true); // We expect an assert
828   }
829   END_TEST;
830 }
831
832 int UtcDaliWindowGetRootLayerNegative(void)
833 {
834   Dali::Window instance;
835   try
836   {
837     instance.GetRootLayer();
838     DALI_TEST_CHECK(false); // Should not get here
839   }
840   catch(...)
841   {
842     DALI_TEST_CHECK(true); // We expect an assert
843   }
844   END_TEST;
845 }
846
847 int UtcDaliWindowGetBrightnessNegative(void)
848 {
849   Dali::Window instance;
850   try
851   {
852     instance.GetBrightness();
853     DALI_TEST_CHECK(false); // Should not get here
854   }
855   catch(...)
856   {
857     DALI_TEST_CHECK(true); // We expect an assert
858   }
859   END_TEST;
860 }
861
862 int UtcDaliWindowGetLayerCountNegative(void)
863 {
864   Dali::Window instance;
865   try
866   {
867     instance.GetLayerCount();
868     DALI_TEST_CHECK(false); // Should not get here
869   }
870   catch(...)
871   {
872     DALI_TEST_CHECK(true); // We expect an assert
873   }
874   END_TEST;
875 }
876
877 int UtcDaliWindowIsOpaqueStateNegative(void)
878 {
879   Dali::Window instance;
880   try
881   {
882     instance.IsOpaqueState();
883     DALI_TEST_CHECK(false); // Should not get here
884   }
885   catch(...)
886   {
887     DALI_TEST_CHECK(true); // We expect an assert
888   }
889   END_TEST;
890 }
891
892 int UtcDaliWindowGetNativeHandleNegative(void)
893 {
894   Dali::Window instance;
895   try
896   {
897     instance.GetNativeHandle();
898     DALI_TEST_CHECK(false); // Should not get here
899   }
900   catch(...)
901   {
902     DALI_TEST_CHECK(true); // We expect an assert
903   }
904   END_TEST;
905 }
906
907 int UtcDaliWindowGetScreenOffModeNegative(void)
908 {
909   Dali::Window instance;
910   try
911   {
912     instance.GetScreenOffMode();
913     DALI_TEST_CHECK(false); // Should not get here
914   }
915   catch(...)
916   {
917     DALI_TEST_CHECK(true); // We expect an assert
918   }
919   END_TEST;
920 }
921
922 int UtcDaliWindowIsFocusAcceptableNegative(void)
923 {
924   Dali::Window instance;
925   try
926   {
927     instance.IsFocusAcceptable();
928     DALI_TEST_CHECK(false); // Should not get here
929   }
930   catch(...)
931   {
932     DALI_TEST_CHECK(true); // We expect an assert
933   }
934   END_TEST;
935 }
936
937 int UtcDaliWindowGetAuxiliaryHintIdNegative(void)
938 {
939   Dali::Window instance;
940   try
941   {
942     std::string arg1;
943     instance.GetAuxiliaryHintId(arg1);
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 UtcDaliWindowGetBackgroundColorNegative(void)
954 {
955   Dali::Window instance;
956   try
957   {
958     instance.GetBackgroundColor();
959     DALI_TEST_CHECK(false); // Should not get here
960   }
961   catch(...)
962   {
963     DALI_TEST_CHECK(true); // We expect an assert
964   }
965   END_TEST;
966 }
967
968 int UtcDaliWindowGetNotificationLevelNegative(void)
969 {
970   Dali::Window instance;
971   try
972   {
973     instance.GetNotificationLevel();
974     DALI_TEST_CHECK(false); // Should not get here
975   }
976   catch(...)
977   {
978     DALI_TEST_CHECK(true); // We expect an assert
979   }
980   END_TEST;
981 }
982
983 int UtcDaliWindowGetAuxiliaryHintValueNegative(void)
984 {
985   Dali::Window instance;
986   try
987   {
988     unsigned int arg1(0u);
989     instance.GetAuxiliaryHintValue(arg1);
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 UtcDaliWindowGetSupportedAuxiliaryHintNegative(void)
1000 {
1001   Dali::Window instance;
1002   try
1003   {
1004     unsigned int arg1(0u);
1005     instance.GetSupportedAuxiliaryHint(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 UtcDaliWindowGetSupportedAuxiliaryHintCountNegative(void)
1016 {
1017   Dali::Window instance;
1018   try
1019   {
1020     instance.GetSupportedAuxiliaryHintCount();
1021     DALI_TEST_CHECK(false); // Should not get here
1022   }
1023   catch(...)
1024   {
1025     DALI_TEST_CHECK(true); // We expect an assert
1026   }
1027   END_TEST;
1028 }
1029
1030 int UtcDaliWindowGetDpiNegative(void)
1031 {
1032   Dali::Window instance;
1033   try
1034   {
1035     instance.GetDpi();
1036     DALI_TEST_CHECK(false); // Should not get here
1037   }
1038   catch(...)
1039   {
1040     DALI_TEST_CHECK(true); // We expect an assert
1041   }
1042   END_TEST;
1043 }
1044
1045 int UtcDaliWindowGetSizeNegative(void)
1046 {
1047   Dali::Window instance;
1048   try
1049   {
1050     instance.GetSize();
1051     DALI_TEST_CHECK(false); // Should not get here
1052   }
1053   catch(...)
1054   {
1055     DALI_TEST_CHECK(true); // We expect an assert
1056   }
1057   END_TEST;
1058 }
1059
1060 int UtcDaliWindowGetTypeNegative(void)
1061 {
1062   Dali::Window instance;
1063   try
1064   {
1065     instance.GetType();
1066     DALI_TEST_CHECK(false); // Should not get here
1067   }
1068   catch(...)
1069   {
1070     DALI_TEST_CHECK(true); // We expect an assert
1071   }
1072   END_TEST;
1073 }
1074
1075 int UtcDaliWindowGetLayerNegative(void)
1076 {
1077   Dali::Window instance;
1078   try
1079   {
1080     unsigned int arg1(0u);
1081     instance.GetLayer(arg1);
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 UtcDaliWindowIsVisibleNegative(void)
1092 {
1093   Dali::Window instance;
1094   try
1095   {
1096     instance.IsVisible();
1097     DALI_TEST_CHECK(false); // Should not get here
1098   }
1099   catch(...)
1100   {
1101     DALI_TEST_CHECK(true); // We expect an assert
1102   }
1103   END_TEST;
1104 }
1105
1106 int UtcDaliWindowGetNativeIdNegative(void)
1107 {
1108   try
1109   {
1110     Dali::Window arg1;
1111     DevelWindow::GetNativeId(arg1);
1112     DALI_TEST_CHECK(false); // Should not get here
1113   }
1114   catch(...)
1115   {
1116     DALI_TEST_CHECK(true); // We expect an assert
1117   }
1118   END_TEST;
1119 }
1120
1121 int UtcDaliWindowSetPositionSizeNegative(void)
1122 {
1123   try
1124   {
1125     Dali::Window arg1;
1126     Dali::Rect<int> arg2;
1127     DevelWindow::SetPositionSize(arg1,arg2);
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 UtcDaliWindowWheelEventSignalNegative(void)
1138 {
1139   try
1140   {
1141     Dali::Window arg1;
1142     DevelWindow::WheelEventSignal(arg1);
1143     DALI_TEST_CHECK(false); // Should not get here
1144   }
1145   catch(...)
1146   {
1147     DALI_TEST_CHECK(true); // We expect an assert
1148   }
1149   END_TEST;
1150 }
1151
1152 int UtcDaliWindowGetCurrentOrientationNegative(void)
1153 {
1154   try
1155   {
1156     Dali::Window arg1;
1157     DevelWindow::GetCurrentOrientation(arg1);
1158     DALI_TEST_CHECK(false); // Should not get here
1159   }
1160   catch(...)
1161   {
1162     DALI_TEST_CHECK(true); // We expect an assert
1163   }
1164   END_TEST;
1165 }
1166
1167 int UtcDaliWindowGetPhysicalOrientationNegative(void)
1168 {
1169   try
1170   {
1171     Dali::Window arg1;
1172     DevelWindow::GetPhysicalOrientation(arg1);
1173     DALI_TEST_CHECK(false); // Should not get here
1174   }
1175   catch(...)
1176   {
1177     DALI_TEST_CHECK(true); // We expect an assert
1178   }
1179   END_TEST;
1180 }
1181
1182 int UtcDaliWindowVisibilityChangedSignalNegative(void)
1183 {
1184   try
1185   {
1186     Dali::Window arg1;
1187     DevelWindow::VisibilityChangedSignal(arg1);
1188     DALI_TEST_CHECK(false); // Should not get here
1189   }
1190   catch(...)
1191   {
1192     DALI_TEST_CHECK(true); // We expect an assert
1193   }
1194   END_TEST;
1195 }
1196
1197 int UtcDaliWindowAddFrameRenderedCallbackNegative(void)
1198 {
1199   try
1200   {
1201     Dali::Window arg1;
1202     std::unique_ptr<Dali::CallbackBase> arg2;
1203     int arg3(0);
1204     DevelWindow::AddFrameRenderedCallback(arg1,std::move(arg2),arg3);
1205     DALI_TEST_CHECK(false); // Should not get here
1206   }
1207   catch(...)
1208   {
1209     DALI_TEST_CHECK(true); // We expect an assert
1210   }
1211   END_TEST;
1212 }
1213
1214 int UtcDaliWindowSetAvailableOrientationsNegative(void)
1215 {
1216   try
1217   {
1218     Dali::Window arg1;
1219     Dali::Vector<Dali::WindowOrientation> arg2;
1220     DevelWindow::SetAvailableOrientations(arg1,arg2);
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 UtcDaliWindowAddFramePresentedCallbackNegative(void)
1231 {
1232   try
1233   {
1234     Dali::Window arg1;
1235     std::unique_ptr<Dali::CallbackBase> arg2;
1236     int arg3(0);
1237     DevelWindow::AddFramePresentedCallback(arg1,std::move(arg2),arg3);
1238     DALI_TEST_CHECK(false); // Should not get here
1239   }
1240   catch(...)
1241   {
1242     DALI_TEST_CHECK(true); // We expect an assert
1243   }
1244   END_TEST;
1245 }
1246
1247 int UtcDaliWindowTransitionEffectEventSignalNegative(void)
1248 {
1249   try
1250   {
1251     Dali::Window arg1;
1252     DevelWindow::TransitionEffectEventSignal(arg1);
1253     DALI_TEST_CHECK(false); // Should not get here
1254   }
1255   catch(...)
1256   {
1257     DALI_TEST_CHECK(true); // We expect an assert
1258   }
1259   END_TEST;
1260 }
1261
1262 int UtcDaliWindowEventProcessingFinishedSignalNegative(void)
1263 {
1264   try
1265   {
1266     Dali::Window arg1;
1267     DevelWindow::EventProcessingFinishedSignal(arg1);
1268     DALI_TEST_CHECK(false); // Should not get here
1269   }
1270   catch(...)
1271   {
1272     DALI_TEST_CHECK(true); // We expect an assert
1273   }
1274   END_TEST;
1275 }
1276
1277 int UtcDaliWindowKeyboardRepeatSettingsChangedSignalNegative(void)
1278 {
1279   try
1280   {
1281     Dali::Window arg1;
1282     DevelWindow::KeyboardRepeatSettingsChangedSignal(arg1);
1283     DALI_TEST_CHECK(false); // Should not get here
1284   }
1285   catch(...)
1286   {
1287     DALI_TEST_CHECK(true); // We expect an assert
1288   }
1289   END_TEST;
1290 }
1291
1292 int UtcDaliWindowUnparentNegative(void)
1293 {
1294   try
1295   {
1296     Dali::Window arg1;
1297     DevelWindow::Unparent(arg1);
1298     DALI_TEST_CHECK(false); // Should not get here
1299   }
1300   catch(...)
1301   {
1302     DALI_TEST_CHECK(true); // We expect an assert
1303   }
1304   END_TEST;
1305 }
1306
1307 int UtcDaliWindowGetParentNegative(void)
1308 {
1309   try
1310   {
1311     Dali::Window arg1;
1312     DevelWindow::GetParent(arg1);
1313     DALI_TEST_CHECK(false); // Should not get here
1314   }
1315   catch(...)
1316   {
1317     DALI_TEST_CHECK(true); // We expect an assert
1318   }
1319   END_TEST;
1320 }
1321
1322 int UtcDaliWindowSetParentNegative(void)
1323 {
1324   try
1325   {
1326     Dali::Window arg1;
1327     Dali::Window arg2;
1328     DevelWindow::SetParent(arg1,arg2);
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 }