X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-ItemLayout.cpp;h=dea4d521e473b734d9276ab56d034bb77cab0a25;hb=bf766e77d7d728e9ff60ba11f726f677369df416;hp=d1ccae32800f51fab5cc545cf6e8f4fe1ba95787;hpb=30f6ca1e541089b19f2b349a8a12d8a5bcaf2f9e;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ItemLayout.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ItemLayout.cpp index d1ccae3..dea4d52 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ItemLayout.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ItemLayout.cpp @@ -1,18 +1,19 @@ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Flora License, Version 1.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://floralicense.org/license/ -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an AS IS BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// +/* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #include #include @@ -65,7 +66,7 @@ public: // From ItemFactory virtual Actor NewItem(unsigned int itemId) { // Create an image actor for this item - Image image = Image::New( TEST_IMAGE_FILE_NAME ); + Image image = ResourceImage::New( TEST_IMAGE_FILE_NAME ); Actor actor = ImageActor::New(image); return actor; @@ -93,46 +94,3 @@ int UtcDaliItemLayoutSetAndGetOrientation(void) DALI_TEST_CHECK(layout->GetOrientation() == ControlOrientation::Left); END_TEST; } - -int UtcDaliItemLayoutGetScrollHints(void) -{ - ToolkitTestApplication application; - - // Create the ItemView actor - TestItemFactory factory; - ItemView view = ItemView::New(factory); - - // Create a grid layout and add it to ItemView - GridLayoutPtr gridLayout = GridLayout::New(); - view.AddLayout(*gridLayout); - - // Set the orientation of the layout to be horizontal from left to right - ItemLayoutPtr layout = view.GetLayout(0); - - Vector2 axisScrollHint; - - layout->SetOrientation(ControlOrientation::Up); - layout->GetXAxisScrollHint(axisScrollHint); - DALI_TEST_EQUALS(axisScrollHint, Vector2::ZERO, Math::MACHINE_EPSILON_1, TEST_LOCATION); - layout->GetYAxisScrollHint(axisScrollHint); - DALI_TEST_EQUALS(axisScrollHint, Vector2::YAXIS, Math::MACHINE_EPSILON_1, TEST_LOCATION); - - layout->SetOrientation(ControlOrientation::Down); - layout->GetXAxisScrollHint(axisScrollHint); - DALI_TEST_EQUALS(axisScrollHint, Vector2::ZERO, Math::MACHINE_EPSILON_1, TEST_LOCATION); - layout->GetYAxisScrollHint(axisScrollHint); - DALI_TEST_EQUALS(axisScrollHint, Vector2::YAXIS, Math::MACHINE_EPSILON_1, TEST_LOCATION); - - layout->SetOrientation(ControlOrientation::Left); - layout->GetXAxisScrollHint(axisScrollHint); - DALI_TEST_EQUALS(axisScrollHint, Vector2::XAXIS, Math::MACHINE_EPSILON_1, TEST_LOCATION); - layout->GetYAxisScrollHint(axisScrollHint); - DALI_TEST_EQUALS(axisScrollHint, Vector2::ZERO, Math::MACHINE_EPSILON_1, TEST_LOCATION); - - layout->SetOrientation(ControlOrientation::Right); - layout->GetXAxisScrollHint(axisScrollHint); - DALI_TEST_EQUALS(axisScrollHint, Vector2::XAXIS, Math::MACHINE_EPSILON_1, TEST_LOCATION); - layout->GetYAxisScrollHint(axisScrollHint); - DALI_TEST_EQUALS(axisScrollHint, Vector2::ZERO, Math::MACHINE_EPSILON_1, TEST_LOCATION); - END_TEST; -}