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, software
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 "image_impl.h"
18 
19 namespace OHOS {
20 namespace Multimedia {
21 using namespace testing::ext;
22 using namespace OHOS::Media;
23 
24 class ImageImplTest : public testing::Test {
25 public:
ImageImplTest()26     ImageImplTest() {}
~ImageImplTest()27     ~ImageImplTest() {}
28 };
29 
30 /**
31  * @tc.name: ImageImplTest001
32  * @tc.desc: test ImageImpl
33  * @tc.type: FUNC
34  */
35 HWTEST_F(ImageImplTest, ImageImplTest001, TestSize.Level3)
36 {
37     GTEST_LOG_(INFO) << "ImageImplTest: ImageImplTest001 start";
38     ImageImpl imageImplNull(nullptr);
39     imageImplNull.GetNativeImage();
40     CRegion region;
41     imageImplNull.GetClipRect(&region);
42     CSize size;
43     imageImplNull.GetSize(&size);
44     int32_t format;
45     imageImplNull.GetFormat(&format);
46     CRetComponent component;
47     imageImplNull.GetComponent(0, &component);
48     imageImplNull.Release();
49     GTEST_LOG_(INFO) << "ImageImplTest: ImageImplTest001 end";
50 }
51 }
52 }