| 146 | /// Prints the UnitTest report line, making sure it is always printed to the console once. |
| 147 | template<typename... Args> |
| 148 | void 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. |
no test coverage detected