Move non-CV functionality from core.hpp to separate utility.hpp header

This commit is contained in:
Andrey Kamaev
2013-03-14 20:10:54 +04:00
parent 1ad7af3c3b
commit 89356ff16d
90 changed files with 709 additions and 621 deletions

View File

@@ -36,6 +36,7 @@
#endif
#include "opencv2/core.hpp"
#include "opencv2/core/utility.hpp"
namespace cvtest
{
@@ -478,26 +479,10 @@ protected:
virtual int run_test_case( int expected_code, const string& descr );
virtual void run_func(void) = 0;
int test_case_idx;
int progress;
double t, freq;
template<class F>
int run_test_case( int expected_code, const string& _descr, F f)
{
double new_t = (double)cv::getTickCount(), dt;
if( test_case_idx < 0 )
{
test_case_idx = 0;
progress = 0;
dt = 0;
}
else
{
dt = (new_t - t)/(freq*1000);
t = new_t;
}
progress = update_progress(progress, test_case_idx, 0, dt);
int errcount = 0;
bool thrown = false;
const char* descr = _descr.c_str() ? _descr.c_str() : "";