Browse Source

TgaImporter: make expected test output more explicit.

Otherwise we can't be sure we have the right slice.
pull/430/head
Vladimír Vondruš 6 years ago
parent
commit
132359b78f
  1. 7
      src/MagnumPlugins/TgaImporter/Test/TgaImporterTest.cpp

7
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<Trade::ImageData2D> 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);
}

Loading…
Cancel
Save