STYLE: Increase tests style consistency#2652
Merged
dzenanz merged 1 commit intoInsightSoftwareConsortium:masterfrom Jul 20, 2021
Merged
STYLE: Increase tests style consistency#2652dzenanz merged 1 commit intoInsightSoftwareConsortium:masterfrom
dzenanz merged 1 commit intoInsightSoftwareConsortium:masterfrom
Conversation
d2b5e4f to
2694c46
Compare
Member
Author
|
Cross-referencing PR #564. A few notes:
|
tbirdso
reviewed
Jul 18, 2021
Contributor
tbirdso
left a comment
There was a problem hiding this comment.
Test macro standardization looks great! One typo to fix for CI.
76ef46b to
42d6a39
Compare
2 tasks
da24c15 to
6524b39
Compare
12b3eba to
8d038b6
Compare
Increase tests style consistency: - Use the `itkNameOfTestExecutableMacro` to get the test name and prevent the the test from crashing when `argv[0]` is null. - Use the ITK testing macros when calling filter update methods to reduce boilerplate code. - Increase consistency in the missing argument check message. - Use `EXIT_SUCCESS` and `EXIT_FAILURE` to return from tests on success/failure. - Use the `ITK_EXERCISE_BASIC_OBJECT_METHODS` macro instead of explicitly calling the `Print` method. Take advantage of the commit to: - Remove the argument check when no input parameters are required. - Define the required types within the test body. - Define the required types once the input argument check has passed. - Remove duplicate calls to filter updates. - Remove unused expected exception cases. - Only enclose within the `ITK_TRY_EXPECT_NO_EXCEPTION` macro the filter update calls that may throw exceptions. - Remove some unnecessary printed messages. - Remove unnecessary comment lines devoid of relevant content.
8d038b6 to
11e1f67
Compare
N-Dekker
reviewed
Jul 19, 2021
tbirdso
approved these changes
Jul 19, 2021
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Increase tests style consistency:
itkNameOfTestExecutableMacroto get the test name and preventthe the test from crashing when
argv[0]is null.boilerplate code.
EXIT_SUCCESSandEXIT_FAILUREto return from tests onsuccess/failure.
ITK_EXERCISE_BASIC_OBJECT_METHODSmacro instead of explicitlycalling the
Printmethod.Take advantage of the commit to:
ITK_TRY_EXPECT_NO_EXCEPTIONmacro the filterupdate calls that may throw exceptions.
PR Checklist