mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-02 17:26:17 +01:00
tests: Use g_assert_*() rather than g_assert() in GDataInputStream tests
It won’t get compiled out with `G_DISABLE_ASSERT`. Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
parent
3f5997f65d
commit
066fefafa0
@ -80,9 +80,9 @@ test_read_lines (GDataStreamNewlineType newline_type)
|
||||
lines[i] = "some_text";
|
||||
|
||||
base_stream = g_memory_input_stream_new ();
|
||||
g_assert (base_stream != NULL);
|
||||
g_assert_nonnull (base_stream);
|
||||
stream = G_INPUT_STREAM (g_data_input_stream_new (base_stream));
|
||||
g_assert(stream != NULL);
|
||||
g_assert_nonnull (stream);
|
||||
|
||||
/* Byte order testing */
|
||||
g_data_input_stream_set_byte_order (G_DATA_INPUT_STREAM (stream), G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN);
|
||||
@ -210,7 +210,7 @@ test_read_lines_LF_invalid_utf8 (void)
|
||||
g_assert_no_error (error);
|
||||
else
|
||||
{
|
||||
g_assert (error != NULL);
|
||||
g_assert_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE);
|
||||
g_clear_error (&error);
|
||||
g_free (line);
|
||||
break;
|
||||
@ -354,7 +354,7 @@ test_read_upto (void)
|
||||
line++;
|
||||
|
||||
stop_char = g_data_input_stream_read_byte (G_DATA_INPUT_STREAM (stream), NULL, &error);
|
||||
g_assert (memchr (DATA_SEP, stop_char, DATA_SEP_LEN) != NULL);
|
||||
g_assert_nonnull (memchr (DATA_SEP, stop_char, DATA_SEP_LEN));
|
||||
g_assert_no_error (error);
|
||||
}
|
||||
g_free (data);
|
||||
|
Loading…
Reference in New Issue
Block a user