Lines Matching refs:ecmascript
24 #include "ecmascript/napi/include/jsnapi.h"
25 #include "ecmascript/ohos/aot_runtime_info.h"
26 #include "ecmascript/ohos/tests/mock/mock_aot_runtime_info.h"
27 #include "ecmascript/platform/aot_crash_info.h"
28 #include "ecmascript/platform/file.h"
29 #include "ecmascript/tests/test_helper.h"
32 using namespace panda::ecmascript;
33 using namespace panda::ecmascript::kungfu;
87 runtimeInfo->BuildCrashRuntimeInfo(ecmascript::ohos::RuntimeInfoType::AOT_CRASH);
88 runtimeInfo->BuildCrashRuntimeInfo(ecmascript::ohos::RuntimeInfoType::AOT_CRASH);
89 runtimeInfo->BuildCrashRuntimeInfo(ecmascript::ohos::RuntimeInfoType::AOT_CRASH);
90 runtimeInfo->BuildCrashRuntimeInfo(ecmascript::ohos::RuntimeInfoType::JS);
91 runtimeInfo->BuildCrashRuntimeInfo(ecmascript::ohos::RuntimeInfoType::JIT);
92 runtimeInfo->BuildCrashRuntimeInfo(ecmascript::ohos::RuntimeInfoType::OTHERS);
94 std::map<ecmascript::ohos::RuntimeInfoType, int> escapeMap = runtimeInfo->CollectCrashSum();
95 ASSERT_EQ(escapeMap[ecmascript::ohos::RuntimeInfoType::AOT_CRASH], 3);
96 ASSERT_EQ(escapeMap[ecmascript::ohos::RuntimeInfoType::JS], 1);
97 ASSERT_EQ(escapeMap[ecmascript::ohos::RuntimeInfoType::JIT], 1);
98 ASSERT_EQ(escapeMap[ecmascript::ohos::RuntimeInfoType::OTHERS], 1);
99 ASSERT_EQ(runtimeInfo->GetCompileCountByType(ecmascript::ohos::RuntimeInfoType::AOT_CRASH), 3);
118 runtimeInfo->BuildCompileRuntimeInfo(ecmascript::ohos::RuntimeInfoType::AOT_CRASH, sanboxRealPath);
119 runtimeInfo->BuildCompileRuntimeInfo(ecmascript::ohos::RuntimeInfoType::AOT_CRASH, sanboxRealPath);
120 runtimeInfo->BuildCompileRuntimeInfo(ecmascript::ohos::RuntimeInfoType::AOT_CRASH, sanboxRealPath);
121 runtimeInfo->BuildCompileRuntimeInfo(ecmascript::ohos::RuntimeInfoType::JS, sanboxRealPath);
122 runtimeInfo->BuildCompileRuntimeInfo(ecmascript::ohos::RuntimeInfoType::JIT, sanboxRealPath);
123 runtimeInfo->BuildCompileRuntimeInfo(ecmascript::ohos::RuntimeInfoType::OTHERS, sanboxRealPath);
124 std::map<ecmascript::ohos::RuntimeInfoType, int> escapeMapRealPath = runtimeInfo->CollectCrashSum(sanboxRealPath);
125 ASSERT_EQ(escapeMapRealPath[ecmascript::ohos::RuntimeInfoType::AOT_CRASH], 3);
126 ASSERT_EQ(escapeMapRealPath[ecmascript::ohos::RuntimeInfoType::JS], 1);
127 ASSERT_EQ(escapeMapRealPath[ecmascript::ohos::RuntimeInfoType::JIT], 1);
128 ASSERT_EQ(escapeMapRealPath[ecmascript::ohos::RuntimeInfoType::OTHERS], 1);
129 ASSERT_EQ(runtimeInfo->GetCompileCountByType(ecmascript::ohos::RuntimeInfoType::AOT_CRASH, sanboxRealPath), 3);
149 runtimeInfo->BuildCrashRuntimeInfo(ecmascript::ohos::RuntimeInfoType::AOT_CRASH);