1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, Hardware
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include "gtest/gtest.h"
17 #include "drawing_color_space.h"
18 
19 using namespace testing;
20 using namespace testing::ext;
21 
22 namespace OHOS {
23 namespace Rosen {
24 namespace Drawing {
25 class NativeDrawingColorSpaceTest : public testing::Test {
26 public:
27     static void SetUpTestCase();
28     static void TearDownTestCase();
29     void SetUp() override;
30     void TearDown() override;
31 };
32 
SetUpTestCase()33 void NativeDrawingColorSpaceTest::SetUpTestCase() {}
TearDownTestCase()34 void NativeDrawingColorSpaceTest::TearDownTestCase() {}
SetUp()35 void NativeDrawingColorSpaceTest::SetUp() {}
TearDown()36 void NativeDrawingColorSpaceTest::TearDown() {}
37 
38 /*
39  * @tc.name: NativeDrawingColorSpaceTest_ColorSpace001
40  * @tc.desc: test for ColorSpace.
41  * @tc.type: FUNC
42  * @tc.require: AR000GTO5R
43  */
44 HWTEST_F(NativeDrawingColorSpaceTest, NativeDrawingColorSpaceTest_ColorSpace001, TestSize.Level1)
45 {
46     OH_Drawing_ColorSpace* colorSpace = OH_Drawing_ColorSpaceCreateSrgb();
47     EXPECT_NE(colorSpace, nullptr);
48     OH_Drawing_ColorSpaceDestroy(colorSpace);
49 }
50 
51 /*
52  * @tc.name: NativeDrawingColorSpaceTest_ColorSpace002
53  * @tc.desc: test for ColorSpace.
54  * @tc.type: FUNC
55  * @tc.require: AR000GTO5R
56  */
57 HWTEST_F(NativeDrawingColorSpaceTest, NativeDrawingColorSpaceTest_ColorSpace002, TestSize.Level1)
58 {
59     OH_Drawing_ColorSpace* colorSpace = OH_Drawing_ColorSpaceCreateSrgbLinear();
60     EXPECT_NE(colorSpace, nullptr);
61     OH_Drawing_ColorSpaceDestroy(colorSpace);
62 }
63 } // namespace Drawing
64 } // namespace Rosen
65 } // namespace OHOS