updated to 64bit crc version of ccan crc
[httpd-crcsyncproxy.git] / ccan / array_size / test / run.c
blob3a3cdcc0bb76421f53ef48a3b91c2fed9c19c445
1 #include "array_size/array_size.h"
2 #include "tap/tap.h"
4 static char array1[1];
5 static int array2[2];
6 static unsigned long array3[3][5];
7 struct foo {
8 unsigned int a, b;
9 char string[100];
11 static struct foo array4[4];
13 /* Make sure they can be used in initializers. */
14 static int array1_size = ARRAY_SIZE(array1);
15 static int array2_size = ARRAY_SIZE(array2);
16 static int array3_size = ARRAY_SIZE(array3);
17 static int array4_size = ARRAY_SIZE(array4);
19 int main(int argc, char *argv[])
21 plan_tests(8);
22 ok1(array1_size == 1);
23 ok1(array2_size == 2);
24 ok1(array3_size == 3);
25 ok1(array4_size == 4);
27 ok1(ARRAY_SIZE(array1) == 1);
28 ok1(ARRAY_SIZE(array2) == 2);
29 ok1(ARRAY_SIZE(array3) == 3);
30 ok1(ARRAY_SIZE(array4) == 4);
32 return exit_status();