Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
bf1d42ff
Commit
bf1d42ff
authored
14 years ago
by
Merov Linden
Browse files
Options
Downloads
Patches
Plain Diff
STORM-744 : Make getMetaData pass when all is stubbed
parent
5ed4046d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/llkdu/llimagej2ckdu.cpp
+6
-5
6 additions, 5 deletions
indra/llkdu/llimagej2ckdu.cpp
indra/llkdu/tests/llimagej2ckdu_test.cpp
+3
-2
3 additions, 2 deletions
indra/llkdu/tests/llimagej2ckdu_test.cpp
with
9 additions
and
7 deletions
indra/llkdu/llimagej2ckdu.cpp
+
6
−
5
View file @
bf1d42ff
...
...
@@ -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 codestrea
m
mInputp
=
new
LLKDUMemSource
(
base
.
getData
(),
data_size
);
}
llassert_always
(
mInputp
);
mInputp
->
reset
();
if
(
mInputp
)
{
mInputp
->
reset
();
}
mCodeStreamp
=
new
kdu_codestream
;
mCodeStreamp
->
create
(
mInputp
);
...
...
This diff is collapsed.
Click to expand it.
indra/llkdu/tests/llimagej2ckdu_test.cpp
+
3
−
2
View file @
bf1d42ff
...
...
@@ -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()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment