add packaging
[platform/upstream/nettle.git] / testsuite / meta-armor-test.c
1 #include "testutils.h"
2 #include "nettle-meta.h"
3
4 const char* armors[] = {
5   "base16",
6   "base64"
7 };
8
9 void
10 test_main(void)
11 {
12   int i,j;
13   int count = sizeof(armors)/sizeof(*armors);
14   for (i = 0; i < count; i++) {
15     for (j = 0; NULL != nettle_armors[j]; j++) {
16       if (0 == strcmp(armors[i], nettle_armors[j]->name))
17         break;
18     }
19     ASSERT(NULL != nettle_armors[j]); /* make sure we found a matching armor */
20   }
21   j = 0;
22   while (NULL != nettle_armors[j])
23     j++;
24   ASSERT(j == count); /* we are not missing testing any armors */
25 }
26