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, 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 #define private public 17 #define protected public 18 19 #include <gtest/gtest.h> 20 #include "socperf_hitrace_chain.h" 21 22 using namespace testing::ext; 23 24 namespace OHOS { 25 namespace SOCPERF { 26 class SocPerfHitraceChainTest : public testing::Test { 27 public: 28 static void SetUpTestCase(void); 29 static void TearDownTestCase(void); 30 void SetUp(); 31 void TearDown(); 32 }; 33 SetUpTestCase(void)34void SocPerfHitraceChainTest::SetUpTestCase(void) 35 { 36 } 37 TearDownTestCase(void)38void SocPerfHitraceChainTest::TearDownTestCase(void) 39 { 40 } 41 SetUp(void)42void SocPerfHitraceChainTest::SetUp(void) 43 { 44 } 45 TearDown(void)46void SocPerfHitraceChainTest::TearDown(void) 47 { 48 } 49 50 /* 51 * @tc.name: SocPerfHitraceChainTest : SocPerfHitraceChainTest__001 52 * @tc.desc: SocPerfHitraceChainTest__001 53 * @tc.type FUNC 54 * @tc.require: issueI78T3V 55 */ 56 HWTEST_F(SocPerfHitraceChainTest, SocPerfHitraceChainTest__001, Function | MediumTest | Level0) 57 { 58 SocPerfHiTraceChain traceChain(__func__); 59 EXPECT_TRUE(traceChain.isBegin_); 60 EXPECT_TRUE(HiTraceChainIsValid(&traceChain.traceId_)); 61 } 62 63 } // namespace SOCPERF 64 } // namespace OHOS