1 /* GLib testing framework examples and tests
2 * Copyright (C) 2008 Red Hat, Inc.
3 * Authors: Matthias Clasen <mclasen@redhat.com>
5 * This work is provided "as is"; redistribution and modification
6 * in whole or in part, in any medium, physical or electronic is
7 * permitted without restriction.
9 * This work is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * In no event shall the authors or contributors be liable for any
14 * direct, indirect, incidental, special, exemplary, or consequential
15 * damages (including, but not limited to, procurement of substitute
16 * goods or services; loss of use, data, or profits; or business
17 * interruption) however caused and on any theory of liability, whether
18 * in contract, strict liability, or tort (including negligence or
19 * otherwise) arising in any way out of the use of this software, even
20 * if advised of the possibility of such damage.
23 #include <glib/glib.h>
36 base
= g_memory_input_stream_new_from_data ("abcdefghijk", -1, NULL
);
37 in
= g_buffered_input_stream_new_sized (base
, 64);
39 g_buffered_input_stream_fill (G_BUFFERED_INPUT_STREAM (in
), 5, NULL
, NULL
);
40 g_assert_cmpint (g_buffered_input_stream_get_available (G_BUFFERED_INPUT_STREAM (in
)), ==, 5);
41 g_buffered_input_stream_fill (G_BUFFERED_INPUT_STREAM (in
), -1, NULL
, NULL
);
42 g_assert_cmpint (g_buffered_input_stream_get_available (G_BUFFERED_INPUT_STREAM (in
)), ==, strlen ("abcdefjhijk"));
44 buffer
= g_new0 (char, 64);
45 npeek
= g_buffered_input_stream_peek (G_BUFFERED_INPUT_STREAM (in
), buffer
, 2, 3);
46 g_assert_cmpint (npeek
, ==, 3);
47 g_assert_cmpstr ("cde", ==, buffer
);
50 buffer
= g_new0 (char, 64);
51 npeek
= g_buffered_input_stream_peek (G_BUFFERED_INPUT_STREAM (in
), buffer
, 9, 5);
52 g_assert_cmpint (npeek
, ==, 2);
53 g_assert_cmpstr ("jk", ==, buffer
);
56 buffer
= g_new0 (char, 64);
57 npeek
= g_buffered_input_stream_peek (G_BUFFERED_INPUT_STREAM (in
), buffer
, 75, 3);
58 g_assert_cmpint (npeek
, ==, 0);
62 g_object_unref (base
);
66 test_peek_buffer (void)
74 base
= g_memory_input_stream_new_from_data ("abcdefghijk", -1, NULL
);
75 in
= g_buffered_input_stream_new (base
);
77 nfill
= g_buffered_input_stream_fill (G_BUFFERED_INPUT_STREAM (in
), strlen ("abcdefghijk"), NULL
, NULL
);
78 buffer
= (char *) g_buffered_input_stream_peek_buffer (G_BUFFERED_INPUT_STREAM (in
), &bufsize
);
79 g_assert_cmpint (nfill
, ==, bufsize
);
80 g_assert (0 == strncmp ("abcdefghijk", buffer
, bufsize
));
83 g_object_unref (base
);
87 test_set_buffer_size (void)
94 base
= g_memory_input_stream_new_from_data ("abcdefghijk", -1, NULL
);
95 in
= g_buffered_input_stream_new (base
);
96 size
= g_buffered_input_stream_get_buffer_size (G_BUFFERED_INPUT_STREAM (in
));
97 g_assert_cmpint (size
, ==, 4096);
99 g_buffered_input_stream_set_buffer_size (G_BUFFERED_INPUT_STREAM (in
), 64);
100 size
= g_buffered_input_stream_get_buffer_size (G_BUFFERED_INPUT_STREAM (in
));
101 g_assert_cmpint (size
, ==, 64);
103 /* size cannot shrink below current content len */
104 g_buffered_input_stream_fill (G_BUFFERED_INPUT_STREAM (in
), strlen ("abcdefghijk"), NULL
, NULL
);
105 g_buffered_input_stream_peek_buffer (G_BUFFERED_INPUT_STREAM (in
), &bufsize
);
106 g_buffered_input_stream_set_buffer_size (G_BUFFERED_INPUT_STREAM (in
), 2);
107 size
= g_buffered_input_stream_get_buffer_size (G_BUFFERED_INPUT_STREAM (in
));
108 g_assert_cmpint (size
, ==, bufsize
);
109 g_object_get (in
, "buffer-size", &bufsize_prop
, NULL
);
110 g_assert_cmpint (bufsize_prop
, ==, bufsize
);
114 in
= g_buffered_input_stream_new_sized (base
, 64);
115 size
= g_buffered_input_stream_get_buffer_size (G_BUFFERED_INPUT_STREAM (in
));
116 g_assert_cmpint (size
, ==, 64);
119 g_object_unref (base
);
123 test_read_byte (void)
129 g_test_bug ("562393");
131 base
= g_memory_input_stream_new_from_data ("abcdefgh", -1, NULL
);
132 in
= g_buffered_input_stream_new (base
);
135 g_assert_cmpint (g_buffered_input_stream_read_byte (G_BUFFERED_INPUT_STREAM (in
), NULL
, &error
), ==, 'a');
136 g_assert_no_error (error
);
137 g_assert_cmpint (g_buffered_input_stream_read_byte (G_BUFFERED_INPUT_STREAM (in
), NULL
, &error
), ==, 'b');
138 g_assert_no_error (error
);
139 g_assert_cmpint (g_buffered_input_stream_read_byte (G_BUFFERED_INPUT_STREAM (in
), NULL
, &error
), ==, 'c');
140 g_assert_no_error (error
);
142 g_assert_cmpint (g_input_stream_skip (in
, 3, NULL
, &error
), ==, 3);
143 g_assert_no_error (error
);
145 g_assert_cmpint (g_buffered_input_stream_read_byte (G_BUFFERED_INPUT_STREAM (in
), NULL
, &error
), ==, 'g');
146 g_assert_no_error (error
);
147 g_assert_cmpint (g_buffered_input_stream_read_byte (G_BUFFERED_INPUT_STREAM (in
), NULL
, &error
), ==, 'h');
148 g_assert_no_error (error
);
149 g_assert_cmpint (g_buffered_input_stream_read_byte (G_BUFFERED_INPUT_STREAM (in
), NULL
, &error
), ==, -1);
150 g_assert_no_error (error
);
152 g_assert (g_input_stream_close (in
, NULL
, &error
));
153 g_assert_no_error (error
);
154 g_assert_cmpint (g_buffered_input_stream_read_byte (G_BUFFERED_INPUT_STREAM (in
), NULL
, &error
), ==, -1);
155 g_assert_error (error
, G_IO_ERROR
, G_IO_ERROR_CLOSED
);
156 g_error_free (error
);
159 g_object_unref (base
);
170 base
= g_memory_input_stream_new_from_data ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, NULL
);
171 in
= g_buffered_input_stream_new_sized (base
, 8);
173 g_assert_cmpint (g_buffered_input_stream_get_available (G_BUFFERED_INPUT_STREAM (in
)), ==, 0);
176 g_assert_cmpint (g_buffered_input_stream_fill (G_BUFFERED_INPUT_STREAM (in
), 8, NULL
, &error
), ==, 8);
177 g_assert_no_error (error
);
179 g_assert_cmpint (g_buffered_input_stream_get_available (G_BUFFERED_INPUT_STREAM (in
)), ==, 8);
181 memset (buffer
, 0, 20);
182 g_assert_cmpint (g_input_stream_read (in
, &buffer
, 16, NULL
, &error
), ==, 16);
183 g_assert_cmpstr (buffer
, ==, "abcdefghijklmnop");
184 g_assert_no_error (error
);
186 g_assert_cmpint (g_buffered_input_stream_get_available (G_BUFFERED_INPUT_STREAM (in
)), ==, 0);
188 memset (buffer
, 0, 20);
189 g_assert_cmpint (g_input_stream_read (in
, &buffer
, 16, NULL
, &error
), ==, 16);
190 g_assert_cmpstr (buffer
, ==, "qrstuvwxyzABCDEF");
191 g_assert_no_error (error
);
193 memset (buffer
, 0, 20);
194 g_assert_cmpint (g_input_stream_read (in
, &buffer
, 16, NULL
, &error
), ==, 16);
195 g_assert_cmpstr (buffer
, ==, "GHIJKLMNOPQRSTUV");
196 g_assert_no_error (error
);
198 memset (buffer
, 0, 20);
199 g_assert_cmpint (g_input_stream_read (in
, &buffer
, 16, NULL
, &error
), ==, 4);
200 g_assert_cmpstr (buffer
, ==, "WXYZ");
201 g_assert_no_error (error
);
203 memset (buffer
, 0, 20);
204 g_assert_cmpint (g_input_stream_read (in
, &buffer
, 16, NULL
, &error
), ==, 0);
205 g_assert_no_error (error
);
208 g_object_unref (base
);
212 return_result_cb (GObject
*object
,
213 GAsyncResult
*result
,
216 GAsyncResult
**ret
= user_data
;
218 *ret
= g_object_ref (result
);
222 test_read_async (void)
228 GAsyncResult
*result
;
230 base
= g_memory_input_stream_new_from_data ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, NULL
);
231 in
= g_buffered_input_stream_new_sized (base
, 8);
233 g_assert_cmpint (g_buffered_input_stream_get_available (G_BUFFERED_INPUT_STREAM (in
)), ==, 0);
237 g_buffered_input_stream_fill_async (G_BUFFERED_INPUT_STREAM (in
), 8,
238 G_PRIORITY_DEFAULT
, NULL
,
239 return_result_cb
, &result
);
241 g_main_context_iteration (NULL
, TRUE
);
242 g_assert_cmpint (g_buffered_input_stream_fill_finish (G_BUFFERED_INPUT_STREAM (in
), result
, &error
), ==, 8);
243 g_assert_no_error (error
);
244 g_clear_object (&result
);
246 g_assert_cmpint (g_buffered_input_stream_get_available (G_BUFFERED_INPUT_STREAM (in
)), ==, 8);
248 memset (buffer
, 0, 20);
249 g_input_stream_read_async (in
, &buffer
, 16, G_PRIORITY_DEFAULT
,
250 NULL
, return_result_cb
, &result
);
252 g_main_context_iteration (NULL
, TRUE
);
253 g_assert_cmpint (g_input_stream_read_finish (in
, result
, &error
), ==, 16);
254 g_assert_cmpstr (buffer
, ==, "abcdefghijklmnop");
255 g_assert_no_error (error
);
256 g_clear_object (&result
);
258 g_assert_cmpint (g_buffered_input_stream_get_available (G_BUFFERED_INPUT_STREAM (in
)), ==, 0);
260 memset (buffer
, 0, 20);
261 g_input_stream_read_async (in
, &buffer
, 16, G_PRIORITY_DEFAULT
,
262 NULL
, return_result_cb
, &result
);
264 g_main_context_iteration (NULL
, TRUE
);
265 g_assert_cmpint (g_input_stream_read_finish (in
, result
, &error
), ==, 16);
266 g_assert_cmpstr (buffer
, ==, "qrstuvwxyzABCDEF");
267 g_assert_no_error (error
);
268 g_clear_object (&result
);
270 memset (buffer
, 0, 20);
271 g_input_stream_read_async (in
, &buffer
, 16, G_PRIORITY_DEFAULT
,
272 NULL
, return_result_cb
, &result
);
274 g_main_context_iteration (NULL
, TRUE
);
275 g_assert_cmpint (g_input_stream_read_finish (in
, result
, &error
), ==, 16);
276 g_assert_cmpstr (buffer
, ==, "GHIJKLMNOPQRSTUV");
277 g_assert_no_error (error
);
278 g_clear_object (&result
);
280 memset (buffer
, 0, 20);
281 g_input_stream_read_async (in
, &buffer
, 16, G_PRIORITY_DEFAULT
,
282 NULL
, return_result_cb
, &result
);
284 g_main_context_iteration (NULL
, TRUE
);
285 g_assert_cmpint (g_input_stream_read_finish (in
, result
, &error
), ==, 4);
286 g_assert_cmpstr (buffer
, ==, "WXYZ");
287 g_assert_no_error (error
);
288 g_clear_object (&result
);
290 memset (buffer
, 0, 20);
291 g_input_stream_read_async (in
, &buffer
, 16, G_PRIORITY_DEFAULT
,
292 NULL
, return_result_cb
, &result
);
294 g_main_context_iteration (NULL
, TRUE
);
295 g_assert_cmpint (g_input_stream_read_finish (in
, result
, &error
), ==, 0);
296 g_assert_no_error (error
);
297 g_clear_object (&result
);
300 g_object_unref (base
);
310 base
= g_memory_input_stream_new_from_data ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVXYZ", -1, NULL
);
311 in
= g_buffered_input_stream_new_sized (base
, 5);
314 g_assert_cmpint (g_buffered_input_stream_read_byte (G_BUFFERED_INPUT_STREAM (in
), NULL
, &error
), ==, 'a');
315 g_assert_no_error (error
);
316 g_assert_cmpint (g_buffered_input_stream_read_byte (G_BUFFERED_INPUT_STREAM (in
), NULL
, &error
), ==, 'b');
317 g_assert_no_error (error
);
318 g_assert_cmpint (g_buffered_input_stream_read_byte (G_BUFFERED_INPUT_STREAM (in
), NULL
, &error
), ==, 'c');
319 g_assert_no_error (error
);
321 g_assert_cmpint (g_input_stream_skip (in
, 7, NULL
, &error
), ==, 7);
322 g_assert_no_error (error
);
323 g_assert_cmpint (g_buffered_input_stream_read_byte (G_BUFFERED_INPUT_STREAM (in
), NULL
, &error
), ==, 'k');
324 g_assert_no_error (error
);
326 g_assert_cmpint (g_input_stream_skip (in
, 10, NULL
, &error
), ==, 10);
327 g_assert_no_error (error
);
328 g_assert_cmpint (g_buffered_input_stream_read_byte (G_BUFFERED_INPUT_STREAM (in
), NULL
, &error
), ==, 'v');
329 g_assert_no_error (error
);
331 g_assert_cmpint (g_input_stream_skip (in
, 20, NULL
, &error
), ==, 20);
332 g_assert_no_error (error
);
333 g_assert_cmpint (g_buffered_input_stream_read_byte (G_BUFFERED_INPUT_STREAM (in
), NULL
, &error
), ==, 'Q');
334 g_assert_no_error (error
);
336 g_assert_cmpint (g_input_stream_skip (in
, 10, NULL
, &error
), ==, 8);
337 g_assert_no_error (error
);
338 g_assert_cmpint (g_input_stream_skip (in
, 10, NULL
, &error
), ==, 0);
339 g_assert_no_error (error
);
342 g_object_unref (base
);
346 test_skip_async (void)
351 GAsyncResult
*result
;
353 base
= g_memory_input_stream_new_from_data ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVXYZ", -1, NULL
);
354 in
= g_buffered_input_stream_new_sized (base
, 5);
357 g_assert_cmpint (g_buffered_input_stream_read_byte (G_BUFFERED_INPUT_STREAM (in
), NULL
, &error
), ==, 'a');
358 g_assert_no_error (error
);
359 g_assert_cmpint (g_buffered_input_stream_read_byte (G_BUFFERED_INPUT_STREAM (in
), NULL
, &error
), ==, 'b');
360 g_assert_no_error (error
);
361 g_assert_cmpint (g_buffered_input_stream_read_byte (G_BUFFERED_INPUT_STREAM (in
), NULL
, &error
), ==, 'c');
362 g_assert_no_error (error
);
365 g_input_stream_skip_async (in
, 7, G_PRIORITY_DEFAULT
,
366 NULL
, return_result_cb
, &result
);
368 g_main_context_iteration (NULL
, TRUE
);
369 g_assert_cmpint (g_input_stream_skip_finish (in
, result
, &error
), ==, 7);
370 g_assert_no_error (error
);
371 g_clear_object (&result
);
372 g_assert_cmpint (g_buffered_input_stream_read_byte (G_BUFFERED_INPUT_STREAM (in
), NULL
, &error
), ==, 'k');
373 g_assert_no_error (error
);
375 g_input_stream_skip_async (in
, 10, G_PRIORITY_DEFAULT
,
376 NULL
, return_result_cb
, &result
);
378 g_main_context_iteration (NULL
, TRUE
);
379 g_assert_cmpint (g_input_stream_skip_finish (in
, result
, &error
), ==, 10);
380 g_assert_no_error (error
);
381 g_clear_object (&result
);
382 g_assert_cmpint (g_buffered_input_stream_read_byte (G_BUFFERED_INPUT_STREAM (in
), NULL
, &error
), ==, 'v');
383 g_assert_no_error (error
);
385 g_input_stream_skip_async (in
, 20, G_PRIORITY_DEFAULT
,
386 NULL
, return_result_cb
, &result
);
388 g_main_context_iteration (NULL
, TRUE
);
389 g_assert_cmpint (g_input_stream_skip_finish (in
, result
, &error
), ==, 20);
390 g_assert_no_error (error
);
391 g_clear_object (&result
);
392 g_assert_cmpint (g_buffered_input_stream_read_byte (G_BUFFERED_INPUT_STREAM (in
), NULL
, &error
), ==, 'Q');
393 g_assert_no_error (error
);
395 g_input_stream_skip_async (in
, 10, G_PRIORITY_DEFAULT
,
396 NULL
, return_result_cb
, &result
);
398 g_main_context_iteration (NULL
, TRUE
);
399 g_assert_cmpint (g_input_stream_skip_finish (in
, result
, &error
), ==, 8);
400 g_clear_object (&result
);
401 g_assert_no_error (error
);
403 g_input_stream_skip_async (in
, 10, G_PRIORITY_DEFAULT
,
404 NULL
, return_result_cb
, &result
);
406 g_main_context_iteration (NULL
, TRUE
);
407 g_assert_cmpint (g_input_stream_skip_finish (in
, result
, &error
), ==, 0);
408 g_clear_object (&result
);
409 g_assert_no_error (error
);
412 g_object_unref (base
);
422 base
= g_memory_input_stream_new_from_data ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVXYZ", -1, NULL
);
423 in
= g_buffered_input_stream_new (base
);
425 g_assert (g_filter_input_stream_get_close_base_stream (G_FILTER_INPUT_STREAM (in
)));
428 g_assert (g_input_stream_close (in
, NULL
, &error
));
429 g_assert_no_error (error
);
430 g_assert (g_input_stream_is_closed (base
));
433 g_object_unref (base
);
435 base
= g_memory_input_stream_new_from_data ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVXYZ", -1, NULL
);
436 in
= g_buffered_input_stream_new (base
);
438 g_filter_input_stream_set_close_base_stream (G_FILTER_INPUT_STREAM (in
), FALSE
);
441 g_assert (g_input_stream_close (in
, NULL
, &error
));
442 g_assert_no_error (error
);
443 g_assert (!g_input_stream_is_closed (base
));
446 g_object_unref (base
);
458 base
= g_memory_input_stream_new_from_data ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVXYZ", -1, NULL
);
459 in
= g_buffered_input_stream_new_sized (base
, 4);
463 g_assert_cmpint (g_seekable_tell (G_SEEKABLE (in
)), ==, 0);
464 byte
= g_buffered_input_stream_read_byte (G_BUFFERED_INPUT_STREAM (in
), NULL
, &error
);
465 g_assert_no_error (error
);
466 g_assert_cmpint (byte
, ==, 'a');
467 g_assert_cmpint (g_seekable_tell (G_SEEKABLE (in
)), ==, 1);
469 /* Seek forward (in buffer) */
470 ret
= g_seekable_seek (G_SEEKABLE (in
), 1, G_SEEK_CUR
, NULL
, &error
);
471 g_assert_no_error (error
);
473 g_assert_cmpint (g_seekable_tell (G_SEEKABLE (in
)), ==, 2);
474 byte
= g_buffered_input_stream_read_byte (G_BUFFERED_INPUT_STREAM (in
), NULL
, &error
);
475 g_assert_no_error (error
);
476 g_assert_cmpint (byte
, ==, 'c');
477 g_assert_cmpint (g_seekable_tell (G_SEEKABLE (in
)), ==, 3);
479 /* Seek backward (in buffer) */
480 ret
= g_seekable_seek (G_SEEKABLE (in
), -2, G_SEEK_CUR
, NULL
, &error
);
481 g_assert_no_error (error
);
483 g_assert_cmpint (g_seekable_tell (G_SEEKABLE (in
)), ==, 1);
484 byte
= g_buffered_input_stream_read_byte (G_BUFFERED_INPUT_STREAM (in
), NULL
, &error
);
485 g_assert_no_error (error
);
486 g_assert_cmpint (byte
, ==, 'b');
487 g_assert_cmpint (g_seekable_tell (G_SEEKABLE (in
)), ==, 2);
489 /* Seek forward (outside buffer) */
490 ret
= g_seekable_seek (G_SEEKABLE (in
), 6, G_SEEK_CUR
, NULL
, &error
);
491 g_assert_no_error (error
);
493 g_assert_cmpint (g_seekable_tell (G_SEEKABLE (in
)), ==, 8);
494 byte
= g_buffered_input_stream_read_byte (G_BUFFERED_INPUT_STREAM (in
), NULL
, &error
);
495 g_assert_no_error (error
);
496 g_assert_cmpint (byte
, ==, 'i');
497 g_assert_cmpint (g_seekable_tell (G_SEEKABLE (in
)), ==, 9);
499 /* Seek backward (outside buffer) */
500 ret
= g_seekable_seek (G_SEEKABLE (in
), -6, G_SEEK_CUR
, NULL
, &error
);
501 g_assert_no_error (error
);
503 g_assert_cmpint (g_seekable_tell (G_SEEKABLE (in
)), ==, 3);
504 byte
= g_buffered_input_stream_read_byte (G_BUFFERED_INPUT_STREAM (in
), NULL
, &error
);
505 g_assert_no_error (error
);
506 g_assert_cmpint (byte
, ==, 'd');
507 g_assert_cmpint (g_seekable_tell (G_SEEKABLE (in
)), ==, 4);
509 /* Seek from beginning */
510 ret
= g_seekable_seek (G_SEEKABLE (in
), 8, G_SEEK_SET
, NULL
, &error
);
511 g_assert_no_error (error
);
513 g_assert_cmpint (g_seekable_tell (G_SEEKABLE (in
)), ==, 8);
514 byte
= g_buffered_input_stream_read_byte (G_BUFFERED_INPUT_STREAM (in
), NULL
, &error
);
515 g_assert_no_error (error
);
516 g_assert_cmpint (byte
, ==, 'i');
517 g_assert_cmpint (g_seekable_tell (G_SEEKABLE (in
)), ==, 9);
520 ret
= g_seekable_seek (G_SEEKABLE (in
), -1, G_SEEK_END
, NULL
, &error
);
521 g_assert_no_error (error
);
523 g_assert_cmpint (g_seekable_tell (G_SEEKABLE (in
)), ==, 50);
524 byte
= g_buffered_input_stream_read_byte (G_BUFFERED_INPUT_STREAM (in
), NULL
, &error
);
525 g_assert_no_error (error
);
526 g_assert_cmpint (byte
, ==, 'Z');
527 g_assert_cmpint (g_seekable_tell (G_SEEKABLE (in
)), ==, 51);
531 g_object_unref (base
);
538 g_test_init (&argc
, &argv
, NULL
);
539 g_test_bug_base ("http://bugzilla.gnome.org/");
541 g_test_add_func ("/buffered-input-stream/peek", test_peek
);
542 g_test_add_func ("/buffered-input-stream/peek-buffer", test_peek_buffer
);
543 g_test_add_func ("/buffered-input-stream/set-buffer-size", test_set_buffer_size
);
544 g_test_add_func ("/buffered-input-stream/read-byte", test_read_byte
);
545 g_test_add_func ("/buffered-input-stream/read", test_read
);
546 g_test_add_func ("/buffered-input-stream/read-async", test_read_async
);
547 g_test_add_func ("/buffered-input-stream/skip", test_skip
);
548 g_test_add_func ("/buffered-input-stream/skip-async", test_skip_async
);
549 g_test_add_func ("/buffered-input-stream/seek", test_seek
);
550 g_test_add_func ("/filter-input-stream/close", test_close
);