| 1 |
/* |
| 2 |
* boxes - Command line filter to draw/remove ASCII boxes around text |
| 3 |
* Copyright (c) 1999-2024 Thomas Jensen and the boxes contributors |
| 4 |
* |
| 5 |
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public |
| 6 |
* License, version 3, as published by the Free Software Foundation. |
| 7 |
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied |
| 8 |
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
| 9 |
* details. |
| 10 |
* You should have received a copy of the GNU General Public License along with this program. |
| 11 |
* If not, see <https://www.gnu.org/licenses/>. |
| 12 |
* |
| 13 |
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
| 14 |
*/ |
| 15 |
|
| 16 |
/* |
| 17 |
* Helper functions for all the unit tests. |
| 18 |
*/ |
| 19 |
|
| 20 |
#ifndef UTEST_TOOLS_H |
| 21 |
#define UTEST_TOOLS_H |
| 22 |
|
| 23 |
|
| 24 |
/** |
| 25 |
* Assert that the two given arrays have the same contents. |
| 26 |
* @param <p_expected> the expected array |
| 27 |
* @param <p_actual> the actual array |
| 28 |
* @param <p_len_expected> number of elements in `p_expected` |
| 29 |
*/ |
| 30 |
void assert_array_equal(int p_expected[], size_t *p_actual, size_t p_len_expected); |
| 31 |
|
| 32 |
|
| 33 |
/** |
| 34 |
* Print the contents of the given array for debugging purposes. |
| 35 |
* @param p_array the array to print |
| 36 |
* @param p_len the number of elements in the array |
| 37 |
*/ |
| 38 |
void print_array_i(int p_array[], size_t p_len); |
| 39 |
|
| 40 |
void print_array_s(size_t p_array[], size_t p_len); |
| 41 |
|
| 42 |
#endif |
| 43 |
|
| 44 |
/* vim: set cindent sw=4: */ |