From: Alexey Spizhevoy Date: Thu, 17 Feb 2011 11:18:32 +0000 (+0000) Subject: removed check_and_treat_gpu_exception function X-Git-Tag: accepted/2.0/20130307.220821~3485 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=97eaa95a1e1dca0fea4a9af34219781c19857dee;p=profile%2Fivi%2Fopencv.git removed check_and_treat_gpu_exception function --- diff --git a/modules/gpu/test/test_main.cpp b/modules/gpu/test/test_main.cpp index 1f2c265..d9d5351 100644 --- a/modules/gpu/test/test_main.cpp +++ b/modules/gpu/test/test_main.cpp @@ -1,9 +1,8 @@ #include "test_precomp.hpp" +CV_TEST_MAIN("gpu") + // 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 diff --git a/modules/gpu/test/test_precomp.hpp b/modules/gpu/test/test_precomp.hpp index 228fdb8..aac5733 100644 --- a/modules/gpu/test/test_precomp.hpp +++ b/modules/gpu/test/test_precomp.hpp @@ -5,27 +5,4 @@ #include "opencv2/gpu/gpu.hpp" #include "opencv2/highgui/highgui.hpp" -static inline bool check_and_treat_gpu_exception(const cv::Exception& e, cvtest::TS* ts) -{ - switch (e.code) - { - case CV_GpuNotSupported: - ts->printf(cvtest::TS::LOG, "\nGpu not supported by the library"); - break; - - case CV_GpuApiCallError: - ts->printf(cvtest::TS::LOG, "\nGPU Error: %s", e.what()); - break; - - case CV_GpuNppCallError: - ts->printf(cvtest::TS::LOG, "\nNPP Error: %s", e.what()); - break; - - default: - return false; - } - ts->set_failed_test_info(cvtest::TS::FAIL_GENERIC); - return true; -} - #endif