| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
#include <common.h> |
| 23 |
#include <file_stream.h> |
| 24 |
#include <types.h> |
| 25 |
|
| 26 |
#include <stdio.h> |
| 27 |
|
| 28 |
#if defined( HAVE_IO_H ) || defined( WINAPI ) |
| 29 |
#include <io.h> |
| 30 |
#endif |
| 31 |
|
| 32 |
#if defined( HAVE_STDLIB_H ) || defined( WINAPI ) |
| 33 |
#include <stdlib.h> |
| 34 |
#endif |
| 35 |
|
| 36 |
#include "vhdi_test_libcerror.h" |
| 37 |
#include "vhdi_test_macros.h" |
| 38 |
#include "vhdi_test_unused.h" |
| 39 |
|
| 40 |
#include "../vhditools/vhditools_output.h" |
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
int vhdi_test_tools_output_initialize( |
| 46 |
void ) |
| 47 |
{ |
| 48 |
libcerror_error_t *error = NULL; |
| 49 |
int result = 0; |
| 50 |
|
| 51 |
result = vhditools_output_initialize( |
| 52 |
_IONBF, |
| 53 |
&error ); |
| 54 |
|
| 55 |
VHDI_TEST_ASSERT_EQUAL_INT( |
| 56 |
"result", |
| 57 |
result, |
| 58 |
1 ); |
| 59 |
|
| 60 |
VHDI_TEST_ASSERT_IS_NULL( |
| 61 |
"error", |
| 62 |
error ); |
| 63 |
|
| 64 |
return( 1 ); |
| 65 |
|
| 66 |
on_error: |
| 67 |
if( error != NULL ) |
| 68 |
{ |
| 69 |
libcerror_error_free( |
| 70 |
&error ); |
| 71 |
} |
| 72 |
return( 0 ); |
| 73 |
} |
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
#if defined( HAVE_WIDE_SYSTEM_CHARACTER ) |
| 78 |
int wmain( |
| 79 |
int argc VHDI_TEST_ATTRIBUTE_UNUSED, |
| 80 |
wchar_t * const argv[] VHDI_TEST_ATTRIBUTE_UNUSED ) |
| 81 |
#else |
| 82 |
int main( |
| 83 |
int argc VHDI_TEST_ATTRIBUTE_UNUSED, |
| 84 |
char * const argv[] VHDI_TEST_ATTRIBUTE_UNUSED ) |
| 85 |
#endif |
| 86 |
{ |
| 87 |
VHDI_TEST_UNREFERENCED_PARAMETER( argc ) |
| 88 |
VHDI_TEST_UNREFERENCED_PARAMETER( argv ) |
| 89 |
|
| 90 |
VHDI_TEST_RUN( |
| 91 |
"vhditools_output_initialize", |
| 92 |
vhdi_test_tools_output_initialize ) |
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
return( EXIT_SUCCESS ); |
| 101 |
|
| 102 |
on_error: |
| 103 |
return( EXIT_FAILURE ); |
| 104 |
} |
| 105 |
|