From: Matthias Clasen Date: Sun, 2 Jun 2013 05:41:09 +0000 (-0400) Subject: Improve test coverage for GBufferedOutputStream X-Git-Tag: 2.37.2~55 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2f3f270fccaf92ae423864b5d35e61572137fda3;p=platform%2Fupstream%2Fglib.git Improve test coverage for GBufferedOutputStream --- diff --git a/gio/tests/buffered-output-stream.c b/gio/tests/buffered-output-stream.c index c510a12..0e0d37b 100644 --- a/gio/tests/buffered-output-stream.c +++ b/gio/tests/buffered-output-stream.c @@ -13,6 +13,10 @@ test_write (void) g_assert_cmpint (g_buffered_output_stream_get_buffer_size (G_BUFFERED_OUTPUT_STREAM (out)), ==, 4096); g_assert (!g_buffered_output_stream_get_auto_grow (G_BUFFERED_OUTPUT_STREAM (out))); + g_object_set (out, "auto-grow", TRUE, NULL); + g_assert (g_buffered_output_stream_get_auto_grow (G_BUFFERED_OUTPUT_STREAM (out))); + g_object_set (out, "auto-grow", FALSE, NULL); + g_buffered_output_stream_set_buffer_size (G_BUFFERED_OUTPUT_STREAM (out), 16); g_assert_cmpint (g_buffered_output_stream_get_buffer_size (G_BUFFERED_OUTPUT_STREAM (out)), ==, 16); @@ -55,6 +59,8 @@ test_grow (void) g_assert_cmpint (size, ==, 16); g_assert (grow); + g_assert (g_seekable_can_seek (G_SEEKABLE (out))); + error = NULL; g_assert_cmpint (g_output_stream_write (out, buffer, 10, NULL, &error), ==, 10); g_assert_no_error (error);