summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-04-25 21:14:59 -0400
committerSven Eden <yamakuzure@gmx.net>2017-07-25 09:46:52 +0200
commit8fdbd4fdbdf791d9ede56035a67bfa25454f07d2 (patch)
treec8477c64c81a49b027f53b5b7e5d3e42f3f5d256 /src/test
parent25acc5ac49b65a0592d17af8b20df6689a8d3e65 (diff)
test-sizeof: print the size of an enum
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-sizeof.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c
index 36389b771..269adfd18 100644
--- a/src/test/test-sizeof.c
+++ b/src/test/test-sizeof.c
@@ -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;
}