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 #include <gtest/gtest.h> 17 #include "dfx_define.h" 18 #include "dfx_param.h" 19 20 using namespace OHOS::HiviewDFX; 21 using namespace testing::ext; 22 using namespace std; 23 24 namespace OHOS { 25 namespace HiviewDFX { 26 class ParamTest : public testing::Test { 27 public: SetUpTestCase(void)28 static void SetUpTestCase(void) {} TearDownTestCase(void)29 static void TearDownTestCase(void) {} SetUp()30 void SetUp() {} TearDown()31 void TearDown() {} 32 }; 33 34 /** 35 * @tc.name: DfxParamTest001 36 * @tc.desc: test DfxParam class functions 37 * @tc.type: FUNC 38 */ 39 HWTEST_F(ParamTest, DfxParamTest001, TestSize.Level2) 40 { 41 GTEST_LOG_(INFO) << "DfxParamTest001: start."; 42 #if defined(__arm__) 43 ASSERT_EQ(DfxParam::EnableBeta(), false); 44 #elif defined(__aarch64__) 45 ASSERT_EQ(DfxParam::EnableBeta(), true); 46 #endif 47 ASSERT_EQ(DfxParam::EnableAsyncStack(), true); 48 ASSERT_EQ(DfxParam::EnableMixstack(), true); 49 GTEST_LOG_(INFO) << "DfxParamTest001: end."; 50 } 51 } // namespace HiviewDFX 52 } // namespace OHOS