Use g_assert_error() and g_assert_no_error()

* tests/data-input-stream.c:
	* tests/data-output-stream.c:
	* tests/live-g-file.c:
	* tests/memory-input-stream.c:
	* tests/memory-output-stream.c: Use g_assert_error() and
	g_assert_no_error()

svn path=/trunk/; revision=7556
This commit is contained in:
Dan Winship
2008-09-27 01:43:43 +00:00
parent 5c53925ed0
commit 29ddd48ff2
6 changed files with 61 additions and 57 deletions

View File

@@ -51,7 +51,7 @@ test_read_chunks (void)
while (pos < len)
{
bytes_read = g_input_stream_read (stream, buffer, chunk_size, NULL, &error);
g_assert (error == NULL);
g_assert_no_error (error);
g_assert_cmpint (bytes_read, ==, MIN (chunk_size, len - pos));
g_assert (strncmp (buffer, result + pos, bytes_read) == 0);
@@ -61,7 +61,7 @@ test_read_chunks (void)
g_assert_cmpint (pos, ==, len);
res = g_seekable_seek (G_SEEKABLE (stream), 0, G_SEEK_SET, NULL, &error);
g_assert_cmpint (res, ==, TRUE);
g_assert (error == NULL);
g_assert_no_error (error);
}
}