mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-31 08:57:58 +00:00
First cut of StaticRegistries - separate from Context
This commit is contained in:
parent
5234b15ff4
commit
1091ca81e6
21 changed files with 222 additions and 141 deletions
|
@ -14,11 +14,10 @@
|
|||
namespace Catch {
|
||||
inline int List( Config& config ) {
|
||||
|
||||
IContext& context = getCurrentContext();
|
||||
if( config.listWhat() & List::Reports ) {
|
||||
std::cout << "Available reports:\n";
|
||||
IReporterRegistry::FactoryMap::const_iterator it = context.getReporterRegistry().getFactories().begin();
|
||||
IReporterRegistry::FactoryMap::const_iterator itEnd = context.getReporterRegistry().getFactories().end();
|
||||
IReporterRegistry::FactoryMap::const_iterator it = getStatics().getReporterRegistry().getFactories().begin();
|
||||
IReporterRegistry::FactoryMap::const_iterator itEnd = getStatics().getReporterRegistry().getFactories().end();
|
||||
for(; it != itEnd; ++it ) {
|
||||
// !TBD: consider listAs()
|
||||
std::cout << "\t" << it->first << "\n\t\t'" << it->second->getDescription() << "'\n";
|
||||
|
@ -28,8 +27,8 @@ namespace Catch {
|
|||
|
||||
if( config.listWhat() & List::Tests ) {
|
||||
std::cout << "Available tests:\n";
|
||||
std::vector<TestCaseInfo>::const_iterator it = context.getTestCaseRegistry().getAllTests().begin();
|
||||
std::vector<TestCaseInfo>::const_iterator itEnd = context.getTestCaseRegistry().getAllTests().end();
|
||||
std::vector<TestCaseInfo>::const_iterator it = getStatics().getTestCaseRegistry().getAllTests().begin();
|
||||
std::vector<TestCaseInfo>::const_iterator itEnd = getStatics().getTestCaseRegistry().getAllTests().end();
|
||||
for(; it != itEnd; ++it ) {
|
||||
// !TBD: consider listAs()
|
||||
std::cout << "\t" << it->getName() << "\n\t\t '" << it->getDescription() << "'\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue