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

@@ -60,7 +60,7 @@ test_read_lines (GDataStreamNewlineType newline_type)
char *s = g_strconcat (TEST_STRING, endl[newline_type], NULL);
res = g_data_output_stream_put_string (G_DATA_OUTPUT_STREAM (stream), s, NULL, &error);
g_stpcpy ((char*)(lines + i*strlen(s)), s);
g_assert (error == NULL);
g_assert_no_error (error);
g_assert (res == TRUE);
}
@@ -205,7 +205,7 @@ test_data_array (gpointer buffer, int len,
res = g_data_output_stream_put_uint64 (G_DATA_OUTPUT_STREAM (stream), TEST_DATA_RETYPE_BUFF (data_type, ((guchar*)buffer + pos)), NULL, &error);
break;
}
g_assert (error == NULL);
g_assert_no_error (error);
g_assert_cmpint (res, ==, TRUE);
pos += data_size;
}