test: iob_init and iob_close tests (+ small typo fix in src)

This commit is contained in:
Gu://em_ 2026-01-08 16:59:37 +01:00
parent 464dbe8e17
commit 78967f3ef6
3 changed files with 124 additions and 2 deletions

View file

@ -17,7 +17,7 @@ static enum iob_state state = IOB_STATE_NOT_INITIALIZED;
int iob_init(struct iob_context *ctx)
{
if (state != IOB_STATE_NOT_INITIALIZED)
return IOB_ERROR_MODULE_NOT_INITIALIZED;
return IOB_ERROR_MODULE_ALREADY_INITIALIZED;
context = *ctx;

View file

@ -7,7 +7,7 @@
#define IOB_ERROR_GENERIC -1
#define IOB_ERROR_BAD_ARG -2
#define IOB_ERROR_MODULE_NOT_INITIALIZED -3
#define IOB_ERROR_MODULE_ALREADY_INITALIZED -4
#define IOB_ERROR_MODULE_ALREADY_INITIALIZED -4
#define IOB_ERROR_CANNOT_OPEN_FILE -5
enum iob_mode {