|
|
|
@ -34,15 +34,26 @@ class AbstractImageTest: public TestSuite::Tester { |
|
|
|
public: |
|
|
|
public: |
|
|
|
explicit AbstractImageTest(); |
|
|
|
explicit AbstractImageTest(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void pixelSize(); |
|
|
|
|
|
|
|
|
|
|
|
void debugFormat(); |
|
|
|
void debugFormat(); |
|
|
|
void debugType(); |
|
|
|
void debugType(); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
AbstractImageTest::AbstractImageTest() { |
|
|
|
AbstractImageTest::AbstractImageTest() { |
|
|
|
addTests({&AbstractImageTest::debugFormat, |
|
|
|
addTests({&AbstractImageTest::pixelSize, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
&AbstractImageTest::debugFormat, |
|
|
|
&AbstractImageTest::debugType}); |
|
|
|
&AbstractImageTest::debugType}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void AbstractImageTest::pixelSize() { |
|
|
|
|
|
|
|
CORRADE_COMPARE(AbstractImage::pixelSize(ColorFormat::RGBA, ColorType::UnsignedInt), 4*4); |
|
|
|
|
|
|
|
CORRADE_COMPARE(AbstractImage::pixelSize(ColorFormat::DepthComponent, ColorType::UnsignedShort), 2); |
|
|
|
|
|
|
|
CORRADE_COMPARE(AbstractImage::pixelSize(ColorFormat::StencilIndex, ColorType::UnsignedByte), 1); |
|
|
|
|
|
|
|
CORRADE_COMPARE(AbstractImage::pixelSize(ColorFormat::DepthStencil, ColorType::UnsignedInt248), 4); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void AbstractImageTest::debugFormat() { |
|
|
|
void AbstractImageTest::debugFormat() { |
|
|
|
std::ostringstream o; |
|
|
|
std::ostringstream o; |
|
|
|
Debug(&o) << ColorFormat::RGBA; |
|
|
|
Debug(&o) << ColorFormat::RGBA; |
|
|
|
|