[Piglit] [PATCH] cl: Add a test for the predefined macros

Niels Ole Salscheider niels_ole at salscheider-online.de
Sat Sep 10 09:46:32 UTC 2016


Signed-off-by: Niels Ole Salscheider <niels_ole at salscheider-online.de>
---
 tests/cl/program/build/cl-defines.cl | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 tests/cl/program/build/cl-defines.cl

diff --git a/tests/cl/program/build/cl-defines.cl b/tests/cl/program/build/cl-defines.cl
new file mode 100644
index 0000000..696e9f0
--- /dev/null
+++ b/tests/cl/program/build/cl-defines.cl
@@ -0,0 +1,22 @@
+/*!
+[config]
+name: OpenCL predefined macros
+clc_version_min: 10
+!*/
+
+#ifndef __FILE__
+#error "__FILE__ not defined"
+#endif
+
+#ifndef __LINE__
+#error "__LINE__ not defined"
+#endif
+
+#ifndef __OPENCL_VERSION__
+#error "__OPENCL_VERSION__ not defined"
+#endif
+
+#ifndef __ENDIAN_LITTLE__
+#error "__ENDIAN_LITTLE__ not defined"
+#endif
+
-- 
2.10.0



More information about the Piglit mailing list