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
3a4c14e5
Commit
3a4c14e5
authored
Apr 19, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed verbosity of badarg tests
parent
dbccc9b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
10 deletions
+16
-10
calibinit.cpp
modules/calib3d/src/calibinit.cpp
+3
-2
ts.cpp
modules/ts/src/ts.cpp
+13
-8
No files found.
modules/calib3d/src/calibinit.cpp
View file @
3a4c14e5
...
...
@@ -1990,7 +1990,8 @@ bool cv::findCirclesGrid( InputArray _image, Size patternSize,
bool
isFound
=
false
;
#define BE_QUIET 1
#if BE_QUIET
redirectError
(
quiet_error
);
void
*
oldCbkData
;
ErrorCallback
oldCbk
=
redirectError
(
quiet_error
,
0
,
&
oldCbkData
);
#endif
try
{
...
...
@@ -2001,7 +2002,7 @@ bool cv::findCirclesGrid( InputArray _image, Size patternSize,
}
#if BE_QUIET
redirectError
(
0
);
redirectError
(
oldCbk
,
oldCbkData
);
#endif
if
(
isFound
)
{
...
...
modules/ts/src/ts.cpp
View file @
3a4c14e5
...
...
@@ -316,9 +316,11 @@ int BaseTest::update_progress( int progress, int test_case_idx, int count, doubl
BadArgTest
::
BadArgTest
()
{
progress
=
-
1
;
test_case_idx
=
-
1
;
freq
=
cv
::
getTickFrequency
();
progress
=
-
1
;
test_case_idx
=
-
1
;
freq
=
cv
::
getTickFrequency
();
// oldErrorCbk = 0;
// oldErrorCbkData = 0;
}
BadArgTest
::~
BadArgTest
(
void
)
...
...
@@ -378,7 +380,6 @@ int BadArgTest::run_test_case( int expected_code, const string& _descr )
return
errcount
;
}
/*****************************************************************************************\
* Base Class for Test System *
\*****************************************************************************************/
...
...
@@ -438,6 +439,12 @@ string TS::str_from_code( int code )
return
"Generic/Unknown"
;
}
static
int
tsErrorCallback
(
int
status
,
const
char
*
func_name
,
const
char
*
err_msg
,
const
char
*
file_name
,
int
line
,
TS
*
ts
)
{
ts
->
printf
(
TS
::
LOG
,
"OpenCV Error: %s (%s) in %s, file %s, line %d
\n
"
,
cvErrorStr
(
status
),
err_msg
,
func_name
[
0
]
!=
0
?
func_name
:
"unknown function"
,
file_name
,
line
);
return
0
;
}
/************************************** Running tests **********************************/
void
TS
::
init
(
const
string
&
modulename
)
...
...
@@ -453,10 +460,10 @@ void TS::init( const string& modulename )
data_path
=
string
(
buf
);
}
cv
::
redirectError
((
cv
::
ErrorCallback
)
tsErrorCallback
,
this
);
if
(
::
testing
::
GTEST_FLAG
(
catch_exceptions
)
)
{
cvSetErrMode
(
CV_ErrModeParent
);
cvRedirectError
(
cvStdErrReport
);
#if defined WIN32 || defined _WIN32
#ifdef _MSC_VER
_set_se_translator
(
SEHTranslator
);
...
...
@@ -468,8 +475,6 @@ void TS::init( const string& modulename )
}
else
{
cvSetErrMode
(
CV_ErrModeLeaf
);
cvRedirectError
(
cvGuiBoxReport
);
#if defined WIN32 || defined _WIN32
#ifdef _MSC_VER
_set_se_translator
(
0
);
...
...
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