2 * Copyright (c) 2023 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.
18 #include <dali-test-suite-utils.h>
19 #include <dali/public-api/adaptor-framework/window-data.h>
23 int UtcDaliWindowData01(void)
25 // Test default values
26 WindowData windowData;
28 DALI_TEST_CHECK(windowData.GetWindowType() == WindowType::NORMAL);
29 DALI_TEST_CHECK(windowData.GetTransparency() == true);
30 DALI_TEST_CHECK(windowData.GetPositionSize().x == 0);
31 DALI_TEST_CHECK(windowData.GetPositionSize().y == 0);
32 DALI_TEST_CHECK(windowData.GetPositionSize().width == 0);
33 DALI_TEST_CHECK(windowData.GetPositionSize().height == 0);
38 int UtcDaliWindowData02(void)
40 // Test SetTransparency and GetTransparency
41 WindowData windowData;
42 windowData.SetTransparency(false);
44 DALI_TEST_CHECK(windowData.GetTransparency() == false);
49 int UtcDaliWindowData03(void)
51 // Test SetWindowType and GetWindowType
52 WindowData windowData;
53 windowData.SetWindowType(WindowType::UTILITY);
55 DALI_TEST_CHECK(windowData.GetWindowType() == WindowType::UTILITY);
60 int UtcDaliWindowData04(void)
62 // Test SetPositionSize and GetPositionSize
63 WindowData windowData;
64 Dali::Rect<int> rect(100, 200, 300, 400);
65 windowData.SetPositionSize(rect);
67 DALI_TEST_CHECK(windowData.GetPositionSize().x == 100);
68 DALI_TEST_CHECK(windowData.GetPositionSize().y == 200);
69 DALI_TEST_CHECK(windowData.GetPositionSize().width == 300);
70 DALI_TEST_CHECK(windowData.GetPositionSize().height == 400);
75 int UtcDaliWindowData05(void)
77 // Test SetFrontBufferRendering and GetFrontBufferRendering
78 WindowData windowData;
79 windowData.SetFrontBufferRendering(true);
81 DALI_TEST_CHECK(windowData.GetFrontBufferRendering() == true);