skip OCL tests if OpenCL isn't available
authorIlya Lavrenov <ilya.lavrenov@itseez.com>
Mon, 20 Jan 2014 13:52:32 +0000 (17:52 +0400)
committerIlya Lavrenov <ilya.lavrenov@itseez.com>
Tue, 21 Jan 2014 09:09:39 +0000 (13:09 +0400)
modules/superres/test/test_precomp.hpp
modules/superres/test/test_superres.cpp

index 47334e3..5534818 100644 (file)
@@ -52,9 +52,9 @@
 #define __OPENCV_TEST_PRECOMP_HPP__
 
 #include "opencv2/opencv_modules.hpp"
-#include "opencv2/core.hpp"
-#include "opencv2/imgproc.hpp"
+#include "opencv2/core/ocl.hpp"
 #include "opencv2/ts.hpp"
+#include "opencv2/imgproc.hpp"
 #include "opencv2/superres.hpp"
 #include "cvconfig.h"
 #include "input_array_utility.hpp"
index 95baefd..92d51fd 100644 (file)
@@ -282,7 +282,8 @@ TEST_F(SuperResolution, BTVL1_CUDA)
 
 TEST_F(SuperResolution, BTVL1_OCL)
 {
-    RunTest(cv::superres::createSuperResolution_BTVL1_OCL());
+    if (cv::ocl::useOpenCL())
+        RunTest(cv::superres::createSuperResolution_BTVL1_OCL());
 }
 
 #endif