removed check_and_treat_gpu_exception function
authorAlexey Spizhevoy <no@email>
Thu, 17 Feb 2011 11:18:32 +0000 (11:18 +0000)
committerAlexey Spizhevoy <no@email>
Thu, 17 Feb 2011 11:18:32 +0000 (11:18 +0000)
modules/gpu/test/test_main.cpp
modules/gpu/test/test_precomp.hpp

index 1f2c265..d9d5351 100644 (file)
@@ -1,9 +1,8 @@
 #include "test_precomp.hpp"\r
 \r
+CV_TEST_MAIN("gpu")\r
+\r
 // Run test with --gtest_catch_exceptions flag to avoid runtime errors in \r
 // the case when there is no GPU\r
-CV_TEST_MAIN("gpu")\r
 \r
 // TODO Add other tests from tests/gpu folder\r
-// TODO When there is no GPU test system doesn't print error message: it fails or keeps \r
-//      quiet when --gtest_catch_exceptions is enabled\r
index 228fdb8..aac5733 100644 (file)
@@ -5,27 +5,4 @@
 #include "opencv2/gpu/gpu.hpp"\r
 #include "opencv2/highgui/highgui.hpp"\r
 \r
-static inline bool check_and_treat_gpu_exception(const cv::Exception& e, cvtest::TS* ts)\r
-{\r
-    switch (e.code)\r
-    {\r
-    case CV_GpuNotSupported: \r
-        ts->printf(cvtest::TS::LOG, "\nGpu not supported by the library"); \r
-        break;\r
-\r
-    case CV_GpuApiCallError: \r
-        ts->printf(cvtest::TS::LOG, "\nGPU Error: %s", e.what());\r
-        break;\r
-\r
-    case CV_GpuNppCallError: \r
-        ts->printf(cvtest::TS::LOG, "\nNPP Error: %s", e.what());\r
-        break;\r
-\r
-    default:\r
-        return false;\r
-    }\r
-    ts->set_failed_test_info(cvtest::TS::FAIL_GENERIC);                        \r
-    return true;\r
-}\r
-\r
 #endif\r