{"action":"created","issue":{"url":"https://api.github.com/repos/Itseez/opencv/issues/5477","labels_url":"https://api.github.com/repos/Itseez/opencv/issues/5477/labels{/name}","comments_url":"https://api.github.com/repos/Itseez/opencv/issues/5477/comments","events_url":"https://api.github.com/repos/Itseez/opencv/issues/5477/events","html_url":"https://github.com/Itseez/opencv/issues/5477","id":110642680,"number":5477,"title":"Custom unit tests that call cv::sum are too verbose.","user":{"login":"panmari","id":719020,"avatar_url":"https://avatars.githubusercontent.com/u/719020?v=3","gravatar_id":"","url":"https://api.github.com/users/panmari","html_url":"https://github.com/panmari","followers_url":"https://api.github.com/users/panmari/followers","following_url":"https://api.github.com/users/panmari/following{/other_user}","gists_url":"https://api.github.com/users/panmari/gists{/gist_id}","starred_url":"https://api.github.com/users/panmari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/panmari/subscriptions","organizations_url":"https://api.github.com/users/panmari/orgs","repos_url":"https://api.github.com/users/panmari/repos","events_url":"https://api.github.com/users/panmari/events{/privacy}","received_events_url":"https://api.github.com/users/panmari/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-09T11:55:46Z","updated_at":"2015-10-09T12:01:35Z","closed_at":null,"body":"I have a unit test along the following lines:\r\n\r\n```\r\nTEST(my_test, do_some_sum)\r\n{\r\n    Mat img1 = Mat::ones(20, 20, CV_32FC1);\r\n    Mat img2 = Mat::ones(20, 20, CV_32FC1);\r\n\r\n    Mat diff = ... // compute some stuff\r\n    Scalar diff_sums = sum(diff);\r\n    double overall_ssd = diff_sums[2];\r\n\r\n    ASSERT_NEAR(0.0, overall_ssd, EPSILON);\r\n}\r\n```\r\n\r\nSurprisingly, the result of the line `Scalar diff_sums = sum(diff);` is then printed in the test result, although I have no such print statement in the test.\r\n\r\n```\r\n[ RUN      ] my_test.do_some_sum\r\n[1031.04, 0, 0, 0]\r\n[959.124, 0, 0, 0]\r\n[948.168, 0, 0, 0]\r\n[943.579, 0, 0, 0]\r\n[940.886, 0, 0, 0]\r\n[       OK ] my_test.do_some_sum (33 ms)\r\n```"},"comment":{"url":"https://api.github.com/repos/Itseez/opencv/issues/comments/146845565","html_url":"https://github.com/Itseez/opencv/issues/5477#issuecomment-146845565","issue_url":"https://api.github.com/repos/Itseez/opencv/issues/5477","id":146845565,"user":{"login":"ilya-lavrenov","id":2566854,"avatar_url":"https://avatars.githubusercontent.com/u/2566854?v=3","gravatar_id":"","url":"https://api.github.com/users/ilya-lavrenov","html_url":"https://github.com/ilya-lavrenov","followers_url":"https://api.github.com/users/ilya-lavrenov/followers","following_url":"https://api.github.com/users/ilya-lavrenov/following{/other_user}","gists_url":"https://api.github.com/users/ilya-lavrenov/gists{/gist_id}","starred_url":"https://api.github.com/users/ilya-lavrenov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilya-lavrenov/subscriptions","organizations_url":"https://api.github.com/users/ilya-lavrenov/orgs","repos_url":"https://api.github.com/users/ilya-lavrenov/repos","events_url":"https://api.github.com/users/ilya-lavrenov/events{/privacy}","received_events_url":"https://api.github.com/users/ilya-lavrenov/received_events","type":"User","site_admin":false},"created_at":"2015-10-09T12:01:35Z","updated_at":"2015-10-09T12:01:35Z","body":"could you provide the complete code of the tests? I suppose the issue is on your side."}}