Skip to content

Conversation

@N-Dekker
Copy link
Contributor

@N-Dekker N-Dekker commented Nov 2, 2022

Follow-up to pull request #3713 "Remove backslash (+ indent) from string literals", but now applied to tests (itk*Test*.cxx files).

Removes unwanted (unintentional) spaces from test output messages, which were caused by an indentation after a backslash continuation character.

@github-actions github-actions bot added area:Filtering Issues affecting the Filtering module area:IO Issues affecting the IO module area:Numerics Issues affecting the Numerics module type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct labels Nov 2, 2022
@github-actions github-actions bot added the area:Core Issues affecting the Core module label Nov 3, 2022
@N-Dekker
Copy link
Contributor Author

N-Dekker commented Nov 3, 2022

FYI, I did a separate commit for itkBSplineDecompositionImageFilterTest because it was slightly more complicated, and it could not be handled entirely by the regular expressions used for the first commit (which is the largest commit of the three).

@N-Dekker N-Dekker marked this pull request as ready for review November 3, 2022 12:47
Copy link
Member

@dzenanz dzenanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is hard to capture all cases of something in ITK with a regular expression 😄

@N-Dekker
Copy link
Contributor Author

N-Dekker commented Nov 3, 2022

/azp run ITK.macOS

@jhlegarreta
Copy link
Member

Thanks for doing this Niels. Rebasing on master will probably allow to make the ITK.macOS build happy.

Removed unwanted (unintentional) spaces from test output messages, which were
caused by an indentation after a backslash continuation character, inside a
string literal. Using Notepad++ v8.4.5 Regular Expressions:

- Find what: `^([^"\r\n]*"[^"\r\n]* )\\\r\n[ ]+`
- Replace with: `$1`

- Find what: `^([^"\r\n]*"[^"\r\n]*)\\\r\n[ ]+`
- Replace with: `$1 `

Follow-up to pull request InsightSoftwareConsortium#3713
commit 69151c3
"STYLE: Remove backslash + indent from literals, to avoid unwanted spaces"
Small style improvement without runtime behavior change, as a follow-up to
pull request InsightSoftwareConsortium#3713
commit d0abdff
"STYLE: Remove backslash (continuation character) from string literals"
Removed unwanted (unintentional) spaces from the error message at the begin of
itkBSplineDecompositionImageFilterTest.

Follow-up to pull request InsightSoftwareConsortium#3713
commit 69151c3
"STYLE: Remove backslash + indent from literals, to avoid unwanted spaces"
@N-Dekker N-Dekker force-pushed the Remove-backslash-continuation-chars-from-inside-literal-strings-in-tests branch from ce33d09 to 77cb3be Compare November 7, 2022 10:17
@dzenanz dzenanz merged commit 9e7547f into InsightSoftwareConsortium:master Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Core Issues affecting the Core module area:Filtering Issues affecting the Filtering module area:IO Issues affecting the IO module area:Numerics Issues affecting the Numerics module type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants