Skip to content
Snippets Groups Projects
Commit bf1d42ff authored by Merov Linden's avatar Merov Linden
Browse files

STORM-744 : Make getMetaData pass when all is stubbed

parent 5ed4046d
No related branches found
No related tags found
No related merge requests found
......@@ -229,16 +229,17 @@ void LLImageJ2CKDU::setupCodeStream(LLImageJ2C &base, BOOL keep_codestream, ECod
mCodeStreamp = NULL;
}
if (!mInputp)
if (!mInputp && base.getData())
{
llassert_always(base.getData());
// The compressed data has been loaded
// Setup the source for the codestrea
// Setup the source for the codestream
mInputp = new LLKDUMemSource(base.getData(), data_size);
}
llassert_always(mInputp);
mInputp->reset();
if (mInputp)
{
mInputp->reset();
}
mCodeStreamp = new kdu_codestream;
mCodeStreamp->create(mInputp);
......
......@@ -219,8 +219,9 @@ namespace tut
{
LLImageJ2C* image = new LLImageJ2C();
BOOL res = mImage->callGetMetadata(*image);
// Trying to set up a data stream with all NIL values will throw an exception that will be caught and will return FALSE
ensure("getMetadata() test failed", res == FALSE);
// Trying to set up a data stream with all NIL values and stubbed KDU will "work" and return TRUE
// Note that is linking with KDU, that call will throw an exception and fail, returning FALSE
ensure("getMetadata() test failed", res == TRUE);
}
// Test 2 : test decodeImpl()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment