From 132359b78f142b5c6fcbd469fd51304395e96a78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 19 Mar 2020 11:36:02 +0100 Subject: [PATCH] TgaImporter: make expected test output more explicit. Otherwise we can't be sure we have the right slice. --- src/MagnumPlugins/TgaImporter/Test/TgaImporterTest.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/MagnumPlugins/TgaImporter/Test/TgaImporterTest.cpp b/src/MagnumPlugins/TgaImporter/Test/TgaImporterTest.cpp index 6f323b41e..e53da678f 100644 --- a/src/MagnumPlugins/TgaImporter/Test/TgaImporterTest.cpp +++ b/src/MagnumPlugins/TgaImporter/Test/TgaImporterTest.cpp @@ -301,6 +301,11 @@ void TgaImporterTest::grayscale8() { 3, 4, 5, 6 }; + const char pixels[] { + 1, 2, + 3, 4, + 5, 6 + }; CORRADE_VERIFY(importer->openData(data)); Containers::Optional image = importer->image2D(0); @@ -308,7 +313,7 @@ void TgaImporterTest::grayscale8() { CORRADE_COMPARE(image->storage().alignment(), 1); CORRADE_COMPARE(image->format(), PixelFormat::R8Unorm); CORRADE_COMPARE(image->size(), Vector2i(2, 3)); - CORRADE_COMPARE_AS(image->data(), Containers::arrayView(data).suffix(18), + CORRADE_COMPARE_AS(image->data(), Containers::arrayView(pixels), TestSuite::Compare::Container); }