unit-tests: Use a larger timeout for test vector testing
[strongswan.git] / src / libstrongswan / tests / suites / test_vectors.c
1 /*
2 * Copyright (C) 2014 Tobias Brunner
3 * Hochschule fuer Technik Rapperswil
4 *
5 * Copyright (C) 2013 Martin Willi
6 * Copyright (C) 2013 revosec AG
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 * for more details.
17 */
18
19 #include "test_suite.h"
20
21 #include <utils/test.h>
22
23 IMPORT_FUNCTION_FOR_TESTS(crypto, verify_registered_algorithms, u_int,
24 crypto_factory_t *factory);
25
26 START_TEST(test_vectors)
27 {
28 u_int failed = TEST_FUNCTION(crypto, verify_registered_algorithms,
29 lib->crypto);
30 fail_if(failed > 0, "%u test vectors failed", failed);
31 }
32 END_TEST
33
34
35 Suite *vectors_suite_create()
36 {
37 Suite *s;
38 TCase *tc;
39
40 s = suite_create("vectors");
41
42 tc = tcase_create("failures");
43 tcase_add_test(tc, test_vectors);
44 tcase_set_timeout(tc, 8);
45 suite_add_tcase(s, tc);
46
47 return s;
48 }