changeset 3648:eef50f5426a9 storage-commitment

fix access to uninitialized pixels in unit tests
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 04 Feb 2020 15:50:17 +0100
parents 5120e4985153
children 05df4860aea6
files UnitTestsSources/ImageProcessingTests.cpp
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/UnitTestsSources/ImageProcessingTests.cpp	Tue Feb 04 15:44:12 2020 +0100
+++ b/UnitTestsSources/ImageProcessingTests.cpp	Tue Feb 04 15:50:17 2020 +0100
@@ -896,7 +896,7 @@
 TEST(ImageProcessing, ApplyWindowingGrayScale8ToGrayScale16)
 {
   {
-    Image image(PixelFormat_Grayscale8, 6, 1, false);
+    Image image(PixelFormat_Grayscale8, 5, 1, false);
     SetGrayscale8Pixel(image, 0, 0, 0);
     SetGrayscale8Pixel(image, 1, 0, 2);
     SetGrayscale8Pixel(image, 2, 0, 5);
@@ -904,7 +904,7 @@
     SetGrayscale8Pixel(image, 4, 0, 255);
 
     {
-      Image target(PixelFormat_Grayscale16, 6, 1, false);
+      Image target(PixelFormat_Grayscale16, 5, 1, false);
       ImageProcessing::ApplyWindowing(target, image, 5.0f, 10.0f, 1.0f, 0.0f, false);
 
       ASSERT_TRUE(TestGrayscale16Pixel(target, 0, 0, 0));
@@ -919,7 +919,7 @@
 TEST(ImageProcessing, ApplyWindowingGrayScale16ToGrayScale16)
 {
   {
-    Image image(PixelFormat_Grayscale16, 6, 1, false);
+    Image image(PixelFormat_Grayscale16, 5, 1, false);
     SetGrayscale16Pixel(image, 0, 0, 0);
     SetGrayscale16Pixel(image, 1, 0, 2);
     SetGrayscale16Pixel(image, 2, 0, 5);
@@ -927,7 +927,7 @@
     SetGrayscale16Pixel(image, 4, 0, 255);
 
     {
-      Image target(PixelFormat_Grayscale16, 6, 1, false);
+      Image target(PixelFormat_Grayscale16, 5, 1, false);
       ImageProcessing::ApplyWindowing(target, image, 5.0f, 10.0f, 1.0f, 0.0f, false);
 
       ASSERT_TRUE(TestGrayscale16Pixel(target, 0, 0, 0));