diff --git a/include/internal/catch_test_case_registry_impl.hpp b/include/internal/catch_test_case_registry_impl.hpp index 43b4ee80..9588e0ad 100644 --- a/include/internal/catch_test_case_registry_impl.hpp +++ b/include/internal/catch_test_case_registry_impl.hpp @@ -104,8 +104,10 @@ namespace Catch { return m_functions; } virtual std::vector const& getAllTestsSorted( IConfig const& config ) const { - if( m_sortedFunctions.empty() ) + if( m_sortedFunctions.empty() ) { enforceNoDuplicateTestCases( m_functions ); + m_currentSortOrder = config.runOrder(); + } if( m_currentSortOrder != config.runOrder() || m_sortedFunctions.empty() ) { m_sortedFunctions = sortTests( config, m_functions );