|
|
|
@ -60,7 +60,8 @@ void AbstractImageTest::pixelSize() { |
|
|
|
|
|
|
|
|
|
|
|
void AbstractImageTest::dataSize() { |
|
|
|
void AbstractImageTest::dataSize() { |
|
|
|
/* Verify that row size is properly rounded */ |
|
|
|
/* Verify that row size is properly rounded */ |
|
|
|
CORRADE_COMPARE(Image2D(ColorFormat::RGBA, ColorType::UnsignedByte).dataSize({}), 0); |
|
|
|
/* MSVC 2013 has ICE when {} is used. Meh. */ |
|
|
|
|
|
|
|
CORRADE_COMPARE(Image2D(ColorFormat::RGBA, ColorType::UnsignedByte).dataSize(Vector2i()), 0); |
|
|
|
CORRADE_COMPARE(Image2D(ColorFormat::Red, ColorType::UnsignedByte).dataSize({4, 2}), 8); |
|
|
|
CORRADE_COMPARE(Image2D(ColorFormat::Red, ColorType::UnsignedByte).dataSize({4, 2}), 8); |
|
|
|
CORRADE_COMPARE(Image2D(ColorFormat::Red, ColorType::UnsignedByte).dataSize({2, 4}), 16); |
|
|
|
CORRADE_COMPARE(Image2D(ColorFormat::Red, ColorType::UnsignedByte).dataSize({2, 4}), 16); |
|
|
|
CORRADE_COMPARE(Image2D(ColorFormat::RGBA, ColorType::UnsignedByte).dataSize(Vector2i(1)), 4); |
|
|
|
CORRADE_COMPARE(Image2D(ColorFormat::RGBA, ColorType::UnsignedByte).dataSize(Vector2i(1)), 4); |
|
|
|
|