mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-03 13:55:39 +02:00
Add return code constants to API
This commit is contained in:
@@ -33,14 +33,6 @@
|
||||
namespace Catch {
|
||||
|
||||
namespace {
|
||||
static constexpr int TestFailureExitCode = 42;
|
||||
static constexpr int UnspecifiedErrorExitCode = 1;
|
||||
static constexpr int AllTestsSkippedExitCode = 4;
|
||||
static constexpr int NoTestsRunExitCode = 2;
|
||||
static constexpr int UnmatchedTestSpecExitCode = 3;
|
||||
static constexpr int InvalidTestSpecExitCode = 5;
|
||||
|
||||
|
||||
IEventListenerPtr createReporter(std::string const& reporterName, ReporterConfig&& config) {
|
||||
auto reporter = Catch::getRegistryHub().getReporterRegistry().create(reporterName, CATCH_MOVE(config));
|
||||
CATCH_ENFORCE(reporter, "No reporter registered with name: '" << reporterName << '\'');
|
||||
|
@@ -16,6 +16,14 @@
|
||||
|
||||
namespace Catch {
|
||||
|
||||
// TODO: Use C++17 `inline` variables
|
||||
constexpr int UnspecifiedErrorExitCode = 1;
|
||||
constexpr int NoTestsRunExitCode = 2;
|
||||
constexpr int UnmatchedTestSpecExitCode = 3;
|
||||
constexpr int AllTestsSkippedExitCode = 4;
|
||||
constexpr int InvalidTestSpecExitCode = 5;
|
||||
constexpr int TestFailureExitCode = 42;
|
||||
|
||||
class Session : Detail::NonCopyable {
|
||||
public:
|
||||
|
||||
|
Reference in New Issue
Block a user