Skip to content

STYLE: Use the itkNameOfTestExecutableMacro macro in tests#3064

Merged
dzenanz merged 1 commit intoInsightSoftwareConsortium:masterfrom
jhlegarreta:UseITKNameOfTestExecutableMacro3
Jan 11, 2022
Merged

STYLE: Use the itkNameOfTestExecutableMacro macro in tests#3064
dzenanz merged 1 commit intoInsightSoftwareConsortium:masterfrom
jhlegarreta:UseITKNameOfTestExecutableMacro3

Conversation

@jhlegarreta
Copy link
Copy Markdown
Member

Use the itkNameOfTestExecutableMacro macro to get the test name
instead of hard-coding the test name.

Avoid directly passing the test's main method argc and argv
parameters to helper methods: provide only the required parameters.

Fix the argument count check where necessary, and prefer using exact
checks when no optional argument exists.

PR Checklist

@jhlegarreta
Copy link
Copy Markdown
Member Author

Left behind in earlier related PRs, e.g. #2985.

@github-actions github-actions Bot added area:Filtering Issues affecting the Filtering module area:IO Issues affecting the IO module area:Segmentation Issues affecting the Segmentation module type:Style Style changes: no logic impact (indentation, comments, naming) type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct labels Jan 8, 2022
@jhlegarreta jhlegarreta force-pushed the UseITKNameOfTestExecutableMacro3 branch 4 times, most recently from 2157ab3 to a299f73 Compare January 8, 2022 18:41
Copy link
Copy Markdown
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.

Looks good on a glance.

Use the `itkNameOfTestExecutableMacro` macro to get the test name
instead of hard-coding the test name.

Avoid directly passing the test's main method `argc` and `argv`
parameters to helper methods: provide only the required parameters.

Fix the argument count check where necessary, and prefer using exact
checks when no optional argument exists.
@jhlegarreta jhlegarreta force-pushed the UseITKNameOfTestExecutableMacro3 branch from a299f73 to debf968 Compare January 8, 2022 23:14
@dzenanz dzenanz merged commit 82520a8 into InsightSoftwareConsortium:master Jan 11, 2022
@jhlegarreta jhlegarreta deleted the UseITKNameOfTestExecutableMacro3 branch January 11, 2022 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Filtering Issues affecting the Filtering module area:IO Issues affecting the IO module area:Segmentation Issues affecting the Segmentation module type:Style Style changes: no logic impact (indentation, comments, naming) 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