KhronosGroup / KhronosGroup/OpenCL-Headers
Extend testing when provisional extensions are enabled
- Dominant language
- C
- Stars
- 766
- Forks
- 273
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 3
Description
Could we extend the tests themselves to observe the effects of the macro, for example something like this in`tests/test_ext_headers.c`
```cpp
int provisional_macro(void) {
#ifdef CL_ENABLE_PROVISIONAL_EXTENSIONS
printf("%s is available\n", CL_KHR_COMMAND_BUFFER_EXTENSION_NAME);
#else
#ifdef CL_KHR_COMMAND_BUFFER_EXTENSION_NAME
assert(false && "cl_khr_command_buffer macros should not be defined");
return 1;
#endif // CL_KHR_COMMAND_BUFFER_EXTENSION_NAME
#endif // CL_ENABLE_PROVISIONAL_EXTENSIONS
return 0;
}
```
_Originally posted by @EwanC in https://github.com/KhronosGroup/OpenCL-Headers/pull/268#discussion_r1893840241_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in tests/test_ext_headers.c and review the existing provisional-extension tests. Add coverage that observes the macro effects when CL_ENABLE_PROVISIONAL_EXTENSIONS is enabled and verifies the related macros are absent when it is disabled; done means the test suite checks both cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100