Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STYLE: Improve miscellaneous tests' style #4179

Merged

Commits on Aug 31, 2023

  1. STYLE: Declare variables close to where they are used in tests

    Declare variables close to where they are used in tests and initialize
    them at declaration.
    jhlegarreta committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    2df184b View commit details
    Browse the repository at this point in the history
  2. STYLE: Declare and use test image dimensionality as constexpr

    Declare and use image dimensionality as a constant expression in
    miscellaneous tests instead of hard-coding the value across different
    statements.
    jhlegarreta committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    e9860f4 View commit details
    Browse the repository at this point in the history
  3. STYLE: Do not declare a test status variable that is only used once

    Do not declare a test status variable that is only used once: prefer
    using directly the appropriate return value.
    jhlegarreta committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    411b9ad View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2023

  1. ENH: Allow itkCellInterfaceTest to run as long as possible

    Allow `itkCellInterfaceTest` to run as long as possible: store the check
    status value in a variable and return such value at the end of the test.
    Conform to the ITK SWG guidelines by doing so.
    jhlegarreta committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    d7a264c View commit details
    Browse the repository at this point in the history
  2. STYLE: Use exception checking macros in itkVectorExpandImageFilterTest

    Use exception checking macros in `itkVectorExpandImageFilterTest.cxx`:
    - Use the `ITK_TRY_EXPECT_EXCEPTION` macro to check expected exceptions
      when updating filters in lieu of `try/catch` blocks for the sake of
      readability and compactness, and to save typing/avoid boilerplate
      code.
    - Only place the code that might raise exceptions within the macro.
    - Change the test status variable type to accomodate for the changes
      above.
    jhlegarreta committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    647e513 View commit details
    Browse the repository at this point in the history
  3. STYLE: Prefer setting the input once all ivars have been set in test

    Prefer setting the input once all ivars have been set in
    `itkPatchBasedDenoisingImageFilterDefaultTest.cxx`.
    jhlegarreta committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    bdab6cf View commit details
    Browse the repository at this point in the history