mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 13:51:33 -06:00
Merge branch 'upstream-KWIML' into update-kwiml
# By KWIML Upstream * upstream-KWIML: KWIML 2022-06-14 (7b9bd7fe)
This commit is contained in:
@@ -24,6 +24,12 @@
|
||||
# define STATIC_CAST(t,v) (t)(v)
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
# define SNPRINTF(buf, sz, fmt, x) sprintf(buf, fmt, x)
|
||||
#else
|
||||
# define SNPRINTF(buf, sz, fmt, x) snprintf(buf, sz, fmt, x)
|
||||
#endif
|
||||
|
||||
#define VALUE(T, U) STATIC_CAST(T, STATIC_CAST(U, 0xab) << ((sizeof(T)-1)<<3))
|
||||
|
||||
#define TEST_C_(C, V, PRI, T, U) \
|
||||
@@ -48,7 +54,7 @@
|
||||
{ \
|
||||
T const x = VALUE(T, U); \
|
||||
char const* str = STR; \
|
||||
sprintf(buf, "%" KWIML_INT_PRI##PRI, x); \
|
||||
SNPRINTF(buf, sizeof(buf), "%" KWIML_INT_PRI##PRI, x); \
|
||||
printf(LANG "KWIML_INT_PRI" #PRI ":" \
|
||||
" expected [%s], got [%s]", str, buf); \
|
||||
if(strcmp(str, buf) == 0) \
|
||||
|
||||
Reference in New Issue
Block a user