libdpf/thirdparty/hedley/test/cast.c
Ryan Henry e4e666f459 Initial import of libdpf.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 14:08:32 -06:00

15 lines
260 B
C

#include "../hedley.h"
int main(void) {
int foo = 0;
long bar = HEDLEY_STATIC_CAST(long, foo);
const char* baz = "Hello, world!";
char* qux = HEDLEY_CONST_CAST(char*, baz);
if (bar != 0)
return 1;
if (baz != qux)
return 1;
return 0;
}