mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-19 09:55:26 +00:00
Add utilities for printing Dawn enums and bitmasks
This is a header-only utility so it can be easily included and used anyhere. Include it in DawnTest.h to automatically pick up definitions to print test parameters. Also, work around bot limitations for very-long test names. Bug: none Change-Id: I940263ab0a4cc415b06fa04749694f16ff08335c Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51841 Auto-Submit: Austin Eng <enga@chromium.org> Reviewed-by: Stephen White <senorblanco@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
@@ -61,11 +61,10 @@
|
||||
|
||||
// Implementation for DAWN_PP_FOR_EACH.
|
||||
// Creates a call to DAWN_PP_FOR_EACH_X where X is 1, 2, ..., etc.
|
||||
#define DAWN_PP_FOR_EACH_(N, func, x, ...) \
|
||||
DAWN_PP_CONCATENATE(DAWN_PP_FOR_EACH_, N)(func, x, __VA_ARGS__)
|
||||
#define DAWN_PP_FOR_EACH_(N, func, ...) DAWN_PP_CONCATENATE(DAWN_PP_FOR_EACH_, N)(func, __VA_ARGS__)
|
||||
|
||||
// DAWN_PP_FOR_EACH: Apply |func| to each argument in |x| and __VA_ARGS__
|
||||
#define DAWN_PP_FOR_EACH(func, x, ...) \
|
||||
DAWN_PP_FOR_EACH_(DAWN_PP_FOR_EACH_NARG(x, __VA_ARGS__), func, x, __VA_ARGS__)
|
||||
#define DAWN_PP_FOR_EACH(func, ...) \
|
||||
DAWN_PP_FOR_EACH_(DAWN_PP_FOR_EACH_NARG(__VA_ARGS__), func, __VA_ARGS__)
|
||||
|
||||
#endif // COMMON_PREPROCESSOR_H_
|
||||
|
||||
Reference in New Issue
Block a user