Make --list-* exit code be 0

Previously it returned the sum of listed things because ???. This
was completely useless and in many ways actively counterproductive
because of the success/failure conventions around exit codes.

Closes #1410
This commit is contained in:
Martin Hořeňovský
2019-06-16 16:12:47 +02:00
parent 557b336125
commit d2cddfc9c5
5 changed files with 151 additions and 141 deletions

View File

@@ -8,30 +8,11 @@
#ifndef TWOBLUECUBES_CATCH_LIST_H_INCLUDED
#define TWOBLUECUBES_CATCH_LIST_H_INCLUDED
#include "catch_option.hpp"
#include "catch_config.hpp"
#include <set>
namespace Catch {
std::size_t listTests( Config const& config );
std::size_t listTestsNamesOnly( Config const& config );
struct TagInfo {
void add( std::string const& spelling );
std::string all() const;
std::set<std::string> spellings;
std::size_t count = 0;
};
std::size_t listTags( Config const& config );
std::size_t listReporters();
Option<std::size_t> list( std::shared_ptr<Config> const& config );
bool list( std::shared_ptr<Config> const& config );
} // end namespace Catch