From eba5893517d6db5abbc68d967118fc8668e4c22b Mon Sep 17 00:00:00 2001 From: Gymee Date: Tue, 13 Dec 2022 11:31:37 +0800 Subject: [PATCH] fix codestyle Issue: #I65XYU Signed-off-by: Gymee Change-Id: I4e45385881e5881ab1019ad6df157c04b6e5eef7 --- tooling/agent/heapprofiler_impl.cpp | 6 +-- tooling/test/debugger_impl_test.cpp | 56 ++++++++++++------------- tooling/test/debugger_service_test.cpp | 6 +-- tooling/test/dispatcher_test.cpp | 2 +- tooling/test/heapprofiler_impl_test.cpp | 22 +++++----- tooling/test/profiler_impl_test.cpp | 28 ++++++------- tooling/test/protocol_handler_test.cpp | 8 ++-- tooling/test/runtime_impl_test.cpp | 14 +++---- tooling/test/tracing_impl_test.cpp | 18 ++++---- tooling/test/utils/test_hooks.h | 2 +- 10 files changed, 81 insertions(+), 81 deletions(-) diff --git a/tooling/agent/heapprofiler_impl.cpp b/tooling/agent/heapprofiler_impl.cpp index 03dca88a..11e44826 100644 --- a/tooling/agent/heapprofiler_impl.cpp +++ b/tooling/agent/heapprofiler_impl.cpp @@ -289,12 +289,12 @@ DispatchResponse HeapProfilerImpl::GetObjectByHeapObjectId([[maybe_unused]] cons return DispatchResponse::Fail("GetObjectByHeapObjectId not support now"); } -DispatchResponse HeapProfilerImpl::GetSamplingProfile([[maybe_unused]]std::unique_ptr *profile) +DispatchResponse HeapProfilerImpl::GetSamplingProfile([[maybe_unused]] std::unique_ptr *profile) { return DispatchResponse::Fail("GetSamplingProfile not support now"); } -DispatchResponse HeapProfilerImpl::StartSampling([[maybe_unused]]const StartSamplingParams ¶ms) +DispatchResponse HeapProfilerImpl::StartSampling([[maybe_unused]] const StartSamplingParams ¶ms) { return DispatchResponse::Fail("StartSampling not support now"); } @@ -328,7 +328,7 @@ void HeapProfilerImpl::HeapTrackingCallback(uv_timer_t* handle) panda::DFXJSNApi::UpdateHeapTracking(heapProfilerImpl->vm_, &(heapProfilerImpl->stream_)); } -DispatchResponse HeapProfilerImpl::StopSampling([[maybe_unused]]std::unique_ptr *profile) +DispatchResponse HeapProfilerImpl::StopSampling([[maybe_unused]] std::unique_ptr *profile) { return DispatchResponse::Fail("StopSampling not support now."); } diff --git a/tooling/test/debugger_impl_test.cpp b/tooling/test/debugger_impl_test.cpp index acd798d5..ee5ebe6e 100644 --- a/tooling/test/debugger_impl_test.cpp +++ b/tooling/test/debugger_impl_test.cpp @@ -54,7 +54,7 @@ HWTEST_F_L0(DebuggerImplTest, NotifyScriptParsed__001) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); @@ -82,7 +82,7 @@ HWTEST_F_L0(DebuggerImplTest, Dispatcher_Dispatch_Enable__001) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); @@ -112,7 +112,7 @@ HWTEST_F_L0(DebuggerImplTest, Dispatcher_Dispatch_Enable__002) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); @@ -143,7 +143,7 @@ HWTEST_F_L0(DebuggerImplTest, Dispatcher_Dispatch_Disable__001) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); @@ -171,7 +171,7 @@ HWTEST_F_L0(DebuggerImplTest, Dispatcher_Dispatch_EvaluateOnCallFrame__001) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); @@ -199,7 +199,7 @@ HWTEST_F_L0(DebuggerImplTest, Dispatcher_Dispatch_EvaluateOnCallFrame__002) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); @@ -230,7 +230,7 @@ HWTEST_F_L0(DebuggerImplTest, Dispatcher_Dispatch_EvaluateOnCallFrame__003) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); @@ -261,7 +261,7 @@ HWTEST_F_L0(DebuggerImplTest, Dispatcher_Dispatch_GetPossibleBreakpoints__001) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); @@ -289,7 +289,7 @@ HWTEST_F_L0(DebuggerImplTest, Dispatcher_Dispatch_GetPossibleBreakpoints__002) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); @@ -329,7 +329,7 @@ HWTEST_F_L0(DebuggerImplTest, Dispatcher_Dispatch_GetScriptSource__001) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); @@ -357,7 +357,7 @@ HWTEST_F_L0(DebuggerImplTest, Dispatcher_Dispatch_GetScriptSource__002) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); @@ -387,7 +387,7 @@ HWTEST_F_L0(DebuggerImplTest, Dispatcher_Dispatch_Pause__001) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); @@ -414,7 +414,7 @@ HWTEST_F_L0(DebuggerImplTest, Dispatcher_Dispatch_RemoveBreakpoint__001) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); @@ -442,7 +442,7 @@ HWTEST_F_L0(DebuggerImplTest, Dispatcher_Dispatch_RemoveBreakpoint__002) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); @@ -473,7 +473,7 @@ HWTEST_F_L0(DebuggerImplTest, Dispatcher_Dispatch_RemoveBreakpoint__003) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); @@ -504,7 +504,7 @@ HWTEST_F_L0(DebuggerImplTest, Dispatcher_Dispatch_Resume__001) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); @@ -534,7 +534,7 @@ HWTEST_F_L0(DebuggerImplTest, Dispatcher_Dispatch_Resume__002) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); @@ -563,7 +563,7 @@ HWTEST_F_L0(DebuggerImplTest, Dispatcher_Dispatch_SetAsyncCallStackDepth__001) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); @@ -590,7 +590,7 @@ HWTEST_F_L0(DebuggerImplTest, Dispatcher_Dispatch_SetBreakpointByUrl__001) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); @@ -618,7 +618,7 @@ HWTEST_F_L0(DebuggerImplTest, Dispatcher_Dispatch_SetBreakpointByUrl__002) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); @@ -653,7 +653,7 @@ HWTEST_F_L0(DebuggerImplTest, Dispatcher_Dispatch_SetPauseOnExceptions__001) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); @@ -681,7 +681,7 @@ HWTEST_F_L0(DebuggerImplTest, Dispatcher_Dispatch_SetPauseOnExceptions__002) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); @@ -710,7 +710,7 @@ HWTEST_F_L0(DebuggerImplTest, Dispatcher_Dispatch_StepInto__001) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); @@ -740,7 +740,7 @@ HWTEST_F_L0(DebuggerImplTest, Dispatcher_Dispatch_SetMixedDebugEnabled__001) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); @@ -770,7 +770,7 @@ HWTEST_F_L0(DebuggerImplTest, Dispatcher_Dispatch_SetMixedDebugEnabled__002) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); @@ -801,7 +801,7 @@ HWTEST_F_L0(DebuggerImplTest, Dispatcher_Dispatch_SetBlackboxPatterns__001) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); @@ -828,7 +828,7 @@ HWTEST_F_L0(DebuggerImplTest, Dispatcher_Dispatch_ReplyNativeCalling__001) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); @@ -858,7 +858,7 @@ HWTEST_F_L0(DebuggerImplTest, Dispatcher_Dispatch_ReplyNativeCalling__002) { std::string outStrForCallbackCheck = ""; std::function callback = - [&outStrForCallbackCheck]([[maybe_unused]]const void* ptr, const std::string &inStrOfReply) { + [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { outStrForCallbackCheck = inStrOfReply;}; ProtocolChannel *protocolChannel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, protocolChannel); diff --git a/tooling/test/debugger_service_test.cpp b/tooling/test/debugger_service_test.cpp index ae4b6e6d..9a4e2b6d 100644 --- a/tooling/test/debugger_service_test.cpp +++ b/tooling/test/debugger_service_test.cpp @@ -79,7 +79,7 @@ HWTEST_F_L0(DebuggerServiceTest, OnMessageTest) ASSERT_TRUE(handler == nullptr); std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; InitializeDebugger(ecmaVm, callback); std::string msg = std::string() + R"({"id":0,"method":"Tracing.Test","params":{}})"; OnMessage(ecmaVm, msg + ""); @@ -101,7 +101,7 @@ HWTEST_F_L0(DebuggerServiceTest, ProcessMessageTest) ASSERT_TRUE(handler == nullptr); std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; InitializeDebugger(ecmaVm, callback); std::string msg = std::string() + R"({"id":0,"method":"Tracing.end","params":{}})"; OnMessage(ecmaVm, msg + ""); @@ -115,7 +115,7 @@ HWTEST_F_L0(DebuggerServiceTest, GetDispatchStatusTest) ASSERT_TRUE(status == ProtocolHandler::DispatchStatus::UNKNOWN); std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; InitializeDebugger(ecmaVm, callback); status = ProtocolHandler::DispatchStatus(GetDispatchStatus(ecmaVm)); ASSERT_TRUE(status == ProtocolHandler::DispatchStatus::DISPATCHED); diff --git a/tooling/test/dispatcher_test.cpp b/tooling/test/dispatcher_test.cpp index a8c2fac4..de96d5fc 100644 --- a/tooling/test/dispatcher_test.cpp +++ b/tooling/test/dispatcher_test.cpp @@ -136,7 +136,7 @@ HWTEST_F_L0(DispatcherTest, DispatcherDispatchTest) DispatchRequest dispatchRequest2(msg); std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto dispatcher = std::make_unique(ecmaVm, channel); dispatcher->Dispatch(dispatchRequest); diff --git a/tooling/test/heapprofiler_impl_test.cpp b/tooling/test/heapprofiler_impl_test.cpp index 8f64aa36..c3e55cf0 100644 --- a/tooling/test/heapprofiler_impl_test.cpp +++ b/tooling/test/heapprofiler_impl_test.cpp @@ -152,7 +152,7 @@ HWTEST_F_L0(HeapProfilerImplTest, DispatcherImplDispatch) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) {result = temp;}; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) {result = temp;}; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -174,7 +174,7 @@ HWTEST_F_L0(HeapProfilerImplTest, DispatcherImplAddInspectedHeapObject) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) {result = temp;}; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) {result = temp;}; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -196,7 +196,7 @@ HWTEST_F_L0(HeapProfilerImplTest, DispatcherImplCollectGarbage) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) {result = temp;}; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) {result = temp;}; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -214,7 +214,7 @@ HWTEST_F_L0(HeapProfilerImplTest, DispatcherImplEnable) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) {result = temp;}; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) {result = temp;}; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -232,7 +232,7 @@ HWTEST_F_L0(HeapProfilerImplTest, DispatcherImplDisable) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) {result = temp;}; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) {result = temp;}; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -250,7 +250,7 @@ HWTEST_F_L0(HeapProfilerImplTest, DispatcherImplGetHeapObjectId) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) {result = temp;}; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) {result = temp;}; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -272,7 +272,7 @@ HWTEST_F_L0(HeapProfilerImplTest, DispatcherImplGetObjectByHeapObjectId) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) {result = temp;}; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) {result = temp;}; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -296,7 +296,7 @@ HWTEST_F_L0(HeapProfilerImplTest, DispatcherImplGetSamplingProfile) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) {result = temp;}; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) {result = temp;}; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -314,7 +314,7 @@ HWTEST_F_L0(HeapProfilerImplTest, DispatcherImplStartSampling) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) {result = temp;}; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) {result = temp;}; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -337,7 +337,7 @@ HWTEST_F_L0(HeapProfilerImplTest, DispatcherImplStopSampling) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) {result = temp;}; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) {result = temp;}; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -355,7 +355,7 @@ HWTEST_F_L0(HeapProfilerImplTest, DispatcherImplTakeHeapSnapshot) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) {result = temp;}; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) {result = temp;}; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); diff --git a/tooling/test/profiler_impl_test.cpp b/tooling/test/profiler_impl_test.cpp index f1708ad7..5e48bb49 100644 --- a/tooling/test/profiler_impl_test.cpp +++ b/tooling/test/profiler_impl_test.cpp @@ -163,7 +163,7 @@ HWTEST_F_L0(ProfilerImplTest, DispatcherImplDispatch) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -185,7 +185,7 @@ HWTEST_F_L0(ProfilerImplTest, DispatcherImplEnable) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -203,7 +203,7 @@ HWTEST_F_L0(ProfilerImplTest, DispatcherImplDisable) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -221,7 +221,7 @@ HWTEST_F_L0(ProfilerImplTest, DispatcherImplStart) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -242,7 +242,7 @@ HWTEST_F_L0(ProfilerImplTest, DispatcherImplStop) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -260,7 +260,7 @@ HWTEST_F_L0(ProfilerImplTest, DispatcherImplSetSamplingInterval) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -282,7 +282,7 @@ HWTEST_F_L0(ProfilerImplTest, DispatcherImplGetBestEffortCoverage) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -300,7 +300,7 @@ HWTEST_F_L0(ProfilerImplTest, DispatcherImplStopPreciseCoverage) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -318,7 +318,7 @@ HWTEST_F_L0(ProfilerImplTest, DispatcherImplTakePreciseCoverage) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -336,7 +336,7 @@ HWTEST_F_L0(ProfilerImplTest, DispatcherImplStartPreciseCoverage) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -354,7 +354,7 @@ HWTEST_F_L0(ProfilerImplTest, DispatcherImplStartTypeProfile) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -372,7 +372,7 @@ HWTEST_F_L0(ProfilerImplTest, DispatcherImplStopTypeProfile) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -390,7 +390,7 @@ HWTEST_F_L0(ProfilerImplTest, DispatcherImplTakeTypeProfile) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -408,7 +408,7 @@ HWTEST_F_L0(ProfilerImplTest, FrontendPreciseCoverageDeltaUpdate) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; ProtocolChannel *channel = nullptr; auto frontend = std::make_unique(channel); frontend->PreciseCoverageDeltaUpdate(); diff --git a/tooling/test/protocol_handler_test.cpp b/tooling/test/protocol_handler_test.cpp index f8c768a9..d83c3108 100644 --- a/tooling/test/protocol_handler_test.cpp +++ b/tooling/test/protocol_handler_test.cpp @@ -52,7 +52,7 @@ HWTEST_F_L0(ProtocolHandlerTest, DispatchCommandTest) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; auto protocol = std::make_unique(callback, ecmaVm); std::string msg = std::string() + R"({"id":0,"method":"Tracing.Test","params":{}})"; protocol->DispatchCommand(msg + ""); @@ -64,7 +64,7 @@ HWTEST_F_L0(ProtocolHandlerTest, GetDispatchStatusTest) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; auto protocol = std::make_unique(callback, ecmaVm); std::string msg = std::string() + R"({"id":0,"method":"Tracing.Test","params":{}})"; ProtocolHandler::DispatchStatus status = ProtocolHandler::DispatchStatus(protocol->GetDispatchStatus()); @@ -78,7 +78,7 @@ HWTEST_F_L0(ProtocolHandlerTest, ProcessCommandTest) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; auto protocol = std::make_unique(callback, ecmaVm); std::string msg = std::string() + R"({"id":0,"method":"Tracing.Test","params":{}})"; protocol->ProcessCommand(); @@ -92,7 +92,7 @@ HWTEST_F_L0(ProtocolHandlerTest, SendResponseTest) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; auto protocol = std::make_unique(callback, ecmaVm); std::string msg = std::string() + R"({"id":0,"method":"Tracing.Test","params":{}})"; DispatchRequest request(msg); diff --git a/tooling/test/runtime_impl_test.cpp b/tooling/test/runtime_impl_test.cpp index 587e6bfd..c2ec0cad 100644 --- a/tooling/test/runtime_impl_test.cpp +++ b/tooling/test/runtime_impl_test.cpp @@ -54,7 +54,7 @@ HWTEST_F_L0(RuntimeImplTest, DispatcherImplDispatch) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) {result = temp;}; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) {result = temp;}; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(runtimeImpl)); @@ -77,7 +77,7 @@ HWTEST_F_L0(RuntimeImplTest, DispatcherImplEnable) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) {result = temp;}; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) {result = temp;}; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(runtimeImpl)); @@ -96,7 +96,7 @@ HWTEST_F_L0(RuntimeImplTest, DispatcherImplDisable) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) {result = temp;}; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) {result = temp;}; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(runtimeImpl)); @@ -115,7 +115,7 @@ HWTEST_F_L0(RuntimeImplTest, DispatcherImplRunIfWaitingForDebugger) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) {result = temp;}; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) {result = temp;}; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(runtimeImpl)); @@ -134,7 +134,7 @@ HWTEST_F_L0(RuntimeImplTest, DispatcherImplGetProperties) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) {result = temp;}; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) {result = temp;}; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(runtimeImpl)); @@ -158,7 +158,7 @@ HWTEST_F_L0(RuntimeImplTest, DispatcherImplCallFunctionOn) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) {result = temp;}; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) {result = temp;}; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(runtimeImpl)); @@ -183,7 +183,7 @@ HWTEST_F_L0(RuntimeImplTest, DispatcherImplGetHeapUsage) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) {result = temp;}; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) {result = temp;}; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto runtimeImpl = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(runtimeImpl)); diff --git a/tooling/test/tracing_impl_test.cpp b/tooling/test/tracing_impl_test.cpp index a30c0e22..7ca281ff 100644 --- a/tooling/test/tracing_impl_test.cpp +++ b/tooling/test/tracing_impl_test.cpp @@ -99,7 +99,7 @@ HWTEST_F_L0(TracingImplTest, DispatcherImplDispatchTest) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -121,7 +121,7 @@ HWTEST_F_L0(TracingImplTest, DispatcherImplEndTest) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -139,7 +139,7 @@ HWTEST_F_L0(TracingImplTest, DispatcherImplGetCategoriesTest) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -157,7 +157,7 @@ HWTEST_F_L0(TracingImplTest, DispatcherImplRecordClockSyncMarkerTest) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -175,7 +175,7 @@ HWTEST_F_L0(TracingImplTest, DispatcherImplRequestMemoryDumpTest) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -193,7 +193,7 @@ HWTEST_F_L0(TracingImplTest, DispatcherImplStartDumpTest) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; ProtocolChannel *channel = new ProtocolHandler(callback, ecmaVm); auto tracing = std::make_unique(ecmaVm, channel); auto dispatcherImpl = std::make_unique(channel, std::move(tracing)); @@ -211,7 +211,7 @@ HWTEST_F_L0(TracingImplTest, FrontendBufferUsageTest) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; ProtocolChannel *channel = nullptr; auto frontend = std::make_unique(channel); frontend->BufferUsage(); @@ -233,7 +233,7 @@ HWTEST_F_L0(TracingImplTest, FrontendDataCollectedTest) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; ProtocolChannel *channel = nullptr; auto frontend = std::make_unique(channel); frontend->DataCollected(); @@ -254,7 +254,7 @@ HWTEST_F_L0(TracingImplTest, FrontendTracingCompleteTest) { std::string result = ""; std::function callback = - [&result]([[maybe_unused]]const void* ptr, const std::string &temp) { result = temp; }; + [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; ProtocolChannel *channel = nullptr; auto frontend = std::make_unique(channel); frontend->TracingComplete(); diff --git a/tooling/test/utils/test_hooks.h b/tooling/test/utils/test_hooks.h index 54884743..f87e8c1d 100644 --- a/tooling/test/utils/test_hooks.h +++ b/tooling/test/utils/test_hooks.h @@ -52,7 +52,7 @@ public: } } - void LoadModule(std::string_view panda_file_name, [[maybe_unused]]std::string_view entryPoint) override + void LoadModule(std::string_view panda_file_name, [[maybe_unused]] std::string_view entryPoint) override { if (test_->loadModule) { test_->loadModule(panda_file_name); -- Gitee