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-DefaultControls.cpp;h=7b1421dc46ecf77e3153f73dd77cd607fbcbb0dd;hp=a5c9a0bcbf64164f808986c1d49a8a57c97ef4bb;hb=refs%2Ftags%2Faccepted%2Ftizen%2Fmobile%2F20150306.082341;hpb=30f6ca1e541089b19f2b349a8a12d8a5bcaf2f9e diff --git a/automated-tests/src/dali-toolkit/utc-Dali-DefaultControls.cpp b/automated-tests/src/dali-toolkit/utc-Dali-DefaultControls.cpp index a5c9a0b..7b1421d 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-DefaultControls.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-DefaultControls.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 @@ -140,3 +141,95 @@ int UtcDaliDefaultControlsCreatePushButton(void) DALI_TEST_CHECK( button1 ); END_TEST; } + +int UtcDaliDefaultControlsCreateCheckBoxButton(void) +{ + ToolkitTestApplication application; + + tet_infoline(" UtcDaliDefaultControlsCreateCheckBoxButton"); + + const std::string imagePath( "Facke image path" ); + const std::string voidImagePath( "" ); + + ImageActor image = CreateSolidColorActor( Color::RED ); + ImageActor voidImage; + + CheckBoxButton button0, button1, button2, button3, button4, button5; + + try + { + button0 = CreateCheckBoxButton( voidImagePath, voidImagePath, voidImagePath, voidImagePath ); + button1 = CreateCheckBoxButton( imagePath, voidImagePath, voidImagePath, voidImagePath ); + button2 = CreateCheckBoxButton( voidImagePath, imagePath, voidImagePath, voidImagePath ); + button3 = CreateCheckBoxButton( voidImagePath, voidImagePath, imagePath, voidImagePath ); + button4 = CreateCheckBoxButton( voidImagePath, voidImagePath, voidImagePath, imagePath ); + button5 = CreateCheckBoxButton( imagePath, imagePath, imagePath, imagePath ); + } + catch( ... ) + { + tet_result( TET_FAIL ); + } + + DALI_TEST_CHECK( button0 ); + DALI_TEST_CHECK( button1 ); + DALI_TEST_CHECK( button2 ); + DALI_TEST_CHECK( button3 ); + DALI_TEST_CHECK( button4 ); + DALI_TEST_CHECK( button5 ); + + try + { + button0 = CreateCheckBoxButton( voidImage, voidImage, voidImage, voidImage ); + button1 = CreateCheckBoxButton( image, voidImage, voidImage, voidImage ); + button2 = CreateCheckBoxButton( voidImage, image, voidImage, voidImage ); + button3 = CreateCheckBoxButton( voidImage, voidImage, image, voidImage ); + button4 = CreateCheckBoxButton( voidImage, voidImage, voidImage, image ); + button5 = CreateCheckBoxButton( image, image, image, image ); + } + catch( ... ) + { + tet_result( TET_FAIL ); + } + + DALI_TEST_CHECK( button0 ); + DALI_TEST_CHECK( button1 ); + DALI_TEST_CHECK( button2 ); + DALI_TEST_CHECK( button3 ); + DALI_TEST_CHECK( button4 ); + DALI_TEST_CHECK( button5 ); + + try + { + button0 = CreateCheckBoxButton( voidImagePath, voidImagePath ); + button1 = CreateCheckBoxButton( voidImagePath, imagePath ); + button2 = CreateCheckBoxButton( imagePath, voidImagePath ); + button3 = CreateCheckBoxButton( imagePath, imagePath ); + } + catch( ... ) + { + tet_result( TET_FAIL ); + } + + DALI_TEST_CHECK( button0 ); + DALI_TEST_CHECK( button1 ); + DALI_TEST_CHECK( button2 ); + DALI_TEST_CHECK( button3 ); + + try + { + button0 = CreateCheckBoxButton( voidImage, voidImage ); + button2 = CreateCheckBoxButton( voidImage, image ); + button3 = CreateCheckBoxButton( voidImage, image ); + button4 = CreateCheckBoxButton( image, image ); + } + catch( ... ) + { + tet_result( TET_FAIL ); + } + + DALI_TEST_CHECK( button0 ); + DALI_TEST_CHECK( button1 ); + DALI_TEST_CHECK( button2 ); + DALI_TEST_CHECK( button3 ); + END_TEST; +}