1f6603c60Sopenharmony_ci/*
2f6603c60Sopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd.
3f6603c60Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4f6603c60Sopenharmony_ci * you may not use this file except in compliance with the License.
5f6603c60Sopenharmony_ci * You may obtain a copy of the License at
6f6603c60Sopenharmony_ci *
7f6603c60Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8f6603c60Sopenharmony_ci *
9f6603c60Sopenharmony_ci * Unless required by applicable law or agreed to in writing, Hardware
10f6603c60Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11f6603c60Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12f6603c60Sopenharmony_ci * See the License for the specific language governing permissions and
13f6603c60Sopenharmony_ci * limitations under the License.
14f6603c60Sopenharmony_ci */
15f6603c60Sopenharmony_ci
16f6603c60Sopenharmony_ci#include "gtest/gtest.h"
17f6603c60Sopenharmony_ci
18f6603c60Sopenharmony_ci#include "drawing_rect.h"
19f6603c60Sopenharmony_ci#include "drawing_region.h"
20f6603c60Sopenharmony_ci
21f6603c60Sopenharmony_ciusing namespace testing;
22f6603c60Sopenharmony_ciusing namespace testing::ext;
23f6603c60Sopenharmony_ci
24f6603c60Sopenharmony_cinamespace OHOS {
25f6603c60Sopenharmony_cinamespace Rosen {
26f6603c60Sopenharmony_cinamespace Drawing {
27f6603c60Sopenharmony_ciclass NativeDrawingRegionLargeValueTest : public testing::Test {
28f6603c60Sopenharmony_cipublic:
29f6603c60Sopenharmony_ci    static void SetUpTestCase();
30f6603c60Sopenharmony_ci    static void TearDownTestCase();
31f6603c60Sopenharmony_ci    void SetUp() override;
32f6603c60Sopenharmony_ci    void TearDown() override;
33f6603c60Sopenharmony_ci};
34f6603c60Sopenharmony_ci
35f6603c60Sopenharmony_civoid NativeDrawingRegionLargeValueTest::SetUpTestCase() {}
36f6603c60Sopenharmony_civoid NativeDrawingRegionLargeValueTest::TearDownTestCase() {}
37f6603c60Sopenharmony_civoid NativeDrawingRegionLargeValueTest::SetUp() {}
38f6603c60Sopenharmony_civoid NativeDrawingRegionLargeValueTest::TearDown() {}
39f6603c60Sopenharmony_ci
40f6603c60Sopenharmony_ci/*
41f6603c60Sopenharmony_ci * @tc.name: NativeDrawingRegionSetRectTest_region002
42f6603c60Sopenharmony_ci * @tc.desc: test for constructs a rectangular Region matching the bounds of rect.
43f6603c60Sopenharmony_ci * @tc.size  : MediumTest
44f6603c60Sopenharmony_ci * @tc.type  : Function
45f6603c60Sopenharmony_ci * @tc.level : Level 1
46f6603c60Sopenharmony_ci */
47f6603c60Sopenharmony_ciHWTEST_F(NativeDrawingRegionLargeValueTest, NativeDrawingRegionSetRectTest_region002, TestSize.Level1)
48f6603c60Sopenharmony_ci{
49f6603c60Sopenharmony_ci    OH_Drawing_Region* region = OH_Drawing_RegionCreate();
50f6603c60Sopenharmony_ci    OH_Drawing_Rect* rect=OH_Drawing_RectCreate(0.0f, 0.0f, 2160.0f, 4096.0f);
51f6603c60Sopenharmony_ci    EXPECT_TRUE(OH_Drawing_RegionSetRect(region, rect));
52f6603c60Sopenharmony_ci    OH_Drawing_RegionDestroy(region);
53f6603c60Sopenharmony_ci    OH_Drawing_RectDestroy(rect);
54f6603c60Sopenharmony_ci}
55f6603c60Sopenharmony_ci} // namespace Drawing
56f6603c60Sopenharmony_ci} // namespace Rosen
57f6603c60Sopenharmony_ci} // namespace OHOS