Apply %restore_fcommon macro for Address Sanitizer
[platform/upstream/nettle.git] / testsuite / meta-aead-test.c
1 #include "testutils.h"
2 #include "nettle-internal.h"
3 #include "nettle-meta.h"
4
5 const char* aeads[] = {
6   "gcm_aes128",
7   "gcm_aes192",
8   "gcm_aes256",
9   "gcm_camellia128",
10   "gcm_camellia256",
11   "eax_aes128",
12   "chacha_poly1305",
13 };
14
15 void
16 test_main(void)
17 {
18   int i,j;
19   int count = sizeof(aeads)/sizeof(*aeads);
20   for (i = 0; i < count; i++) {
21     for (j = 0; NULL != nettle_aeads[j]; j++) {
22       if (0 == strcmp(aeads[i], nettle_aeads[j]->name))
23         break;
24     }
25     ASSERT(NULL != nettle_aeads[j]); /* make sure we found a matching aead */
26   }
27   j = 0;
28   while (NULL != nettle_aeads[j])
29     j++;
30   ASSERT(j == count); /* we are not missing testing any aeads */
31 }
32