1 #include <stic.h>
2 
3 #include <stddef.h> /* NULL */
4 
5 #include "../../src/io/ioeta.h"
6 
TEST(free_of_null_is_ok)7 TEST(free_of_null_is_ok)
8 {
9 	ioeta_free(NULL);
10 }
11 
TEST(alloc_initializes_all_fields)12 TEST(alloc_initializes_all_fields)
13 {
14 	const io_cancellation_t no_cancellation = {};
15 	ioeta_estim_t *const estim = ioeta_alloc(NULL, no_cancellation);
16 
17 	assert_int_equal(0, estim->total_items);
18 	assert_int_equal(0, estim->current_item);
19 	assert_int_equal(0, estim->total_bytes);
20 	assert_int_equal(0, estim->current_byte);
21 	assert_string_equal(NULL, estim->item);
22 
23 	ioeta_free(estim);
24 }
25 
26 /* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */
27 /* vim: set cinoptions+=t0 filetype=c : */
28