add test case for clCreateContextFromType()
authorLu Guanqun <guanqun.lu@intel.com>
Fri, 22 Mar 2013 08:07:08 +0000 (16:07 +0800)
committerZhigang Gong <zhigang.gong@linux.intel.com>
Wed, 10 Apr 2013 06:52:33 +0000 (14:52 +0800)
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
utests/CMakeLists.txt
utests/runtime_createcontext.cpp [new file with mode: 0644]

index 46d4c86..a47dc24 100644 (file)
@@ -64,6 +64,7 @@ ADD_LIBRARY(utests SHARED
   compiler_local_memory_barrier.cpp
   compiler_local_memory_barrier_wg64.cpp
   compiler_movforphi_undef.cpp
+  runtime_createcontext.cpp
   utest_assert.cpp
   utest.cpp
   utest_file_map.cpp
diff --git a/utests/runtime_createcontext.cpp b/utests/runtime_createcontext.cpp
new file mode 100644 (file)
index 0000000..b90e915
--- /dev/null
@@ -0,0 +1,11 @@
+#include "utest_helper.hpp"
+
+void runtime_createcontextfromtype(void) {
+  cl_int status;
+
+  if (clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU, NULL, NULL, &status) == NULL) {
+    OCL_THROW_ERROR("runtime_createcontextfromtype", status);
+  }
+}
+
+MAKE_UTEST_FROM_FUNCTION(runtime_createcontextfromtype);