Skip to content

Commit 6d29392

Browse files
jhlegarretathewtex
authored andcommitted
ENH: Use the itkNameOfTestExecutableMacro to get the test name
Use the `itkNameOfTestExecutableMacro` to get the test name and prevent the the test from crashing when `argv[0]` is null, as recommended in: InsightSoftwareConsortium/ITK#564
1 parent b0d1d9d commit 6d29392

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

{{cookiecutter.project_name}}/test/itk{{cookiecutter.filter_name}}Test.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ int itk{{cookiecutter.filter_name}}Test( int argc, char * argv[] )
5656
if( argc < 2 )
5757
{
5858
std::cerr << "Missing parameters." << std::endl;
59-
std::cerr << "Usage: " << argv[0];
59+
std::cerr << "Usage: " << itkNameOfTestExecutableMacro(argv);
6060
std::cerr << " outputImage";
6161
std::cerr << std::endl;
6262
return EXIT_FAILURE;

0 commit comments

Comments
 (0)