From: Richard Huang Date: Wed, 27 May 2015 15:10:33 +0000 (+0100) Subject: Update UTC for Window X-Git-Tag: accepted/tizen/common/20150529.134043~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=37871d60e7dae829f5b73b32836e4d881c053b7e;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git Update UTC for Window Change-Id: Ic1d0a819fe804f26e7cd21d28cabab0fdbfb2961 --- diff --git a/automated-tests/src/dali-adaptor/utc-Dali-Window.cpp b/automated-tests/src/dali-adaptor/utc-Dali-Window.cpp index 3a082ef..c908977 100644 --- a/automated-tests/src/dali-adaptor/utc-Dali-Window.cpp +++ b/automated-tests/src/dali-adaptor/utc-Dali-Window.cpp @@ -17,6 +17,7 @@ #include #include +#include #include using namespace Dali; @@ -34,6 +35,8 @@ void utc_dali_window_cleanup(void) namespace { +class Internal::Adaptor::Window; + 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 } // unnamed namespace @@ -60,14 +63,14 @@ Ecore_X_Window ecore_x_window_argb_new(Ecore_X_Window parent, int x, int y, int } -int UtcDaliToolkitWindowConstructorP(void) +int UtcDaliWindowConstructorP(void) { Dali::Window window; DALI_TEST_CHECK( !window ); END_TEST; } -int UtcDaliToolkitWindowCopyConstructorP(void) +int UtcDaliWindowCopyConstructorP(void) { Dali::Window window; Dali::Window copy( window ); @@ -76,10 +79,21 @@ int UtcDaliToolkitWindowCopyConstructorP(void) END_TEST; } -int UtcDaliToolkitWindowAssignmentOperatorP(void) +int UtcDaliWindowConstructorFromInternalPointerN(void) { - Dali::Window window; - Dali::Window copy = window; + Internal::Adaptor::Window* internalWindow = NULL; + Dali::Window window(internalWindow); + DALI_TEST_CHECK( !window ); // Should not reach here! + + END_TEST; +} + +int UtcDaliWindowAssignmentOperatorP(void) +{ + const Dali::Window window; + Dali::Window copy; + DALI_TEST_CHECK( ! copy ); + copy = window; DALI_TEST_CHECK( copy == window ); END_TEST; @@ -112,6 +126,229 @@ int UtcDaliWindowNewN(void) END_TEST; } +int UtcDaliWindowShowIndicatorN(void) +{ + Dali::Window window; + try + { + window.ShowIndicator(Dali::Window::VISIBLE); + DALI_TEST_CHECK( false ); // Should not reach here! + } + catch( ... ) + { + DALI_TEST_CHECK( true ); + } + + END_TEST; +} + +int UtcDaliWindowSetIndicatorBgOpacityN(void) +{ + Dali::Window window; + try + { + window.SetIndicatorBgOpacity(Dali::Window::OPAQUE); + DALI_TEST_CHECK( false ); // Should not reach here! + } + catch( ... ) + { + DALI_TEST_CHECK( true ); + } + + END_TEST; +} + +int UtcDaliWindowRotateIndicatorN(void) +{ + Dali::Window window; + try + { + window.RotateIndicator(Dali::Window::PORTRAIT); + DALI_TEST_CHECK( false ); // Should not reach here! + } + catch( ... ) + { + DALI_TEST_CHECK( true ); + } + + END_TEST; +} + +int UtcDaliWindowSetClassN(void) +{ + Dali::Window window; + try + { + window.SetClass("window-name", "window-class"); + DALI_TEST_CHECK( false ); // Should not reach here! + } + catch( ... ) + { + DALI_TEST_CHECK( true ); + } + + END_TEST; +} + +int UtcDaliWindowRaiseN(void) +{ + Dali::Window window; + try + { + window.Raise(); + DALI_TEST_CHECK( false ); // Should not reach here! + } + catch( ... ) + { + DALI_TEST_CHECK( true ); + } + + END_TEST; +} + +int UtcDaliWindowLowerN(void) +{ + Dali::Window window; + try + { + window.Lower(); + DALI_TEST_CHECK( false ); // Should not reach here! + } + catch( ... ) + { + DALI_TEST_CHECK( true ); + } + + END_TEST; +} + +int UtcDaliWindowActivateN(void) +{ + Dali::Window window; + try + { + window.Activate(); + DALI_TEST_CHECK( false ); // Should not reach here! + } + catch( ... ) + { + DALI_TEST_CHECK( true ); + } + + END_TEST; +} + +int UtcDaliWindowAddAvailableOrientationN(void) +{ + Dali::Window window; + try + { + window.AddAvailableOrientation(Dali::Window::PORTRAIT); + DALI_TEST_CHECK( false ); // Should not reach here! + } + catch( ... ) + { + DALI_TEST_CHECK( true ); + } + + END_TEST; +} + +int UtcDaliWindowRemoveAvailableOrientationN(void) +{ + Dali::Window window; + try + { + window.RemoveAvailableOrientation(Dali::Window::PORTRAIT); + DALI_TEST_CHECK( false ); // Should not reach here! + } + catch( ... ) + { + DALI_TEST_CHECK( true ); + } + + END_TEST; +} + +int UtcDaliWindowSetPreferredOrientationN(void) +{ + Dali::Window window; + try + { + window.SetPreferredOrientation(Dali::Window::PORTRAIT); + DALI_TEST_CHECK( false ); // Should not reach here! + } + catch( ... ) + { + DALI_TEST_CHECK( true ); + } + + END_TEST; +} + +int UtcDaliWindowGetPreferredOrientationN(void) +{ + Dali::Window window; + try + { + Dali::Window::WindowOrientation orientation = window.GetPreferredOrientation(); + DALI_TEST_CHECK( orientation == Dali::Window::PORTRAIT ); // Should not reach here! + } + catch( ... ) + { + DALI_TEST_CHECK( true ); + } + + END_TEST; +} + +int UtcDaliWindowGetDragAndDropDetectorN(void) +{ + Dali::Window window; + try + { + DragAndDropDetector detector = window.GetDragAndDropDetector(); + DALI_TEST_CHECK( !detector ); // Should not reach here! + } + catch( ... ) + { + DALI_TEST_CHECK( true ); + } + + END_TEST; +} + +int UtcDaliWindowGetNativeHandleN(void) +{ + Dali::Window window; + try + { + Dali::Any handle = window.GetNativeHandle(); + DALI_TEST_CHECK( false ); // Should not reach here! + } + catch( ... ) + { + DALI_TEST_CHECK( true ); + } + + END_TEST; +} + +int UtcDaliWindowIndicatorVisibilityChangedSignalN(void) +{ + Dali::Window window; + try + { + window.IndicatorVisibilityChangedSignal(); + DALI_TEST_CHECK( false ); // Should not reach here! + } + catch( ... ) + { + DALI_TEST_CHECK( true ); + } + + END_TEST; +}