Browse Source

Test: add an XFAIL for 1D image data size calculation.

Instead of trying to hide the problem by crafting a specific alignment
(that shouldn't be used for 1D at all).
pull/651/merge
Vladimír Vondruš 1 year ago
parent
commit
8a0329009d
  1. 9
      src/Magnum/Test/PixelStorageTest.cpp

9
src/Magnum/Test/PixelStorageTest.cpp

@ -178,11 +178,14 @@ void PixelStorageTest::dataPropertiesImageHeight() {
void PixelStorageTest::dataSize1D() { void PixelStorageTest::dataSize1D() {
const Image1D image{ const Image1D image{
PixelStorage{}.setAlignment(2).setSkip({2, 0, 0}), PixelStorage{}.setSkip({2, 0, 0}),
PixelFormat::RGB8Unorm}; PixelFormat::RGB8Unorm};
CORRADE_COMPARE(Implementation::imageDataSizeFor(image, Math::Vector<1, Int>{3}), {
16); CORRADE_EXPECT_FAIL("Data size in 1D takes alignment into account even though it shouldn't.");
CORRADE_COMPARE(Implementation::imageDataSizeFor<1>(image, 3), 15);
}
CORRADE_COMPARE(Implementation::imageDataSizeFor<1>(image, 3), 18);
} }
void PixelStorageTest::dataSize2D() { void PixelStorageTest::dataSize2D() {

Loading…
Cancel
Save