removed catch from GPU stereo_bp test as --gtest_catch_exceptions flags exists (but err msg isn't printed in case when there is no GPU)
This commit is contained in:
parent
51cee84123
commit
7f1aa1b92d
@ -1,3 +1,9 @@
|
||||
#include "test_precomp.hpp"
|
||||
|
||||
// Run test with --gtest_catch_exceptions flag to avoid runtime errors in
|
||||
// the case when there is no GPU
|
||||
CV_TEST_MAIN("gpu")
|
||||
|
||||
// TODO Add other tests from tests/gpu folder
|
||||
// TODO When there is no GPU test system doesn't print error message: it fails or keeps
|
||||
// quiet when --gtest_catch_exceptions is enabled
|
||||
|
@ -55,13 +55,11 @@ struct CV_GpuStereoBPTest : public cvtest::BaseTest
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
{cv::Mat temp; cv::cvtColor(img_l, temp, CV_BGR2BGRA); cv::swap(temp, img_l);}
|
||||
{cv::Mat temp; cv::cvtColor(img_r, temp, CV_BGR2BGRA); cv::swap(temp, img_r);}
|
||||
|
||||
cv::gpu::GpuMat disp;
|
||||
cv::gpu::StereoBeliefPropagation bpm(64, 8, 2, 25, 0.1f, 15, 1, CV_16S);
|
||||
cv::gpu::GpuMat disp;
|
||||
|
||||
bpm(cv::gpu::GpuMat(img_l), cv::gpu::GpuMat(img_r), disp);
|
||||
|
||||
@ -76,13 +74,6 @@ struct CV_GpuStereoBPTest : public cvtest::BaseTest
|
||||
ts->set_failed_test_info(cvtest::TS::FAIL_GENERIC);
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch(const cv::Exception& e)
|
||||
{
|
||||
if (!check_and_treat_gpu_exception(e, ts))
|
||||
throw;
|
||||
return;
|
||||
}
|
||||
|
||||
ts->set_failed_test_info(cvtest::TS::OK);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user