Lines Matching defs:output
14 struct ostream *output, *buf_output;
23 output = o_stream_create_failure_at(buf_output, i, TEST_ERRMSG);
25 test_assert(o_stream_send(output, test_data, sizeof(test_data)) == (int)i);
26 test_assert_idx(o_stream_send(output, test_data, sizeof(test_data)) == -1 &&
27 output->offset == i &&
28 output->stream_errno == EIO &&
29 strcmp(o_stream_get_error(output), TEST_ERRMSG) == 0, i);
30 o_stream_destroy(&output);
35 output = o_stream_create_failure_at(buf_output, TEST_DATA_LENGTH, TEST_ERRMSG);
36 test_assert(o_stream_send(output, test_data, sizeof(test_data)) == TEST_DATA_LENGTH);
37 test_assert(o_stream_flush(output) > 0 &&
38 output->offset == TEST_DATA_LENGTH &&
39 output->stream_errno == 0);
40 o_stream_destroy(&output);
45 output = o_stream_create_failure_at_flush(buf_output, TEST_ERRMSG);
46 test_assert(o_stream_send(output, test_data, sizeof(test_data)) == TEST_DATA_LENGTH);
47 test_assert(o_stream_flush(output) < 0 && output->stream_errno == EIO &&
48 strcmp(o_stream_get_error(output), TEST_ERRMSG) == 0);
49 o_stream_destroy(&output);