mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 11:43:29 +01:00
Tweak to reporter registrar to make sure generated name is unique
This commit is contained in:
parent
27fdf01b76
commit
245be004fe
@ -170,6 +170,8 @@ namespace Catch
|
|||||||
bool m_firstSectionInTestCase;
|
bool m_firstSectionInTestCase;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
CATCH_REGISTER_REPORTER( "basic", BasicReporter );
|
||||||
|
|
||||||
} // end namespace Catch
|
} // end namespace Catch
|
||||||
|
|
||||||
#endif // TWOBLUECUBES_CATCH_REPORTER_BASIC_HPP_INCLUDED
|
#endif // TWOBLUECUBES_CATCH_REPORTER_BASIC_HPP_INCLUDED
|
||||||
|
@ -255,6 +255,8 @@ namespace Catch
|
|||||||
std::ostringstream m_stdErr;
|
std::ostringstream m_stdErr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
CATCH_REGISTER_REPORTER( "junit", JunitReporter );
|
||||||
|
|
||||||
} // end namespace Catch
|
} // end namespace Catch
|
||||||
|
|
||||||
#endif // TWOBLUECUBES_CATCH_REPORTER_JUNIT_HPP_INCLUDED
|
#endif // TWOBLUECUBES_CATCH_REPORTER_JUNIT_HPP_INCLUDED
|
||||||
|
@ -150,6 +150,8 @@ namespace Catch
|
|||||||
XmlWriter m_xml;
|
XmlWriter m_xml;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
CATCH_REGISTER_REPORTER( "xml", XmlReporter );
|
||||||
|
|
||||||
} // end namespace Catch
|
} // end namespace Catch
|
||||||
|
|
||||||
#endif // TWOBLUECUBES_CATCH_REPORTER_XML_HPP_INCLUDED
|
#endif // TWOBLUECUBES_CATCH_REPORTER_XML_HPP_INCLUDED
|
||||||
|
@ -23,10 +23,6 @@ namespace Catch
|
|||||||
{
|
{
|
||||||
inline int Main( int argc, char * const argv[] )
|
inline int Main( int argc, char * const argv[] )
|
||||||
{
|
{
|
||||||
ReporterRegistry::instance().registerReporter<BasicReporter>( "basic" );
|
|
||||||
ReporterRegistry::instance().registerReporter<XmlReporter>( "xml" );
|
|
||||||
ReporterRegistry::instance().registerReporter<JunitReporter>( "junit" );
|
|
||||||
|
|
||||||
RunnerConfig config;
|
RunnerConfig config;
|
||||||
ArgParser( argc, argv, config );
|
ArgParser( argc, argv, config );
|
||||||
|
|
||||||
|
@ -18,6 +18,10 @@
|
|||||||
|
|
||||||
namespace Catch
|
namespace Catch
|
||||||
{
|
{
|
||||||
|
// !TBD: This could be refactored to be more "declarative"
|
||||||
|
// have a table up front that relates the mode, option strings, # arguments, names of arguments
|
||||||
|
// - may not be worth it at this scale
|
||||||
|
|
||||||
// -l, --list tests [xml] lists available tests (optionally in xml)
|
// -l, --list tests [xml] lists available tests (optionally in xml)
|
||||||
// -l, --list reporters [xml] lists available reports (optionally in xml)
|
// -l, --list reporters [xml] lists available reports (optionally in xml)
|
||||||
// -l, --list all [xml] lists available tests and reports (optionally in xml)
|
// -l, --list all [xml] lists available tests and reports (optionally in xml)
|
||||||
|
@ -180,6 +180,6 @@ namespace Catch
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CATCH_REGISTER_REPORTER( name, reporterType ) Catch::ReporterRegistrar<reporterType> INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ReporterReg )( name );
|
#define CATCH_REGISTER_REPORTER( name, reporterType ) Catch::ReporterRegistrar<reporterType> catch_internal_RegistrarFor##reporterType( name );
|
||||||
|
|
||||||
#endif // TWOBLUECUBES_CATCH_REPORTER_REGISTRY_HPP_INCLUDED
|
#endif // TWOBLUECUBES_CATCH_REPORTER_REGISTRY_HPP_INCLUDED
|
Loading…
Reference in New Issue
Block a user