mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-25 22:19:25 +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
|
@ -80,7 +80,7 @@ namespace Catch {
|
|||
|
||||
virtual void runAll( bool runHiddenTests = false ) {
|
||||
m_reporter->StartGroup( "" );
|
||||
const std::vector<TestCaseInfo>& allTests = getCurrentContext().getTestCaseRegistry().getAllTests();
|
||||
const std::vector<TestCaseInfo>& allTests = getStatics().getTestCaseRegistry().getAllTests();
|
||||
for( std::size_t i=0; i < allTests.size(); ++i ) {
|
||||
if( runHiddenTests || !allTests[i].isHidden() ) {
|
||||
if( aborting() ) {
|
||||
|
@ -100,7 +100,7 @@ namespace Catch {
|
|||
|
||||
TestSpec testSpec( rawTestSpec );
|
||||
|
||||
const std::vector<TestCaseInfo>& allTests = getCurrentContext().getTestCaseRegistry().getAllTests();
|
||||
const std::vector<TestCaseInfo>& allTests = getStatics().getTestCaseRegistry().getAllTests();
|
||||
std::size_t testsRun = 0;
|
||||
for( std::size_t i=0; i < allTests.size(); ++i ) {
|
||||
if( testSpec.matches( allTests[i].getName() ) ) {
|
||||
|
@ -282,7 +282,7 @@ namespace Catch {
|
|||
// This just means the test was aborted due to failure
|
||||
}
|
||||
catch(...) {
|
||||
acceptMessage( getCurrentContext().getExceptionTranslatorRegistry().translateActiveException() );
|
||||
acceptMessage( getStatics().getExceptionTranslatorRegistry().translateActiveException() );
|
||||
acceptResult( ResultWas::ThrewException );
|
||||
}
|
||||
m_info.clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue