mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-29 16:53:30 +01:00
Moved runner helpers into Catch namespace
not sure they weren't there to start with
This commit is contained in:
parent
aa9d635014
commit
5e063616df
@ -22,12 +22,10 @@
|
|||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|
||||||
|
namespace Catch {
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
const int MaxExitCode = 255;
|
const int MaxExitCode = 255;
|
||||||
using Catch::IStreamingReporterPtr;
|
|
||||||
using Catch::IConfigPtr;
|
|
||||||
using Catch::Config;
|
|
||||||
|
|
||||||
IStreamingReporterPtr createReporter(std::string const& reporterName, IConfigPtr const& config) {
|
IStreamingReporterPtr createReporter(std::string const& reporterName, IConfigPtr const& config) {
|
||||||
auto reporter = Catch::getRegistryHub().getReporterRegistry().create(reporterName, config);
|
auto reporter = Catch::getRegistryHub().getReporterRegistry().create(reporterName, config);
|
||||||
@ -61,7 +59,6 @@ namespace {
|
|||||||
|
|
||||||
|
|
||||||
Catch::Totals runTests(std::shared_ptr<Config> const& config) {
|
Catch::Totals runTests(std::shared_ptr<Config> const& config) {
|
||||||
using namespace Catch;
|
|
||||||
IStreamingReporterPtr reporter = makeReporter(config);
|
IStreamingReporterPtr reporter = makeReporter(config);
|
||||||
addListeners(reporter, config);
|
addListeners(reporter, config);
|
||||||
|
|
||||||
@ -88,7 +85,6 @@ namespace {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void applyFilenamesAsTags(Catch::IConfig const& config) {
|
void applyFilenamesAsTags(Catch::IConfig const& config) {
|
||||||
using namespace Catch;
|
|
||||||
auto& tests = const_cast<std::vector<TestCase>&>(getAllTestCasesSorted(config));
|
auto& tests = const_cast<std::vector<TestCase>&>(getAllTestCasesSorted(config));
|
||||||
for (auto& testCase : tests) {
|
for (auto& testCase : tests) {
|
||||||
auto tags = testCase.tags;
|
auto tags = testCase.tags;
|
||||||
@ -110,9 +106,7 @@ namespace {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} // anon namespace
|
||||||
|
|
||||||
namespace Catch {
|
|
||||||
|
|
||||||
Session::Session() {
|
Session::Session() {
|
||||||
static bool alreadyInstantiated = false;
|
static bool alreadyInstantiated = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user