diff options
Diffstat (limited to 'tests/io_mock.c')
-rw-r--r-- | tests/io_mock.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/io_mock.c b/tests/io_mock.c index 51dde927..9f86fcd6 100644 --- a/tests/io_mock.c +++ b/tests/io_mock.c @@ -14,12 +14,15 @@ * GNU General Public License for more details. */ +#include <include/test.h> #include "io_mock.h" static const struct io_mock *current_io = NULL; void io_mock_register(const struct io_mock *io) { + /* A test can either register its own mock open function or fallback_open_state. */ + assert_true(io == NULL || io->open == NULL || io->fallback_open_state == NULL); current_io = io; } |