Lines Matching refs:stream
36 struct etna_cmd_stream *stream; in test_avail() local
41 stream = etna_cmd_stream_new(NULL, 0, NULL, NULL); in test_avail()
42 assert(stream == NULL); in test_avail()
44 stream = etna_cmd_stream_new(NULL, 4, NULL, NULL); in test_avail()
45 assert(stream); in test_avail()
46 assert(etna_cmd_stream_avail(stream) == 2); in test_avail()
47 etna_cmd_stream_del(stream); in test_avail()
49 stream = etna_cmd_stream_new(NULL, 20, NULL, NULL); in test_avail()
50 assert(stream); in test_avail()
51 assert(etna_cmd_stream_avail(stream) == 18); in test_avail()
52 etna_cmd_stream_del(stream); in test_avail()
55 stream = etna_cmd_stream_new(NULL, 1, NULL, NULL); in test_avail()
56 assert(stream); in test_avail()
57 assert(etna_cmd_stream_avail(stream) == 0); in test_avail()
58 etna_cmd_stream_del(stream); in test_avail()
60 stream = etna_cmd_stream_new(NULL, 23, NULL, NULL); in test_avail()
61 assert(stream); in test_avail()
62 assert(etna_cmd_stream_avail(stream) == 22); in test_avail()
63 etna_cmd_stream_del(stream); in test_avail()
70 struct etna_cmd_stream *stream; in test_emit() local
74 stream = etna_cmd_stream_new(NULL, 6, NULL, NULL); in test_emit()
75 assert(stream); in test_emit()
76 assert(etna_cmd_stream_avail(stream) == 4); in test_emit()
78 etna_cmd_stream_emit(stream, 0x1); in test_emit()
79 assert(etna_cmd_stream_avail(stream) == 3); in test_emit()
81 etna_cmd_stream_emit(stream, 0x2); in test_emit()
82 assert(etna_cmd_stream_avail(stream) == 2); in test_emit()
84 etna_cmd_stream_emit(stream, 0x3); in test_emit()
85 assert(etna_cmd_stream_avail(stream) == 1); in test_emit()
87 etna_cmd_stream_del(stream); in test_emit()
94 struct etna_cmd_stream *stream; in test_offset() local
98 stream = etna_cmd_stream_new(NULL, 6, NULL, NULL); in test_offset()
99 assert(etna_cmd_stream_offset(stream) == 0); in test_offset()
101 etna_cmd_stream_emit(stream, 0x1); in test_offset()
102 assert(etna_cmd_stream_offset(stream) == 1); in test_offset()
104 etna_cmd_stream_emit(stream, 0x2); in test_offset()
105 assert(etna_cmd_stream_offset(stream) == 2); in test_offset()
107 etna_cmd_stream_emit(stream, 0x3); in test_offset()
108 etna_cmd_stream_emit(stream, 0x4); in test_offset()
109 assert(etna_cmd_stream_offset(stream) == 4); in test_offset()
111 etna_cmd_stream_del(stream); in test_offset()