Skip to content

Commit 887f9f2

Browse files
authored
Merge pull request InsightSoftwareConsortium#5984 from hjmjohnson/convert-MathematicalMorphologyEnums-to-gtest
ENH: Convert itkMathematicalMorphologyEnumsTest to GTest
2 parents 0f0fef5 + d3f7306 commit 887f9f2

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed

Modules/Filtering/MathematicalMorphology/test/CMakeLists.txt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ set(
3535
itkMapGrayscaleErodeImageFilterTest.cxx
3636
itkMapGrayscaleMorphologicalClosingImageFilterTest.cxx
3737
itkMapGrayscaleMorphologicalOpeningImageFilterTest.cxx
38-
itkMathematicalMorphologyEnumsTest.cxx
3938
itkGrayscaleDilateImageFilterTest.cxx
4039
itkGrayscaleErodeImageFilterTest.cxx
4140
itkGrayscaleMorphologicalClosingImageFilterTest2.cxx
@@ -56,6 +55,13 @@ createtestdriver(ITKMathematicalMorphology "${ITKMathematicalMorphology-Test_LIB
5655
"${ITKMathematicalMorphologyTests}"
5756
)
5857

58+
set(ITKMathematicalMorphologyGTests itkMathematicalMorphologyEnumsGTest.cxx)
59+
creategoogletestdriver(
60+
ITKMathematicalMorphology
61+
"${ITKMathematicalMorphology-Test_LIBRARIES}"
62+
"${ITKMathematicalMorphologyGTests}"
63+
)
64+
5965
itk_add_test(
6066
NAME itkAnchorErodeDilateImageFilterTest
6167
COMMAND
@@ -872,13 +878,6 @@ itk_add_test(
872878
1
873879
)
874880

875-
itk_add_test(
876-
NAME itkMathematicalMorphologyEnumsTest
877-
COMMAND
878-
ITKMathematicalMorphologyTestDriver
879-
itkMathematicalMorphologyEnumsTest
880-
)
881-
882881
itk_add_test(
883882
NAME itkMapGrayscaleDilateImageFilterTest
884883
COMMAND

Modules/Filtering/MathematicalMorphology/test/itkMathematicalMorphologyEnumsTest.cxx renamed to Modules/Filtering/MathematicalMorphology/test/itkMathematicalMorphologyEnumsGTest.cxx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@
1616
*
1717
*=========================================================================*/
1818

19-
#include <set>
2019
#include "itkMathematicalMorphologyEnums.h"
20+
#include "itkGTest.h"
2121

22+
#include <set>
2223

23-
int
24-
itkMathematicalMorphologyEnumsTest(int, char *[])
24+
TEST(MathematicalMorphologyEnums, ConvertedLegacyTest)
2525
{
26-
2726
// Test streaming enumeration for MathematicalMorphologyEnums::Algorithm elements
2827
const std::set<itk::MathematicalMorphologyEnums::Algorithm> allAlgorithm{
2928
itk::MathematicalMorphologyEnums::Algorithm::BASIC,
@@ -35,8 +34,4 @@ itkMathematicalMorphologyEnumsTest(int, char *[])
3534
{
3635
std::cout << "STREAMED ENUM VALUE MathematicalMorphologyEnums::Algorithm: " << ee << std::endl;
3736
}
38-
39-
40-
std::cout << "Test finished" << std::endl;
41-
return EXIT_SUCCESS;
4237
}

0 commit comments

Comments
 (0)