1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-05 06:52:22 +03:00

test-sizeof: print the size of an enum

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2017-04-25 21:14:59 -04:00
parent e4d85dbb3d
commit 26e1f724a6

View File

@ -32,6 +32,14 @@
strstr(STRINGIFY(t), "signed") ? "" : \
((t)-1 < (t)0 ? ", signed" : ", unsigned"));
enum Enum {
enum_value,
};
enum BigEnum {
big_enum_value = UINT64_C(-1),
};
int main(void) {
info(char);
info(signed char);
@ -53,5 +61,8 @@ int main(void) {
info(usec_t);
info(__time_t);
info(enum Enum);
info(enum BigEnum);
return 0;
}