コード例 #1
0
TEST(createDecoderAutoDetermine, CodecLibrary)
{
    setUp();

    std::ifstream inFile("basic.bmp", std::ios::binary);
    CHECK_EQUAL(0, !inFile);
    HBitmapDecoder decoder = theCodecLibrary->createDecoder(inFile);

    CHECK(decoder.get());
    CHECK(dynamic_cast<WindowsBitmapDecoder*>(decoder.get()));

    tearDown();
}
コード例 #2
0
TEST(createDecoderViaMimeType, CodecLibrary)
{
    setUp();

    std::stringstream ss;
    HBitmapDecoder decoder = theCodecLibrary->createDecoder(msBmp, ss);

    CHECK(dynamic_cast<WindowsBitmapDecoder*>(decoder.get()));

    tearDown();
}