Home | History | Annotate | Line # | Download | only in testutil
      1 /*
      2  * Copyright 2014-2016 The OpenSSL Project Authors. All Rights Reserved.
      3  *
      4  * Licensed under the OpenSSL license (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 #ifndef OSSL_TESTUTIL_OUTPUT_H
     11 # define OSSL_TESTUTIL_OUTPUT_H
     12 
     13 #include <stdarg.h>
     14 #include "../testutil.h"
     15 
     16 /*
     17  * The basic I/O functions used internally by the test framework.  These
     18  * can be overridden when needed. Note that if one is, then all must be.
     19  */
     20 void test_open_streams(void);
     21 void test_close_streams(void);
     22 /* The following ALL return the number of characters written */
     23 int test_vprintf_stdout(const char *fmt, va_list ap) PRINTF_FORMAT(1, 0);
     24 int test_vprintf_stderr(const char *fmt, va_list ap) PRINTF_FORMAT(1, 0);
     25 /* These return failure or success */
     26 int test_flush_stdout(void);
     27 int test_flush_stderr(void);
     28 
     29 /* Commodity functions.  There's no need to override these */
     30 int test_printf_stdout(const char *fmt, ...) PRINTF_FORMAT(1, 2);
     31 int test_printf_stderr(const char *fmt, ...) PRINTF_FORMAT(1, 2);
     32 
     33 #endif                          /* OSSL_TESTUTIL_OUTPUT_H */
     34