From 7d4c26ff921d95c7744f024f42ad1b596b178c4c Mon Sep 17 00:00:00 2001 From: youbing54 Date: Mon, 2 Sep 2024 16:36:13 +0800 Subject: [PATCH] =?UTF-8?q?IssueNo:=20https://gitee.com/openharmony/arkui?= =?UTF-8?q?=5Face=5Fengine=5Flite/issues/IAO6X4=20describe:=20DfxTddTest::?= =?UTF-8?q?DfxTest002()=E8=B6=85=E5=A4=A7=E5=87=BD=E6=95=B0=E6=95=B4?= =?UTF-8?q?=E6=94=B9=20Feature=20or=20Bugfix:=20Bugfix=20Binary=20Source:Y?= =?UTF-8?q?es=20Signed-off-by:=20youbing54?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/core/modules/test/unittest/common/dfx_tdd_test.cpp | 7 +++++++ .../src/core/modules/test/unittest/common/dfx_tdd_test.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/frameworks/src/core/modules/test/unittest/common/dfx_tdd_test.cpp b/frameworks/src/core/modules/test/unittest/common/dfx_tdd_test.cpp index 7c7e5550..d115a7c4 100644 --- a/frameworks/src/core/modules/test/unittest/common/dfx_tdd_test.cpp +++ b/frameworks/src/core/modules/test/unittest/common/dfx_tdd_test.cpp @@ -615,6 +615,13 @@ void DfxTddTest::DfxTest002() TDD_CASE_END(); return; } + + OnDfxTest002(backtraceVal, page, stackMsgMaxLength, exceptLength); +} + +void DfxTddTest::OnDfxTest002(jerry_value_t& backtraceVal, JSValue& page, + const uint16_t stackMsgMaxLength, const uint8_t exceptLength) +{ uint32_t length = jerry_get_array_length(backtraceVal); EXPECT_EQ(length, exceptLength); jerry_char_t *errStrBuffer = static_cast(ace_malloc(sizeof(jerry_char_t) * (stackMsgMaxLength))); diff --git a/frameworks/src/core/modules/test/unittest/common/dfx_tdd_test.h b/frameworks/src/core/modules/test/unittest/common/dfx_tdd_test.h index 5cea029b..182e9a1f 100644 --- a/frameworks/src/core/modules/test/unittest/common/dfx_tdd_test.h +++ b/frameworks/src/core/modules/test/unittest/common/dfx_tdd_test.h @@ -34,6 +34,8 @@ public: void DfxTest007(); void RunTests(); private: + void OnDfxTest002(jerry_value_t& backtraceVal, JSValue& page, + const uint16_t stackMsgMaxLength, const uint8_t exceptLength); static const char * const BUNDLE1; static const char * const BUNDLE2; static const char * const BUNDLE3; -- Gitee