1 /*
2 * Copyright (c) 2025 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
18 #include "ext/gex_dot_matrix_shader.h"
19
20 using namespace testing;
21 using namespace testing::ext;
22
23 namespace OHOS {
24 namespace GraphicsEffectEngine {
25
26 using namespace Rosen;
27
28 class GEXDotMatrixShaderTest : public testing::Test {
29 public:
30 static void SetUpTestCase();
31 static void TearDownTestCase();
32 void SetUp() override;
33 void TearDown() override;
34
35 DotMatrixNormalParams params_;
36 };
37
SetUpTestCase(void)38 void GEXDotMatrixShaderTest::SetUpTestCase(void) {}
39
TearDownTestCase(void)40 void GEXDotMatrixShaderTest::TearDownTestCase(void) {}
41
SetUp()42 void GEXDotMatrixShaderTest::SetUp() {}
43
TearDown()44 void GEXDotMatrixShaderTest::TearDown() {}
45
46 /**
47 * @tc.name: CreateDynamicImpl_001
48 * @tc.desc: Verify function CreateDynamicImpl
49 * @tc.type:FUNC
50 */
51 HWTEST_F(GEXDotMatrixShaderTest, CreateDynamicImpl_001, TestSize.Level0)
52 {
53 auto impl = GEXDotMatrixShader::CreateDynamicImpl(params_);
54 EXPECT_EQ(impl, nullptr);
55 }
56
57 /**
58 * @tc.name: GetDescription_001
59 * @tc.desc: Verify function GetDescription
60 * @tc.type:FUNC
61 */
62 HWTEST_F(GEXDotMatrixShaderTest, GetDescription_001, TestSize.Level3)
63 {
64 auto dotShader = std::make_shared<GEXDotMatrixShader>();
65 auto description = dotShader->GetDescription();
66 EXPECT_FALSE(description.empty());
67 }
68 } // namespace GraphicsEffectEngine
69 } // namespace OHOS