Jasper unit-tests and removed a superfluous assertion.

This commit is contained in:
Ashod Nakashian 2015-02-11 21:28:44 -05:00
parent 03ea24f298
commit 6fd2fdc2e6
2 changed files with 13 additions and 1 deletions

View File

@ -842,7 +842,6 @@ static int jas_cmshapmat_apply(jas_cmpxform_t *pxform, jas_cmreal_t *in,
*dst++ = a2;
}
} else {
assert(0);
while (--cnt >= 0) {
a0 = *src++;
src++;

View File

@ -87,6 +87,9 @@ TEST(Imgcodecs_imread, regression)
{
const char* const filenames[] =
{
#ifdef HAVE_JASPER
"Rome.jp2",
#endif
"color_palette_alpha.png",
"multipage.tif",
"rle.hdr",
@ -109,6 +112,16 @@ TEST(Imgcodecs_imread, regression)
}
}
#ifdef HAVE_JASPER
TEST(Imgcodecs_jasper, regression)
{
const string folder = string(cvtest::TS::ptr()->get_data_path()) + "/readwrite/";
ASSERT_TRUE(imread_compare(folder + "Bretagne2.jp2", IMREAD_UNCHANGED));
ASSERT_TRUE(imread_compare(folder + "Bretagne2.jp2", IMREAD_GRAYSCALE));
}
#endif
class CV_GrfmtWriteBigImageTest : public cvtest::BaseTest
{
public: