test: iob_init and iob_close tests (+ small typo fix in src)
This commit is contained in:
parent
464dbe8e17
commit
78967f3ef6
3 changed files with 124 additions and 2 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue