fix(tests): added missing test for opening file
This commit is contained in:
parent
f3823efb63
commit
42cc01d79f
1 changed files with 14 additions and 0 deletions
|
|
@ -109,6 +109,20 @@ COSMS_CORE_TEST_TEST(file_open,
|
|||
}
|
||||
}
|
||||
)
|
||||
|
||||
COSMS_CORE_TEST_SUB_TEST(opening non-existing file for reading,
|
||||
struct cosms_core_file file;
|
||||
CosmsCoreFileError error = cosms_core_file_open(&file, "non-existing-file.cosms", COSMS_CORE_FILE_MODE_READ);
|
||||
if (error != COSMS_CORE_FILE_NOT_FOUND) {
|
||||
cosms_core_test_sub_test_error = cosms_core_file_error_string(error);
|
||||
if (error == COSMS_CORE_FILE_OK) {
|
||||
error = cosms_core_file_close(&file);
|
||||
if (error != COSMS_CORE_FILE_OK) {
|
||||
cosms_core_test_sub_test_error = cosms_core_file_error_string(error);
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
COSMS_CORE_TEST_TEST(file_close,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue