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.
21 #include <dali/public-api/dali-core.h>
22 #include <dali-test-suite-utils.h>
27 void utc_dali_image_attributes_startup(void)
29 test_return_value = TET_UNDEF;
32 void utc_dali_image_attributes_cleanup(void)
34 test_return_value = TET_PASS;
37 int UtcDaliImageAttributesConstructor(void)
39 TestApplication application;
41 tet_infoline("UtcDaliImageAttributesConstructor");
43 // invoke default handle constructor
44 ImageAttributes imageAttributes;
46 DALI_TEST_CHECK( imageAttributes.GetWidth() == 0);
50 int UtcDaliImageAttributesLessThan(void)
52 TestApplication application;
54 tet_infoline("UtcDaliImageAttributesLessThan");
56 // invoke default handle constructor
57 ImageAttributes imageAttributes;
59 ImageAttributes imageAttributesWidth;
60 imageAttributesWidth.SetSize(2,1);
61 DALI_TEST_CHECK(imageAttributes < imageAttributesWidth);
63 ImageAttributes imageAttributesHeight;
64 imageAttributesHeight.SetSize(1,2);
65 DALI_TEST_CHECK(imageAttributes < imageAttributesHeight);
67 imageAttributesWidth.SetSize(Size(2,1));
68 DALI_TEST_CHECK(imageAttributes < imageAttributesWidth);
70 imageAttributesHeight.SetSize(Size(1,2));
71 DALI_TEST_CHECK(imageAttributes < imageAttributesHeight);
73 ImageAttributes imageAttributesFormat;
74 imageAttributesFormat.SetPixelFormat(Pixel::BGRA8888);
75 DALI_TEST_CHECK(imageAttributes < imageAttributesFormat);
77 ImageAttributes imageAttributesScaling;
78 imageAttributesScaling.SetScalingMode(ImageAttributes::FitHeight);
79 DALI_TEST_CHECK(imageAttributes < imageAttributesScaling);
83 int UtcDaliImageAttributesEquality(void)
85 TestApplication application;
87 tet_infoline("UtcDaliImageAttributesEquality");
89 // invoke default handle constructor
90 ImageAttributes imageAttributes01;
91 ImageAttributes imageAttributes02;
93 DALI_TEST_CHECK(imageAttributes02 == imageAttributes01);
97 int UtcDaliImageAttributesInEquality(void)
99 TestApplication application;
101 tet_infoline("UtcDaliImageAttributesInEquality");
103 // invoke default handle constructor
104 ImageAttributes imageAttributes01;
105 ImageAttributes imageAttributes02;
107 DALI_TEST_CHECK((imageAttributes02 != imageAttributes01) == false);