Commit 021999f
committed
ENH: Mark test status helpers [[nodiscard]]
Test sources define file-scope helpers returning EXIT_SUCCESS or
EXIT_FAILURE, and a caller that drops the value turns every assertion
inside the helper into a no-op. Marking the helpers [[nodiscard]] makes
the compiler reject that.
Annotate the 290 declarations of such helpers and propagate the status
at the 30 call sites the attribute exposes, in eight tests spanning
image functions, smoothing, diffusion, XML, metrics and superpixel
segmentation.
The attribute goes on every declaration, not just the definition: it
only governs calls that follow the declaration carrying it, so a bare
forward declaration leaves earlier call sites unchecked.
Helpers whose int return is a value rather than a status are left
unannotated, as are the few using a bare 0/1 convention.1 parent 72c18a4 commit 021999f
211 files changed
Lines changed: 351 additions & 337 deletions
File tree
- Modules
- Core
- Common/test
- ImageFunction/test
- Mesh/test
- QuadEdgeMesh/test
- SpatialObjects/test
- TestKernel/test
- Transform/test
- Filtering
- AnisotropicDiffusionLBR/test
- AnisotropicSmoothing/test
- BiasCorrection/test
- Convolution/test
- Cuberille/test
- CurvatureFlow/test
- Denoising/test
- FFT/test
- FastMarching/test
- GPUAnisotropicSmoothing/test
- GPUImageFilterBase/test
- GPUSmoothing/test
- GPUThresholding/test
- ImageFeature/test
- ImageGradient/test
- ImageGrid/test
- ImageIntensity/test
- ImageSources/test
- IsotropicWavelets/test
- LabelErodeDilate/test
- LabelMap/test
- MathematicalMorphology/test
- Path/test
- QuadEdgeMeshFiltering/test
- RLEImage/test
- SmoothingRecursiveYvvGaussianFilter/test
- Smoothing/test
- SubdivisionQuadEdgeMeshFilter/test
- Thresholding/test
- IO
- CSV/test
- GDCM/test
- GE/test
- HDF5/test
- ImageBase/test
- MINC/test
- MeshFreeSurfer/test
- Meta/test
- NIFTI/test
- PNG/test
- SpatialObjects/test
- TIFF/test
- TransformInsightLegacy/test
- VTK/test
- XML/test
- Nonunit
- IntegratedTest/test
- Review/test
- Numerics
- Optimizersv4/test
- Optimizers/test
- PrincipalComponentsAnalysis/test
- Statistics/test
- Registration
- Common/test
- GPUPDEDeformable/test
- Metricsv4/test
- Montage/test
- RegistrationMethodsv4/test
- Segmentation
- Classifiers/test
- ConnectedComponents/test
- LabelVoting/test
- SuperPixel/test
- Voronoi/test
- Video
- BridgeOpenCV/test
- BridgeVXL/test
- IO/test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
0 commit comments