Skip to content

Commit 124ab37

Browse files
author
Jon Haitz Legarreta
committed
ENH: Increase itk::RieszFrequencyFilterBankGenerator coverage.
Excercise exception cases. Exercise the GetOrder method using the TEST_SET_GET_VALUE macro for regression purposes.
1 parent 9676ac2 commit 124ab37

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

test/itkRieszFrequencyFilterBankGeneratorTest.cxx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ itkRieszFrequencyFilterBankGeneratorTest( int argc, char* argv[] )
4545
}
4646
const std::string inputImage = argv[1];
4747
const std::string outputImage = argv[2];
48-
unsigned int inputOrder = atoi(argv[3]);
4948

5049
const unsigned int Dimension = 3;
5150
typedef double PixelType;
@@ -72,8 +71,16 @@ itkRieszFrequencyFilterBankGeneratorTest( int argc, char* argv[] )
7271
EXERCISE_BASIC_OBJECT_METHODS( filterBank, RieszFrequencyFilterBankGenerator, GenerateImageSource );
7372

7473
filterBank->SetSize( fftFilter->GetOutput()->GetLargestPossibleRegion().GetSize() );
74+
75+
// Test exception cases
76+
unsigned int inputOrder = 0;
77+
TRY_EXPECT_EXCEPTION( filterBank->SetOrder(inputOrder) );
78+
79+
inputOrder = atoi(argv[3]);
7580
filterBank->SetOrder(inputOrder);
76-
filterBank->Update();
81+
TEST_SET_GET_VALUE( inputOrder, filterBank->GetOrder() );
82+
83+
TRY_EXPECT_NO_EXCEPTION( filterBank->Update() );
7784

7885
// Get iterator to Indices of RieszFunction.
7986
typedef RieszFilterBankType::RieszFunctionType::SetType IndicesType;

0 commit comments

Comments
 (0)