]> git.ozlabs.org Git - ccan/blobdiff - ccan/short_types/test/run-endian.c
endian/short_types: sparse support.
[ccan] / ccan / short_types / test / run-endian.c
diff --git a/ccan/short_types/test/run-endian.c b/ccan/short_types/test/run-endian.c
new file mode 100644 (file)
index 0000000..17508e1
--- /dev/null
@@ -0,0 +1,20 @@
+#include <ccan/endian/endian.h>
+#include <ccan/short_types/short_types.h>
+#include <ccan/tap/tap.h>
+#include <stdlib.h>
+#include <err.h>
+
+int main(int argc, char *argv[])
+{
+       plan_tests(6);
+
+       ok1(sizeof(be64) == 8);
+       ok1(sizeof(be32) == 4);
+       ok1(sizeof(be16) == 2);
+
+       ok1(sizeof(le64) == 8);
+       ok1(sizeof(le32) == 4);
+       ok1(sizeof(le16) == 2);
+
+       return exit_status();
+}