MCPcopy Create free account
hub / github.com/defold/defold / TestLogCaptureCallback

Function TestLogCaptureCallback

engine/dlib/src/test/test_log.cpp:232–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230dmArray<char> g_LogListenerOutput;
231
232static void TestLogCaptureCallback(LogSeverity severity, const char* domain, const char* formatted_string)
233{
234 if (strstr(formatted_string, "Log server started on port") != 0)
235 return;
236
237 dmArray<char>* log_output = &g_LogListenerOutput;
238 uint32_t len = (uint32_t)strlen(formatted_string);
239 log_output->SetCapacity(log_output->Size() + len + 1);
240 log_output->PushArray(formatted_string, len);
241}
242
243TEST(dmLog, TestCapture)
244{

Callers

nothing calls this directly

Calls 3

PushArrayMethod · 0.80
SetCapacityMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected