180d59932Sopenharmony_ciOpenCL-Headers/tests README
280d59932Sopenharmony_ci===========================
380d59932Sopenharmony_ci
480d59932Sopenharmony_ciThe test_headers.c test is designed to make sure that the various cl_typen types
580d59932Sopenharmony_ciwork and conform to expectation for recent versions of cl_platform.h. Conforming
680d59932Sopenharmony_cito these expectations make use of these types practical for developers writing
780d59932Sopenharmony_ciportable code.
880d59932Sopenharmony_ci
980d59932Sopenharmony_ciThe various tests ending in .h.c are there to verify that the various OpenCL
1080d59932Sopenharmony_ciheaders can compile stand alone. That is to ensure that they may be used a la
1180d59932Sopenharmony_cicarte. This provides developers a lifeline in the case that some unneeded part
1280d59932Sopenharmony_ciof OpenCL (e.g. cl/gl sharing) brings in a pile of symbols (e.g. all of OpenGL)
1380d59932Sopenharmony_cithat collides with other headers needed by the application. It is also poor form
1480d59932Sopenharmony_cito require headers to be included in a particular order, especially if multiple
1580d59932Sopenharmony_cisystems require they be included in mutually incompatible order. So, here we
1680d59932Sopenharmony_cirequire that each header can be used standalone so that the order is irrelevant.
1780d59932Sopenharmony_ci
1880d59932Sopenharmony_ciWe also check to make sure that the headers don't cause spurious warnings. These
1980d59932Sopenharmony_citests are intended to be compiled using the most stringent compiler flags
2080d59932Sopenharmony_ciavailable for the platform, within reason. All warnings should be errors and
2180d59932Sopenharmony_ciextra warnings that it is expected developers are likely to use should be turned
2280d59932Sopenharmony_cion.
23