Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
78a31063
Commit
78a31063
authored
Aug 16, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imgproc(test): add checks for remove() call
parent
999f41fb
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
17 deletions
+17
-17
test_grfmt.cpp
modules/imgcodecs/test/test_grfmt.cpp
+1
-1
test_jpeg.cpp
modules/imgcodecs/test/test_jpeg.cpp
+6
-6
test_png.cpp
modules/imgcodecs/test/test_png.cpp
+1
-1
test_read_write.cpp
modules/imgcodecs/test/test_read_write.cpp
+2
-2
test_tiff.cpp
modules/imgcodecs/test/test_tiff.cpp
+4
-4
test_webp.cpp
modules/imgcodecs/test/test_webp.cpp
+3
-3
No files found.
modules/imgcodecs/test/test_grfmt.cpp
View file @
78a31063
...
...
@@ -175,7 +175,7 @@ TEST_P(Imgcodecs_ExtSize, write_imageseq)
EXPECT_LT
(
n
,
1.
);
EXPECT_PRED_FORMAT2
(
cvtest
::
MatComparator
(
0
,
0
),
img
,
img_gt
);
}
remove
(
filename
.
c_str
(
));
EXPECT_EQ
(
0
,
remove
(
filename
.
c_str
()
));
}
}
...
...
modules/imgcodecs/test/test_jpeg.cpp
View file @
78a31063
...
...
@@ -123,8 +123,8 @@ TEST(Imgcodecs_Jpeg, encode_decode_progressive_jpeg)
EXPECT_EQ
(
0
,
cvtest
::
norm
(
img_jpg_progressive
,
img_jpg_normal
,
NORM_INF
));
remove
(
output_progressive
.
c_str
(
));
remove
(
output_normal
.
c_str
(
));
EXPECT_EQ
(
0
,
remove
(
output_progressive
.
c_str
()
));
EXPECT_EQ
(
0
,
remove
(
output_normal
.
c_str
()
));
}
TEST
(
Imgcodecs_Jpeg
,
encode_decode_optimize_jpeg
)
...
...
@@ -148,8 +148,8 @@ TEST(Imgcodecs_Jpeg, encode_decode_optimize_jpeg)
EXPECT_EQ
(
0
,
cvtest
::
norm
(
img_jpg_optimized
,
img_jpg_normal
,
NORM_INF
));
remove
(
output_optimized
.
c_str
(
));
remove
(
output_normal
.
c_str
(
));
EXPECT_EQ
(
0
,
remove
(
output_optimized
.
c_str
()
));
EXPECT_EQ
(
0
,
remove
(
output_normal
.
c_str
()
));
}
TEST
(
Imgcodecs_Jpeg
,
encode_decode_rst_jpeg
)
...
...
@@ -173,8 +173,8 @@ TEST(Imgcodecs_Jpeg, encode_decode_rst_jpeg)
EXPECT_EQ
(
0
,
cvtest
::
norm
(
img_jpg_rst
,
img_jpg_normal
,
NORM_INF
));
remove
(
output_rst
.
c_str
(
));
remove
(
output_normal
.
c_str
(
));
EXPECT_EQ
(
0
,
remove
(
output_rst
.
c_str
()
));
EXPECT_EQ
(
0
,
remove
(
output_normal
.
c_str
()
));
}
#endif // HAVE_JPEG
modules/imgcodecs/test/test_png.cpp
View file @
78a31063
...
...
@@ -17,7 +17,7 @@ TEST(Imgcodecs_Png, write_big)
EXPECT_EQ
(
13043
,
img
.
cols
);
EXPECT_EQ
(
13917
,
img
.
rows
);
ASSERT_NO_THROW
(
imwrite
(
dst_file
,
img
));
remove
(
dst_file
.
c_str
(
));
EXPECT_EQ
(
0
,
remove
(
dst_file
.
c_str
()
));
}
TEST
(
Imgcodecs_Png
,
encode
)
...
...
modules/imgcodecs/test/test_read_write.cpp
View file @
78a31063
...
...
@@ -50,7 +50,7 @@ TEST(Imgcodecs_Image, read_write_bmp)
psnr
=
cvtest
::
PSNR
(
buf_loaded
,
image
);
EXPECT_GT
(
psnr
,
thresDbell
);
remove
(
dst_name
.
c_str
(
));
EXPECT_EQ
(
0
,
remove
(
dst_name
.
c_str
()
));
}
}
...
...
@@ -95,7 +95,7 @@ TEST_P(Imgcodecs_Image, read_write)
psnr
=
cvtest
::
PSNR
(
buf_loaded
,
image
);
EXPECT_GT
(
psnr
,
thresDbell
);
remove
(
full_name
.
c_str
(
));
EXPECT_EQ
(
0
,
remove
(
full_name
.
c_str
()
));
}
const
string
exts
[]
=
{
...
...
modules/imgcodecs/test/test_tiff.cpp
View file @
78a31063
...
...
@@ -41,8 +41,8 @@ TEST(Imgcodecs_Tiff, decode_tile16384x16384)
// not enough memory
}
remove
(
file3
.
c_str
(
));
remove
(
file4
.
c_str
(
));
EXPECT_EQ
(
0
,
remove
(
file3
.
c_str
()
));
EXPECT_EQ
(
0
,
remove
(
file4
.
c_str
()
));
}
TEST
(
Imgcodecs_Tiff
,
write_read_16bit_big_little_endian
)
...
...
@@ -88,7 +88,7 @@ TEST(Imgcodecs_Tiff, write_read_16bit_big_little_endian)
EXPECT_EQ
(
0xDEAD
,
img
.
at
<
ushort
>
(
0
,
0
));
EXPECT_EQ
(
0xBEEF
,
img
.
at
<
ushort
>
(
0
,
1
));
remove
(
filename
.
c_str
(
));
EXPECT_EQ
(
0
,
remove
(
filename
.
c_str
()
));
}
}
...
...
@@ -143,7 +143,7 @@ TEST(Imgcodecs_Tiff, decode_infinite_rowsperstrip)
EXPECT_NO_THROW
(
cv
::
imread
(
filename
,
IMREAD_UNCHANGED
));
remove
(
filename
.
c_str
(
));
EXPECT_EQ
(
0
,
remove
(
filename
.
c_str
()
));
}
//==================================================================================================
...
...
modules/imgcodecs/test/test_webp.cpp
View file @
78a31063
...
...
@@ -44,7 +44,7 @@ TEST(Imgcodecs_WebP, encode_decode_lossless_webp)
}
}
remove
(
output
.
c_str
(
));
EXPECT_EQ
(
0
,
remove
(
output
.
c_str
()
));
cv
::
Mat
decode
=
cv
::
imdecode
(
buf
,
IMREAD_COLOR
);
ASSERT_FALSE
(
decode
.
empty
());
...
...
@@ -71,7 +71,7 @@ TEST(Imgcodecs_WebP, encode_decode_lossy_webp)
EXPECT_NO_THROW
(
cv
::
imwrite
(
output
,
img
,
params
));
cv
::
Mat
img_webp
=
cv
::
imread
(
output
);
remove
(
output
.
c_str
(
));
EXPECT_EQ
(
0
,
remove
(
output
.
c_str
()
));
EXPECT_FALSE
(
img_webp
.
empty
());
EXPECT_EQ
(
3
,
img_webp
.
channels
());
EXPECT_EQ
(
512
,
img_webp
.
cols
);
...
...
@@ -96,7 +96,7 @@ TEST(Imgcodecs_WebP, encode_decode_with_alpha_webp)
EXPECT_NO_THROW
(
cv
::
imwrite
(
output
,
img
));
cv
::
Mat
img_webp
=
cv
::
imread
(
output
);
remove
(
output
.
c_str
(
));
EXPECT_EQ
(
0
,
remove
(
output
.
c_str
()
));
EXPECT_FALSE
(
img_webp
.
empty
());
EXPECT_EQ
(
4
,
img_webp
.
channels
());
EXPECT_EQ
(
512
,
img_webp
.
cols
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment