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 #include "gtest/gtest.h" 17 #include <sstream> 18 19 #include "ecmascript/compiler/aot_file/an_file_info.h" 20 #include "ecmascript/tests/test_helper.h" 21 22 23 using namespace panda::ecmascript; 24 25 namespace panda::test { 26 class AnFileInfoTest : public testing::Test { 27 public: SetUpTestCase()28 static void SetUpTestCase() 29 { 30 GTEST_LOG_(INFO) << "SetUpTestCase"; 31 } TearDownTestCase()32 static void TearDownTestCase() 33 { 34 GTEST_LOG_(INFO) << "TearDownTestCase"; 35 } SetUp()36 void SetUp() override {} TearDown()37 void TearDown() override {} 38 }; 39 HWTEST_F_L0(AnFileInfoTest,DestroyAndDump)40HWTEST_F_L0(AnFileInfoTest, DestroyAndDump) 41 { 42 // This test constructs a simple AnFileInfo object and verifies: 43 // 1. The Dump method can be called without crashing. 44 // 2. The Destroy method can be called without crashing. 45 AnFileInfo info; 46 info.Dump(); 47 info.Destroy(); 48 SUCCEED(); 49 } 50 51 } // namespace panda::test