Skip to content

Commit e4643c5

Browse files
committed
STYLE: Remove empty comment lines in tests
Remove unnecessary and uninformative single-comment and empty comment lines in tests.
1 parent 488ac83 commit e4643c5

File tree

7 files changed

+2
-64
lines changed

7 files changed

+2
-64
lines changed

Modules/Filtering/ImageGrid/test/itkExpandImageFilterTest.cxx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,6 @@ itkExpandImageFilterTest(int, char *[])
8181

8282
int testPassed = EXIT_SUCCESS;
8383

84-
85-
//=============================================================
86-
8784
std::cout << "Create the input image pattern." << std::endl;
8885
ImageType::RegionType region;
8986
ImageType::SizeType size = { { 64, 64 } };
@@ -110,8 +107,6 @@ itkExpandImageFilterTest(int, char *[])
110107
++inIter;
111108
}
112109

113-
//=============================================================
114-
115110
std::cout << "Run ExpandImageFilter in standalone mode with progress.";
116111
std::cout << std::endl;
117112
using ExpanderType = itk::ExpandImageFilter<ImageType, ImageType>;
@@ -141,8 +136,6 @@ itkExpandImageFilterTest(int, char *[])
141136
expander->Print(std::cout);
142137
expander->Update();
143138

144-
//=============================================================
145-
146139
std::cout << "Checking the output against expected." << std::endl;
147140
Iterator outIter(expander->GetOutput(), expander->GetOutput()->GetBufferedRegion());
148141

@@ -188,8 +181,6 @@ itkExpandImageFilterTest(int, char *[])
188181
++outIter;
189182
}
190183

191-
//=============================================================
192-
193184
std::cout << "Run ExpandImageFilter with streamer";
194185
std::cout << std::endl;
195186

@@ -212,7 +203,6 @@ itkExpandImageFilterTest(int, char *[])
212203
streamer->SetNumberOfStreamDivisions(3);
213204
streamer->Update();
214205

215-
//=============================================================
216206
std::cout << "Compare standalone and streamed outputs" << std::endl;
217207

218208
Iterator streamIter(streamer->GetOutput(), streamer->GetOutput()->GetBufferedRegion());

Modules/Filtering/ImageGrid/test/itkWarpImageFilterTest.cxx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,6 @@ itkWarpImageFilterTest(int, char *[])
104104

105105
int testPassed = EXIT_SUCCESS;
106106

107-
108-
//=============================================================
109-
110107
std::cout << "Create the input image pattern." << std::endl;
111108
ImageType::RegionType region;
112109
ImageType::SizeType size = { { 64, 64 } };
@@ -134,8 +131,6 @@ itkWarpImageFilterTest(int, char *[])
134131
inIter.Set(pattern.Evaluate(inIter.GetIndex(), size, size, padValue));
135132
}
136133

137-
//=============================================================
138-
139134
std::cout << "Create the input displacement field." << std::endl;
140135

141136
// Tested with { 2, 4 } and { 2, 5 } as well...
@@ -167,14 +162,12 @@ itkWarpImageFilterTest(int, char *[])
167162
fieldIter.Set(displacement);
168163
}
169164

170-
//=============================================================
171165
std::cout << "Instantiate WarpImageFilter with VectorImage.";
172166
std::cout << std::endl;
173167

174168
using WarpVectorImageFilterType = itk::WarpImageFilter<VectorImageType, VectorImageType, VectorImageType>;
175169
auto warpVectorImageFilter = WarpVectorImageFilterType::New();
176170

177-
//=============================================================
178171
std::cout << "Run WarpImageFilter in standalone mode with progress.";
179172
std::cout << std::endl;
180173
using WarperType = itk::WarpImageFilter<ImageType, ImageType, FieldType>;
@@ -239,8 +232,6 @@ itkWarpImageFilterTest(int, char *[])
239232
// Update the filter
240233
warper->Update();
241234

242-
//=============================================================
243-
244235
std::cout << "Checking the output against expected." << std::endl;
245236

246237
// compute non-padded output region
@@ -326,8 +317,6 @@ itkWarpImageFilterTest(int, char *[])
326317
++outIter;
327318
}
328319

329-
//=============================================================
330-
331320
std::cout << "Run ExpandImageFilter with streamer";
332321
std::cout << std::endl;
333322

@@ -348,7 +337,6 @@ itkWarpImageFilterTest(int, char *[])
348337
streamer->SetNumberOfStreamDivisions(3);
349338
streamer->Update();
350339

351-
//=============================================================
352340
std::cout << "Compare standalone and streamed outputs" << std::endl;
353341

354342
Iterator streamIter(streamer->GetOutput(), streamer->GetOutput()->GetBufferedRegion());

Modules/Filtering/ImageGrid/test/itkWarpVectorImageFilterTest.cxx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,6 @@ itkWarpVectorImageFilterTest(int, char *[])
102102

103103
bool testPassed = true;
104104

105-
106-
//=============================================================
107-
108105
std::cout << "Create the input image pattern." << std::endl;
109106
ImageType::RegionType region;
110107
ImageType::SizeType size = { { 64, 64 } };
@@ -133,8 +130,6 @@ itkWarpVectorImageFilterTest(int, char *[])
133130
inIter.Set(PixelType(pattern.Evaluate(inIter.GetIndex(), size, size, padValue)));
134131
}
135132

136-
//=============================================================
137-
138133
std::cout << "Create the input displacement field." << std::endl;
139134

140135
unsigned int factors[ImageDimension] = { 2, 3 };
@@ -165,8 +160,6 @@ itkWarpVectorImageFilterTest(int, char *[])
165160
fieldIter.Set(displacement);
166161
}
167162

168-
//=============================================================
169-
170163
std::cout << "Run WarpVectorImageFilter in standalone mode with progress.";
171164
std::cout << std::endl;
172165
using WarperType = itk::WarpVectorImageFilter<ImageType, ImageType, FieldType>;
@@ -214,8 +207,6 @@ itkWarpVectorImageFilterTest(int, char *[])
214207
// Update the filter
215208
warper->Update();
216209

217-
//=============================================================
218-
219210
std::cout << "Checking the output against expected." << std::endl;
220211

221212
// compute non-padded output region
@@ -301,8 +292,6 @@ itkWarpVectorImageFilterTest(int, char *[])
301292
++outIter;
302293
}
303294

304-
//=============================================================
305-
306295
std::cout << "Run ExpandImageFilter with streamer";
307296
std::cout << std::endl;
308297

@@ -323,7 +312,6 @@ itkWarpVectorImageFilterTest(int, char *[])
323312
streamer->SetNumberOfStreamDivisions(3);
324313
streamer->Update();
325314

326-
//=============================================================
327315
std::cout << "Compare standalone and streamed outputs" << std::endl;
328316

329317
Iterator streamIter(streamer->GetOutput(), streamer->GetOutput()->GetBufferedRegion());

Modules/Numerics/Statistics/test/itkHistogramTest.cxx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ itkHistogramTest(int, char *[])
5454
lowerBound.Fill(0);
5555
upperBound.Fill(1024);
5656

57-
//
5857
// Exercise exception case
59-
//
6058
try
6159
{
6260
// purposely calling Initialize() before calling SetMeasurementVectorSize()
@@ -72,9 +70,7 @@ itkHistogramTest(int, char *[])
7270
}
7371

7472

75-
//
7673
// Now call SetMeasurementVectorSize() correctly
77-
//
7874
histogram->SetMeasurementVectorSize(numberOfComponents);
7975

8076
if (histogram->GetMeasurementVectorSize() != numberOfComponents)
@@ -83,9 +79,7 @@ itkHistogramTest(int, char *[])
8379
return EXIT_FAILURE;
8480
}
8581

86-
//
8782
// Exercise Initialize with size and bounds
88-
//
8983
histogram->Initialize(size, lowerBound, upperBound);
9084

9185
histogram->SetToZero();
@@ -632,9 +626,7 @@ itkHistogramTest(int, char *[])
632626
}
633627

634628

635-
//
636629
// Exercise GetIndex() method in the iterator.
637-
//
638630
std::cout << "TEST GetIndex() and GetFrequency() in the iterator" << std::endl;
639631
itr = histogram->Begin();
640632
end = histogram->End();
@@ -646,9 +638,7 @@ itkHistogramTest(int, char *[])
646638
}
647639

648640

649-
//
650641
// Exercise GetMin / GetMax methods
651-
//
652642
{
653643
const double epsilon = 1e-6;
654644
HistogramType::SizeType size2 = histogram->GetSize();

Modules/Registration/Common/test/itkRecursiveMultiResolutionPyramidImageFilterTest.cxx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,7 @@ class ShowProgressObject
6969
int
7070
itkRecursiveMultiResolutionPyramidImageFilterTest(int argc, char * argv[])
7171
{
72-
73-
//------------------------------------------------------------
7472
// Create a simple image
75-
//------------------------------------------------------------
7673

7774
// Allocate Images
7875
using PixelType = short;

Modules/Registration/PDEDeformable/test/itkSymmetricForcesDemonsRegistrationFilterTest.cxx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ itkSymmetricForcesDemonsRegistrationFilterTest(int, char *[])
229229

230230
std::cout << "Registration RMS change: " << registrator->GetRMSChange() << std::endl;
231231

232-
// ---------------------------------------------------------
233232
std::cout << "Compare warped moving and fixed." << std::endl;
234233

235234
// compare the warp and fixed images

Modules/Video/Core/test/itkTemporalProcessObjectTest.cxx

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -531,9 +531,8 @@ itkTemporalProcessObjectTest(int, char *[])
531531

532532
using SizeValueType = itk::SizeValueType;
533533
using OffsetValueType = itk::OffsetValueType;
534-
//////
534+
535535
// Set up pipeline
536-
//////
537536

538537
// Create 3 new DummyTemporalProcessObjects
539538
using TPOType = itk::TemporalProcessObjectTest::DummyTemporalProcessObject;
@@ -588,9 +587,7 @@ itkTemporalProcessObjectTest(int, char *[])
588587
// Fill the TemporalDataObject input with frames for the entire region
589588
tdo->SetBufferToXNewFrames(largestRegion.GetFrameDuration());
590589

591-
//////
592590
// Test results of LargestTemporalRegion computation
593-
//////
594591

595592
// Update to get largest possible temporal region information
596593
tpo3->UpdateOutputInformation();
@@ -605,9 +602,7 @@ itkTemporalProcessObjectTest(int, char *[])
605602
ITK_TEST_EXPECT_EQUAL(tpo3->GetOutput()->GetLargestPossibleTemporalRegion().GetFrameDuration(), 24);
606603
ITK_TEST_EXPECT_EQUAL(tpo3->GetOutput()->GetLargestPossibleTemporalRegion().GetFrameStart(), 2);
607604

608-
//////
609605
// Test results of requested region propagation
610-
//////
611606

612607
// Set up requested region for the end of the pipeline
613608
itk::TemporalRegion endLargestPossibleRegion = tpo3->GetOutput()->GetLargestPossibleTemporalRegion();
@@ -637,9 +632,7 @@ itkTemporalProcessObjectTest(int, char *[])
637632
ITK_TEST_EXPECT_EQUAL(tpo1->GetInput()->GetRequestedTemporalRegion().GetFrameDuration(), 5);
638633
ITK_TEST_EXPECT_EQUAL(tpo1->GetInput()->GetRequestedTemporalRegion().GetFrameStart(), 2);
639634

640-
//////
641635
// Test Generation of data
642-
//////
643636

644637
// Call update to execute the entire pipeline and track the call stack
645638
itk::TemporalProcessObjectTest::m_CallStack.clear();
@@ -734,12 +727,10 @@ itkTemporalProcessObjectTest(int, char *[])
734727
}
735728
}
736729

737-
//////
738730
// Test Generation of next output frame -- Since tpo3 skips two frames of
739731
// input for every frame of output and tpo2 can only generate 3 outputs at a
740732
// time, tpo2 must generate 6,7,8 (none of which are already buffered), so
741733
// the entire pipeline runs again (so the call stack should be the same).
742-
//////
743734

744735
// Set the requested region to the next output frame
745736
finalRequest.SetFrameStart(finalRequest.GetFrameStart() + 1);
@@ -770,10 +761,9 @@ itkTemporalProcessObjectTest(int, char *[])
770761
}
771762
}
772763

773-
//////
774764
// Call Update again and make sure that nothing happens except one call to
775765
// GenerateData at the bottom which doesn't end up needing to do anything
776-
//////
766+
777767
itk::TemporalProcessObjectTest::m_CallStack.clear();
778768
tpo3->Update();
779769

@@ -805,11 +795,9 @@ itkTemporalProcessObjectTest(int, char *[])
805795
}
806796
}
807797

808-
//////
809798
// Test that the requested temporal region for the output of a temporal
810799
// process object gets set to the largest possible temporal region if no
811800
// temporal region has been set
812-
//////
813801

814802
// Reset tpo1 and the requsted temporal region of tdo
815803
tpo1 = TPOType::New();
@@ -862,9 +850,7 @@ itkTemporalProcessObjectTest(int, char *[])
862850
std::cout << "STREAMED ENUM VALUE CallRecordEnums::MethodType: " << ee << std::endl;
863851
}
864852

865-
//////
866853
// Return successfully
867-
//////
868854
std::cout << "Test finished." << std::endl;
869855
return EXIT_SUCCESS;
870856
}

0 commit comments

Comments
 (0)