X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-ItemLayout.cpp;h=4ee76fb437064c3318f50b5fac5204ae6a73cdac;hp=67a228787c91959bf38307d0ee67627459c359db;hb=2bba426880bd73a3b763623a3b32c3bd23b7dd90;hpb=c3f7ea6cb0c0b75c2276193aff88b5c7a679a2d5 diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ItemLayout.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ItemLayout.cpp index 67a2287..4ee76fb 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ItemLayout.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ItemLayout.cpp @@ -74,7 +74,7 @@ public: // From ItemFactory { // Create an image actor for this item Image image = ResourceImage::New( TEST_IMAGE_FILE_NAME ); - Actor actor = ImageActor::New(image); + Actor actor = CreateRenderableActor(image); return actor; } @@ -186,18 +186,6 @@ public: // From ItemLayout } /** - * Retrieve the resize animation in the layout. - * - * @param[in] animation The resize animation, not owned by the layout - * @param[in] actor The actor to animate - * @param [in] size The target size. - * @param [in] durationSeconds The duration of the resizing. - */ - virtual void GetResizeAnimation(Animation& animation, Actor actor, Vector3 size, float durationSeconds) const - { - } - - /** * @brief Query the scroll direction of the layout. * @return The scroll direction in degrees. */ @@ -358,3 +346,24 @@ int UtcDaliItemLayoutGetNextFocusItemID(void) END_TEST; } +int UtcDaliItemRangeIntersection(void) +{ + ToolkitTestApplication application; + + unsigned int uBeginItemFirst = 100u, uEndItemFirst = 300u; + unsigned int uBeginItemSecond = 290u, uEndItemSecond = 400; + unsigned int uInterBeginCheck=290u , uInterEndCheck=301u; + bool bIsInThisRange = false, bOutOfThisRange = false; + + Toolkit::ItemRange objItemRangeFirst(uBeginItemFirst, uEndItemFirst); + Toolkit::ItemRange objItemRangeSecond(uBeginItemSecond, uEndItemSecond); + ItemRange itmInterSect = objItemRangeFirst.Intersection(objItemRangeSecond); + + bIsInThisRange = itmInterSect.Within(uInterBeginCheck); + DALI_TEST_EQUALS(bIsInThisRange, true, TEST_LOCATION ); + + bOutOfThisRange = itmInterSect.Within(uInterEndCheck); + DALI_TEST_EQUALS(bOutOfThisRange, false, TEST_LOCATION ); + + END_TEST; +}