Skip to content

Commit 3253507

Browse files
committed
COMP: Use signed char for SobelOperator convolution test
In 03c8176 a concept check was added that the sobel operator uses a signed pixel type. On Linux aarch64, ❯ c++ --version c++ (Debian 12.2.0-14) 12.2.0 ❯ uname -a Linux deb 6.1.0-18-arm64 #1 SMP Debian 6.1.76-1 (2024-02-01) aarch64 GNU/Linux char is unsigned, which causes the concept check to fail. Switch `char` to `signed char`.
1 parent bac09b0 commit 3253507

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Modules/Core/Common/test/itkSobelOperatorImageConvolutionTest.cxx

+2-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ itkSobelOperatorImageConvolutionTest(int argc, char * argv[])
130130
/*
131131
* Demonstrate that signed types do work with SobelOperator
132132
*/
133-
return_status += DoSimpleConvolutionTest<char, 2>(direction, "char");
133+
// Note: `char` can be unsigned on some platforms.
134+
return_status += DoSimpleConvolutionTest<signed char, 2>(direction, "signed char");
134135
return_status += DoSimpleConvolutionTest<short, 2>(direction, "short");
135136
return_status += DoSimpleConvolutionTest<int, 2>(direction, "int");
136137
return_status += DoSimpleConvolutionTest<long, 2>(direction, "long");

0 commit comments

Comments
 (0)