Fix uninitialized member in TestRegistry

Found by valgrind.

Signed-off-by: David Wagner <david.wagner@intel.com>
This commit is contained in:
David Wagner 2015-12-04 17:47:29 +01:00
parent 84d1c080d6
commit 6f4098d519

View File

@ -104,8 +104,10 @@ namespace Catch {
return m_functions; return m_functions;
} }
virtual std::vector<TestCase> const& getAllTestsSorted( IConfig const& config ) const { virtual std::vector<TestCase> const& getAllTestsSorted( IConfig const& config ) const {
if( m_sortedFunctions.empty() ) if( m_sortedFunctions.empty() ) {
enforceNoDuplicateTestCases( m_functions ); enforceNoDuplicateTestCases( m_functions );
m_currentSortOrder = config.runOrder();
}
if( m_currentSortOrder != config.runOrder() || m_sortedFunctions.empty() ) { if( m_currentSortOrder != config.runOrder() || m_sortedFunctions.empty() ) {
m_sortedFunctions = sortTests( config, m_functions ); m_sortedFunctions = sortTests( config, m_functions );