1 /*
2  * Copyright (c) 2022 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 
18 #include "EGL/egl_core.h"
19 
20 #include "egl_defs.h"
21 
22 using namespace testing;
23 using namespace testing::ext;
24 
25 namespace OHOS::Rosen {
26 class EglCoreTest : public testing::Test {
27 public:
SetUpTestCase()28     static void SetUpTestCase() {}
TearDownTestCase()29     static void TearDownTestCase() {}
SetUp()30     void SetUp() {}
TearDown()31     void TearDown() {}
32 };
33 
34 /**
35  * @tc.name: EglCoreInit001
36  * @tc.desc:
37  * @tc.type: FUNC
38  */
HWTEST_F(EglCoreTest,EglCoreInit001,Level1)39 HWTEST_F(EglCoreTest, EglCoreInit001, Level1)
40 {
41     auto result = EglCoreInit();
42     ASSERT_TRUE(result);
43 }
44 
45 /**
46  * @tc.name: EglCoreInit002
47  * @tc.desc:
48  * @tc.type: FUNC
49  */
HWTEST_F(EglCoreTest,EglCoreInit002,Level2)50 HWTEST_F(EglCoreTest, EglCoreInit002, Level2)
51 {
52     auto temp = gWrapperHook.isLoad;
53     gWrapperHook.isLoad = true;
54 
55     auto result = EglCoreInit();
56     ASSERT_TRUE(result);
57 
58     gWrapperHook.isLoad = temp;
59 }
60 } // OHOS::Rosen
61