This commit is contained in:
Parth Aggarwal 2020-07-20 20:36:00 -04:00
Родитель e60bea2ba3
Коммит 0c334dc671
3 изменённых файлов: 7 добавлений и 13 удалений

Просмотреть файл

@ -142,14 +142,14 @@ MOCKABLE_FUNCTION_WITH_RETURNS(, int, file_extend, FILE_HANDLE, handle, uint64_t
`file_extend` grows the file to `desired_size`. The contents of the file between the old end and new end are not defined.
**SRS_FILE_43_024: [** If `handle` is `NULL`, `file_extend` shall fail and return a non-zero value. **]**
**S_R_S_FILE_43_024: [** If `handle` is `NULL`, `file_extend` shall fail and return a non-zero value. **]**
**SRS_FILE_43_025: [** If `desired_size` is greater than `INT64_MAX`, `file_extend` shall fail and return a non-zero value. **]**
**S_R_S_FILE_43_025: [** If `desired_size` is greater than `INT64_MAX`, `file_extend` shall fail and return a non-zero value. **]**
**SRS_FILE_43_026: [** If `desired_size` is less than the current size of the file, `file_extend` shall fail and return a non-zero value. **]**
**S_R_S_FILE_43_026: [** If `desired_size` is less than the current size of the file, `file_extend` shall fail and return a non-zero value. **]**
**SRS_FILE_43_027: [** `file_extend` shall set the valid file data size of the given file to `desired_size`. **]**
**S_R_S_FILE_43_027: [** `file_extend` shall set the valid file data size of the given file to `desired_size`. **]**
**SRS_FILE_43_028: [** If there are any failures, `file_extend` shall return a non-zero value. **]**
**S_R_S_FILE_43_028: [** If there are any failures, `file_extend` shall return a non-zero value. **]**
**SRS_FILE_43_029: [** If there are no failures, `file_extend` will return 0. **]**
**S_R_S_FILE_43_029: [** If there are no failures, `file_extend` will return 0. **]**

Просмотреть файл

@ -148,7 +148,6 @@ IMPLEMENT_MOCKABLE_FUNCTION(, FILE_HANDLE, file_create, EXECUTION_ENGINE_HANDLE,
}
else
{
/*Codes_SRS_FILE_43_038: [ file_create shall register user_report_fault_callback with argument user_report_fault_context as the callback function to be called when the callback specified by the user for a specific asynchronous operation cannot be called. ]*/
result->user_report_fault_callback = user_report_fault_callback;
result->user_report_fault_context = user_report_fault_context;
}

Просмотреть файл

@ -343,9 +343,6 @@ TEST_FUNCTION(file_destroy_succeeds)
///assert
ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls());
///cleanup
file_destroy(file_handle);
}
/*Tests_SRS_FILE_43_009: [ If handle is NULL then file_write_async shall fail and return FILE_WRITE_ASYNC_INVALID_ARGS. ]*/
@ -825,7 +822,7 @@ TEST_FUNCTION(file_read_async_fails)
TEST_FUNCTION(file_extend_returns_zero)
{
///arrange
FILE_HANDLE file_handle = get_file_handle("file_extend_returns_zero.txt")
FILE_HANDLE file_handle = get_file_handle("file_extend_returns_zero.txt");
///act
int return_val = file_extend(file_handle, 0);
@ -837,7 +834,6 @@ TEST_FUNCTION(file_extend_returns_zero)
}
/*Tests_SRS_FILE_WIN32_43_034: [ on_file_io_complete_win32 shall recover the file handle, the number of bytes requested by the user, user_callback and user_context from the context containing overlapped. ]*/
/*Tests_SRS_FILE_WIN32_43_067: [ on_file_io_complete_win32 shall compare number_of_bytes_transferred to the number of bytes requested by the user. ]*/
/*Tests_SRS_FILE_WIN32_43_066: [ on_file_io_complete_win32 shall call user_callback with is_successful as true if and only if io_result is equal to NO_ERROR and number_of_bytes_transferred is equal to the number of bytes requested by the user. ]*/
TEST_FUNCTION(on_file_io_complete_win32_calls_callback_successfully_for_write)
{
@ -926,7 +922,6 @@ TEST_FUNCTION(on_file_io_complete_win32_calls_callback_unsuccessfully_for_write_
}
/*Tests_SRS_FILE_WIN32_43_034: [ on_file_io_complete_win32 shall recover the file handle, the number of bytes requested by the user, user_callback and user_context from the context containing overlapped. ]*/
/*Tests_SRS_FILE_WIN32_43_067: [ on_file_io_complete_win32 shall compare number_of_bytes_transferred to the number of bytes requested by the user. ]*/
/*Tests_SRS_FILE_WIN32_43_066: [ on_file_io_complete_win32 shall call user_callback with is_successful as true if and only if io_result is equal to NO_ERROR and number_of_bytes_transferred is equal to the number of bytes requested by the user. ]*/
TEST_FUNCTION(on_file_io_complete_win32_calls_callback_successfully_for_read)
{