@@ -384,7 +385,9 @@ int BadArgTest::run_test_case( int expected_code, const string& _descr )
...
@@ -384,7 +385,9 @@ int BadArgTest::run_test_case( int expected_code, const string& _descr )
catch(constcv::Exception&e)
catch(constcv::Exception&e)
{
{
thrown=true;
thrown=true;
if(e.code!=expected_code)
if(e.code!=expected_code&&
e.code!=cv::Error::StsError&&e.code!=cv::Error::StsAssert// Exact error codes support will be dropped. Checks should provide proper text messages intead.
)
{
{
ts->printf(TS::LOG,"%s (test case #%d): the error code %d is different from the expected %d\n",
ts->printf(TS::LOG,"%s (test case #%d): the error code %d is different from the expected %d\n",
ts->printf(TS::LOG,"OpenCV Error:\n\t%s (%s) in %s, file %s, line %d\n",cvErrorStr(status),err_msg,func_name[0]!=0?func_name:"unknown function",file_name,line);
ts->printf(TS::LOG,"OpenCV Error:\n\t%s (%s%s) in %s, file %s, line %d\n",cvErrorStr(status),delim,err_msg,func_name[0]!=0?func_name:"unknown function",file_name,line);