1 /* 2 * Functions for testing 3 * 4 * Copyright (C) 2020-2021, Joachim Metz <joachim.metz@gmail.com> 5 * 6 * Refer to AUTHORS for acknowledgements. 7 * 8 * This program is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU Lesser General Public License as published by 10 * the Free Software Foundation, either version 3 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU Lesser General Public License 19 * along with this program. If not, see <https://www.gnu.org/licenses/>. 20 */ 21 22 #if !defined( _FSXFS_TEST_FUNCTIONS_H ) 23 #define _FSXFS_TEST_FUNCTIONS_H 24 25 #include <common.h> 26 #include <types.h> 27 28 #include "fsxfs_test_libbfio.h" 29 #include "fsxfs_test_libcerror.h" 30 31 #if defined( __cplusplus ) 32 extern "C" { 33 #endif 34 35 int fsxfs_test_get_narrow_source( 36 const system_character_t *source, 37 char *narrow_string, 38 size_t narrow_string_size, 39 libcerror_error_t **error ); 40 41 #if defined( HAVE_WIDE_CHARACTER_TYPE ) 42 43 int fsxfs_test_get_wide_source( 44 const system_character_t *source, 45 wchar_t *wide_string, 46 size_t wide_string_size, 47 libcerror_error_t **error ); 48 49 #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ 50 51 int fsxfs_test_system_string_copy_from_64_bit_in_decimal( 52 const system_character_t *string, 53 size_t string_size, 54 uint64_t *value_64bit, 55 libcerror_error_t **error ); 56 57 int fsxfs_test_open_file_io_handle( 58 libbfio_handle_t **file_io_handle, 59 uint8_t *data, 60 size_t data_size, 61 libcerror_error_t **error ); 62 63 int fsxfs_test_close_file_io_handle( 64 libbfio_handle_t **file_io_handle, 65 libcerror_error_t **error ); 66 67 #if defined( __cplusplus ) 68 } 69 #endif 70 71 #endif /* !defined( _FSXFS_TEST_FUNCTIONS_H ) */ 72 73