Test api fix - sampler properties is 0 in compatibility mode (#1106)

diff --git a/test_conformance/api/test_queries.cpp b/test_conformance/api/test_queries.cpp
index 91678a2..469a193 100644
--- a/test_conformance/api/test_queries.cpp
+++ b/test_conformance/api/test_queries.cpp
@@ -231,23 +231,39 @@
             error,
             "clGetSamplerInfo failed asking for CL_SAMPLER_PROPERTIES size.");
 
-        if (set_size != test_properties.size() * sizeof(cl_sampler_properties))
+        if (is_compatibility)
         {
-            log_error("ERROR: CL_SAMPLER_PROPERTIES size is %d, expected %d.\n",
-                      set_size,
-                      test_properties.size() * sizeof(cl_sampler_properties));
-            return TEST_FAIL;
+            if (set_size != 0)
+            {
+                log_error(
+                    "ERROR: CL_SAMPLER_PROPERTIES size is %d, expected 0\n",
+                    set_size);
+                return TEST_FAIL;
+            }
         }
+        else
+        {
+            if (set_size
+                != test_properties.size() * sizeof(cl_sampler_properties))
+            {
+                log_error(
+                    "ERROR: CL_SAMPLER_PROPERTIES size is %d, expected %d.\n",
+                    set_size,
+                    test_properties.size() * sizeof(cl_sampler_properties));
+                return TEST_FAIL;
+            }
 
-        cl_uint number_of_props = set_size / sizeof(cl_sampler_properties);
-        check_properties.resize(number_of_props);
-        error = clGetSamplerInfo(sampler, CL_SAMPLER_PROPERTIES, set_size,
-                                 check_properties.data(), 0);
-        test_error(error,
-                   "clGetSamplerInfo failed asking for CL_SAMPLER_PROPERTIES.");
+            cl_uint number_of_props = set_size / sizeof(cl_sampler_properties);
+            check_properties.resize(number_of_props);
+            error = clGetSamplerInfo(sampler, CL_SAMPLER_PROPERTIES, set_size,
+                                     check_properties.data(), 0);
+            test_error(
+                error,
+                "clGetSamplerInfo failed asking for CL_SAMPLER_PROPERTIES.");
 
-        error = compareProperties(check_properties, test_properties);
-        test_error(error, "checkProperties mismatch.");
+            error = compareProperties(check_properties, test_properties);
+            test_error(error, "checkProperties mismatch.");
+        }
     }
     return 0;
 }