[opencv] 60/71: added test for http://code.opencv.org/issues/1918
Nobuhiro Iwamatsu
iwamatsu at moszumanska.debian.org
Mon Oct 17 20:16:30 UTC 2016
This is an automated email from the git hooks/post-receive script.
iwamatsu pushed a commit to annotated tag 2.4.13.1
in repository opencv.
commit 6d691f2e05aa1062e3381373eba2e494d5955678
Author: Rostislav Vasilikhin <rostislav.vasilikhin at intel.com>
Date: Mon Sep 5 22:14:47 2016 +0300
added test for http://code.opencv.org/issues/1918
---
modules/core/test/test_mat.cpp | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/modules/core/test/test_mat.cpp b/modules/core/test/test_mat.cpp
index d5b7ab9..0d35e60 100644
--- a/modules/core/test/test_mat.cpp
+++ b/modules/core/test/test_mat.cpp
@@ -925,6 +925,19 @@ TEST(Core_InputArray, empty)
ASSERT_TRUE(_InputArray(data).empty());
}
+
+TEST(Core_CopyMask, bug1918)
+{
+ Mat_<unsigned char> tmpSrc(100, 100);
+ tmpSrc = 124;
+ Mat_<unsigned char> tmpMask(100, 100);
+ tmpMask = 255;
+ Mat_<unsigned char> tmpDst(100, 100);
+ tmpDst = 2;
+ tmpSrc.copyTo(tmpDst, tmpMask);
+ ASSERT_EQ(sum(tmpDst)[0], 124 * 100 * 100);
+}
+
TEST(Core_SVD, orthogonality)
{
for (int i = 0; i < 2; i++)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opencv.git
More information about the debian-science-commits
mailing list