• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023-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 #include <gtest/hwext/gtest-multithread.h>
18 
19 #define private public
20 #define protected public
21 #include "ets_ui_ability_instance.h"
22 #undef private
23 #undef protected
24 #include "ets_runtime.h"
25 #include "hilog_tag_wrapper.h"
26 
27 using namespace testing;
28 using namespace testing::ext;
29 
30 namespace OHOS {
31 namespace AbilityRuntime {
32 class EtsUIAbilityInstanceTest : public testing::Test {
33 public:
34     static void SetUpTestCase();
35     static void TearDownTestCase();
36     void SetUp() override;
37     void TearDown() override;
38 };
39 
SetUpTestCase()40 void EtsUIAbilityInstanceTest::SetUpTestCase() {}
41 
TearDownTestCase()42 void EtsUIAbilityInstanceTest::TearDownTestCase() {}
43 
SetUp()44 void EtsUIAbilityInstanceTest::SetUp() {}
45 
TearDown()46 void EtsUIAbilityInstanceTest::TearDown() {}
47 
48 /**
49  * @tc.name: CreateETSUIAbility_100
50  * @tc.desc: CreateETSUIAbility test.
51  * @tc.type: FUNC
52  */
53 HWTEST_F(EtsUIAbilityInstanceTest, CreateETSUIAbility_100, TestSize.Level1)
54 {
55     AbilityRuntime::Runtime::Options options;
56     options.lang = AbilityRuntime::Runtime::Language::ETS;
57     auto runtime = AbilityRuntime::Runtime::Create(options);
58     auto ability = CreateETSUIAbility(runtime);
59     EXPECT_NE(ability, nullptr);
60 }
61 } // namespace AbilityRuntime
62 } // namespace OHOS
63