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 #ifndef COMMON_COMPONENTS_TESTS_TEST_HELPER_H 17 #define COMMON_COMPONENTS_TESTS_TEST_HELPER_H 18 19 #include "gtest/gtest.h" 20 21 namespace common::test { 22 23 #define HWTEST_F_L0(testsuit, testcase) HWTEST_F(testsuit, testcase, testing::ext::TestSize.Level0) 24 #define HWTEST_P_L0(testsuit, testcase) HWTEST_P(testsuit, testcase, testing::ext::TestSize.Level0) 25 26 class BaseTestWithScope : public testing::Test { 27 public: SetUpTestCase()28 static void SetUpTestCase() 29 { 30 GTEST_LOG_(INFO) << "SetUpTestCase"; 31 } 32 TearDownTestCase()33 static void TearDownTestCase() 34 { 35 GTEST_LOG_(INFO) << "TearDownCase"; 36 } 37 SetUp()38 void SetUp() override {} 39 TearDown()40 void TearDown() override {} 41 }; 42 } // namespace common::test 43 #endif // COMMON_COMPONENTS_TESTS_TEST_HELPER_H 44