]> git.ipfire.org Git - thirdparty/openssl.git/blob - test/testutil/tu_local.h
Updated test command line parsing to support commmon commands
[thirdparty/openssl.git] / test / testutil / tu_local.h
1 /*
2 * Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License 2.0 (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
8 */
9
10 #include <stdlib.h> /* size_t */
11 #include <openssl/bn.h>
12 #include <openssl/bio.h>
13 #include "../testutil.h"
14
15 int subtest_level(void);
16 int openssl_error_cb(const char *str, size_t len, void *u);
17 const BIO_METHOD *BIO_f_tap(void);
18
19 void test_fail_message_prefix(const char *prefix, const char *file,
20 int line, const char *type,
21 const char *left, const char *right,
22 const char *op);
23
24 void test_fail_string_message(const char *prefix, const char *file,
25 int line, const char *type,
26 const char *left, const char *right,
27 const char *op, const char *m1, size_t l1,
28 const char *m2, size_t l2);
29
30 void test_fail_bignum_message(const char *prefix, const char *file,
31 int line, const char *type,
32 const char *left, const char *right,
33 const char *op,
34 const BIGNUM *bn1, const BIGNUM *bn2);
35 void test_fail_bignum_mono_message(const char *prefix, const char *file,
36 int line, const char *type,
37 const char *left, const char *right,
38 const char *op, const BIGNUM *bn);
39
40 void test_fail_memory_message(const char *prefix, const char *file,
41 int line, const char *type,
42 const char *left, const char *right,
43 const char *op,
44 const unsigned char *m1, size_t l1,
45 const unsigned char *m2, size_t l2);
46
47 __owur int setup_test_framework(int argc, char *argv[]);
48 __owur int pulldown_test_framework(int ret);
49
50 __owur int run_tests(const char *test_prog_name);
51 void set_test_title(const char *title);
52
53 typedef enum OPTION_choice_default {
54 OPT_ERR = -1,
55 OPT_EOF = 0,
56 OPT_TEST_ENUM
57 } OPTION_CHOICE_DEFAULT;
58 void opt_check_usage(void);
59