XDSPluginTest: expect a signed image's INTx_MAX to pass through as saturated

Plugin 1.1.0 (2629f3821) passes a saturated pixel of a signed image (INTx_MAX) through with its
value so XDS flags it against OVERLOAD; only the error marker (INTx_MIN signed, UINTx_MAX unsigned)
becomes -1. The legacy test still expected INT16_MAX -> -1. It now checks the saturated value
explicitly and also that module-edge (bit 30) and chip-edge (bit 31) mask pixels read as -2.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SVmAWnzCmRKAXVUCdc4iNi
This commit is contained in:
leonarski_fandClaude Opus 5.5 committed 2026-10-08 12:36:40 +02:00
1 parent 889418e00e
commit 49abb4a079
1 file changed
+10 -3
+10 -3
View File
@@ -112,10 +112,14 @@ TEST_CASE("XDSPlugin_GetData_Legacy", "[HDF5][XDS][Plugin]") {
RegisterHDF5Filter();
std::vector<uint32_t> pixel_mask(x.GetPixelsNum(), 0);
pixel_mask[3] = 1u << 30; // module edge
pixel_mask[4] = 1u << 31; // chip edge
std::vector<int16_t> image(x.GetPixelsNum(), 0);
image[0] = INT16_MAX;
image[1] = INT16_MIN;
image[0] = INT16_MAX; // saturated
image[1] = INT16_MIN; // error marker
image[2] = 456;
image[3] = 50;
image[4] = 60;
{
StartMessage start_message;
@@ -158,9 +162,12 @@ TEST_CASE("XDSPlugin_GetData_Legacy", "[HDF5][XDS][Plugin]") {
REQUIRE_NOTHROW(plugin_get_data(&frame_number, &nx, &ny, data.data(), info, &error_flag));
REQUIRE(error_flag == 0);
CHECK(data[0] == -1);
// A saturated pixel of a signed image is passed through, so XDS sees it above OVERLOAD
CHECK(data[0] == INT16_MAX);
CHECK(data[1] == -1);
CHECK(data[2] == 456);
CHECK(data[3] == -2);
CHECK(data[4] == -2);
CHECK(data[5678] == 10);
frame_number = 2;