2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
20 #include <dali-toolkit-test-suite-utils.h>
21 #include <dali-toolkit/dali-toolkit.h>
24 using namespace Toolkit;
26 void dali_default_controls_startup(void)
28 test_return_value = TET_UNDEF;
31 void dali_default_controls_cleanup(void)
33 test_return_value = TET_PASS;
38 int UtcDaliDefaultControlsCreateCheckBoxButton(void)
40 ToolkitTestApplication application;
42 tet_infoline(" UtcDaliDefaultControlsCreateCheckBoxButton");
44 const std::string imagePath( "Facke image path" );
45 const std::string voidImagePath( "" );
47 ImageActor image = CreateSolidColorActor( Color::RED );
50 CheckBoxButton button0, button1, button2, button3, button4, button5;
54 button0 = CreateCheckBoxButton( voidImagePath, voidImagePath, voidImagePath, voidImagePath );
55 button1 = CreateCheckBoxButton( imagePath, voidImagePath, voidImagePath, voidImagePath );
56 button2 = CreateCheckBoxButton( voidImagePath, imagePath, voidImagePath, voidImagePath );
57 button3 = CreateCheckBoxButton( voidImagePath, voidImagePath, imagePath, voidImagePath );
58 button4 = CreateCheckBoxButton( voidImagePath, voidImagePath, voidImagePath, imagePath );
59 button5 = CreateCheckBoxButton( imagePath, imagePath, imagePath, imagePath );
63 tet_result( TET_FAIL );
66 DALI_TEST_CHECK( button0 );
67 DALI_TEST_CHECK( button1 );
68 DALI_TEST_CHECK( button2 );
69 DALI_TEST_CHECK( button3 );
70 DALI_TEST_CHECK( button4 );
71 DALI_TEST_CHECK( button5 );
75 button0 = CreateCheckBoxButton( voidImage, voidImage, voidImage, voidImage );
76 button1 = CreateCheckBoxButton( image, voidImage, voidImage, voidImage );
77 button2 = CreateCheckBoxButton( voidImage, image, voidImage, voidImage );
78 button3 = CreateCheckBoxButton( voidImage, voidImage, image, voidImage );
79 button4 = CreateCheckBoxButton( voidImage, voidImage, voidImage, image );
80 button5 = CreateCheckBoxButton( image, image, image, image );
84 tet_result( TET_FAIL );
87 DALI_TEST_CHECK( button0 );
88 DALI_TEST_CHECK( button1 );
89 DALI_TEST_CHECK( button2 );
90 DALI_TEST_CHECK( button3 );
91 DALI_TEST_CHECK( button4 );
92 DALI_TEST_CHECK( button5 );
96 button0 = CreateCheckBoxButton( voidImagePath, voidImagePath );
97 button1 = CreateCheckBoxButton( voidImagePath, imagePath );
98 button2 = CreateCheckBoxButton( imagePath, voidImagePath );
99 button3 = CreateCheckBoxButton( imagePath, imagePath );
103 tet_result( TET_FAIL );
106 DALI_TEST_CHECK( button0 );
107 DALI_TEST_CHECK( button1 );
108 DALI_TEST_CHECK( button2 );
109 DALI_TEST_CHECK( button3 );
113 button0 = CreateCheckBoxButton( voidImage, voidImage );
114 button2 = CreateCheckBoxButton( voidImage, image );
115 button3 = CreateCheckBoxButton( voidImage, image );
116 button4 = CreateCheckBoxButton( image, image );
120 tet_result( TET_FAIL );
123 DALI_TEST_CHECK( button0 );
124 DALI_TEST_CHECK( button1 );
125 DALI_TEST_CHECK( button2 );
126 DALI_TEST_CHECK( button3 );