1 /*
2  * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development 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 "drawing_bitmap.h"
18 #include "drawing_brush.h"
19 #include "drawing_canvas.h"
20 #include "drawing_color.h"
21 #include "drawing_color_filter.h"
22 #include "drawing_filter.h"
23 #include "drawing_font.h"
24 #include "drawing_image.h"
25 #include "drawing_mask_filter.h"
26 #include "drawing_matrix.h"
27 #include "drawing_memory_stream.h"
28 #include "drawing_path.h"
29 #include "drawing_pen.h"
30 #include "drawing_point.h"
31 #include "drawing_rect.h"
32 #include "drawing_region.h"
33 #include "drawing_round_rect.h"
34 #include "drawing_sampling_options.h"
35 #include "drawing_shader_effect.h"
36 #include "drawing_text_blob.h"
37 #include "drawing_typeface.h"
38 #include "drawing_record_cmd.h"
39 #include "utils/scalar.h"
40 #include <random>
41 
42 using namespace testing;
43 using namespace testing::ext;
44 
45 namespace OHOS {
46 namespace Rosen {
47 namespace Drawing {
48 class DrawingRecordCmdUtilsDestroyTest : public testing::Test {};
49 
50 /*
51  * @tc.number: SUB_BASIC_GRAPHICS_SPECIAL_API_C_DRAWING_RECORDER_0200
52  * @tc.name: testRecordCmdUtilsDestroyNormal
53  * @tc.desc: test for testRecordCmdUtilsDestroyNormal.
54  * @tc.size  : SmallTest
55  * @tc.type  : Function
56  * @tc.level : Level 0
57  */
HWTEST_F(DrawingRecordCmdUtilsDestroyTest, testRecordCmdUtilsDestroyNormal, TestSize.Level0)58 HWTEST_F(DrawingRecordCmdUtilsDestroyTest, testRecordCmdUtilsDestroyNormal, TestSize.Level0) {
59     // 1. OH_Drawing_RecordCmdUtilsCreate
60     OH_Drawing_ErrorCode drawingErrorCode = OH_DRAWING_ERROR_INVALID_PARAMETER;
61     OH_Drawing_RecordCmdUtils* recordcmd1 = OH_Drawing_RecordCmdUtilsCreate ();
62     // 2. OH_Drawing_RecordCmdUtilsDestroy
63     drawingErrorCode = OH_Drawing_RecordCmdUtilsDestroy (recordcmd1);
64     EXPECT_EQ(drawingErrorCode, OH_DRAWING_SUCCESS);
65 }
66 
67 } // namespace Drawing
68 } // namespace Rosen
69 } // namespace OHOS
70