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) {}
TearDownTestCase(void)39 void GEXDotMatrixShaderTest::TearDownTestCase(void) {}
40
SetUp()41 void GEXDotMatrixShaderTest::SetUp() {}
42
TearDown()43 void GEXDotMatrixShaderTest::TearDown() {}
44
45 /**
46 * @tc.name: CreateDynamicImpl001
47 * @tc.desc: Verify function CreateDynamicImpl
48 * @tc.type:FUNC
49 */
50 HWTEST_F(GEXDotMatrixShaderTest, CreateDynamicImpl001, TestSize.Level1)
51 {
52 auto impl = GEXDotMatrixShader::CreateDynamicImpl(params_);
53 EXPECT_NE(impl, nullptr);
54 }
55
56 /**
57 * @tc.name: GetDescription001
58 * @tc.desc: Verify function GetDescription
59 * @tc.type:FUNC
60 */
61 HWTEST_F(GEXDotMatrixShaderTest, GetDescription001, TestSize.Level1)
62 {
63 auto dotShader = std::make_shared<GEXDotMatrixShader>();
64 auto description = dotShader->GetDescription();
65 EXPECT_FALSE(description.empty());
66 }
67 } // namespace GraphicsEffectEngine
68 } // namespace OHOS