MCPcopy Create free account
hub / github.com/RenderKit/oidn / makeReporter

Function makeReporter

external/catch.hpp:13297–13315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13295 }
13296
13297 IStreamingReporterPtr makeReporter(std::shared_ptr<Config> const& config) {
13298 if (Catch::getRegistryHub().getReporterRegistry().getListeners().empty()) {
13299 return createReporter(config->getReporterName(), config);
13300 }
13301
13302 // On older platforms, returning std::unique_ptr<ListeningReporter>
13303 // when the return type is std::unique_ptr<IStreamingReporter>
13304 // doesn't compile without a std::move call. However, this causes
13305 // a warning on newer platforms. Thus, we have to work around
13306 // it a bit and downcast the pointer manually.
13307 auto ret = std::unique_ptr<IStreamingReporter>(new ListeningReporter);
13308 auto& multi = static_cast<ListeningReporter&>(*ret);
13309 auto const& listeners = Catch::getRegistryHub().getReporterRegistry().getListeners();
13310 for (auto const& listener : listeners) {
13311 multi.addListener(listener->create(Catch::ReporterConfig(config)));
13312 }
13313 multi.addReporter(createReporter(config->getReporterName(), config));
13314 return ret;
13315 }
13316
13317 class TestGroup {
13318 public:

Callers 1

TestGroupMethod · 0.85

Calls 6

createReporterFunction · 0.85
ReporterConfigClass · 0.85
addListenerMethod · 0.80
addReporterMethod · 0.80
emptyMethod · 0.45
createMethod · 0.45

Tested by 1

TestGroupMethod · 0.68