InsightSoftwareConsortium / InsightSoftwareConsortium/ITK
Misleading test content
- Dominant language
- C++
- Stars
- 1.7k
- Forks
- 748
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 64
Description
### Description
The test `itkNewTest.cxx`:
https://github.com/InsightSoftwareConsortium/ITK/blob/fd076e4db29144b56ff2a96a12baa263432daaab/Modules/Core/Mesh/test/itkNewTest.cxx#L22-L50
https://github.com/InsightSoftwareConsortium/ITK/blob/fd076e4db29144b56ff2a96a12baa263432daaab/Modules/Core/Mesh/test/itkNewTest.cxx#L67-L83
and the test `itkEqualTest.cxx`:
https://github.com/InsightSoftwareConsortium/ITK/blob/fd076e4db29144b56ff2a96a12baa263432daaab/Modules/Filtering/ImageIntensity/test/itkEqualTest.cxx#L248-L256
contain blocks that are not used/do not seem to fit into the purpose of the tests. Especially, in the case of the `itkNewTest.cxx` where an `itk::CellInterfaceVisitorImplementation` is instantiated and only check whether the smart pointer is not null. If that is the purpose of the test, it should be renamed to honor the purpose.
In the second case, the tests seem to serve the purpose of performing different comparisons using an arbitrary filter, and thus are placed in any given module having some filter classes, e.g.
https://github.com/InsightSoftwareConsortium/ITK/blob/fd076e4db29144b56ff2a96a12baa263432daaab/Modules/Filtering/ImageIntensity/test/itkGreaterTest.cxx
### Impact analysis
Although there is no impact to the design itself of ITK, the mentioned tests contain blocks that are misleading or do not serve a purpose. So ITK is shipping some code that does not serve a purpose.
### Expected behavior
Tests do not contain unused blocks, and honor their purpose.
Contrary to other tests that are self-describing, I believe that the `itkEqualTest.cxx` and its peers (`itkGreaterTest.cxx`, `itkLessTest.cxx`) should also contain some minimal description of their purpose.
### Actual behavior
The mentioned tests contain blocks that are misleading and do not serve a purpose.
### Versions
`master`.
### Additional Information
NA.
Contributor guide
Assessment
This issue has not been assessed yet.