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, 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_bundle_mgr_helper.h"
19
20 #include "egl_defs.h"
21
22 using namespace testing;
23 using namespace testing::ext;
24
25 namespace OHOS::Rosen {
26 class EglBundleMgrHelperTest : 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: Init001
36 * @tc.desc:
37 * @tc.type: FUNC
38 */
HWTEST_F(EglBundleMgrHelperTest,GetBundleInfoForSelf001,Level1)39 HWTEST_F(EglBundleMgrHelperTest, GetBundleInfoForSelf001, Level1)
40 {
41 AppExecFwk::BundleInfo bundleInfo;
42 auto eglBundleMgrHelper = DelayedSingleton<AppExecFwk::EGLBundleMgrHelper>::GetInstance();
43 ASSERT_TRUE(eglBundleMgrHelper != nullptr);
44 auto result = eglBundleMgrHelper->GetBundleInfoForSelf(
45 AppExecFwk::GetBundleInfoFlag::GET_BUNDLE_INFO_WITH_APPLICATION, bundleInfo);
46 ASSERT_TRUE(result != ERR_OK);
47 }
48
49 } // OHOS::Rosen