MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / reportLine

Function reportLine

Source/Falcor/Testing/UnitTest.cpp:148–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146/// Prints the UnitTest report line, making sure it is always printed to the console once.
147template<typename... Args>
148void reportLine(const std::string_view format, Args&&... args)
149{
150 std::string report = fmt::vformat(format, fmt::make_format_args(std::forward<Args>(args)...));
151 bool willLogPrint = is_set(Logger::getOutputs(), Logger::OutputFlags::Console) ||
152 (is_set(Logger::getOutputs(), Logger::OutputFlags::DebugWindow) && isDebuggerPresent());
153
154 static std::mutex mutex;
155 std::lock_guard<std::mutex> lock(mutex);
156
157 if (!willLogPrint)
158 {
159 std::cout << report << std::endl;
160 std::flush(std::cout);
161 }
162 logInfo(report);
163}
164
165/**
166 * Write a test report in JUnit's XML format.

Callers 3

runTestsParallelFunction · 0.85
runTestsSerialFunction · 0.85
reportFailureMethod · 0.85

Calls 2

logInfoFunction · 0.85
isDebuggerPresentFunction · 0.50

Tested by

no test coverage detected