Commit f9fa9276 authored by Matthias Clasen's avatar Matthias Clasen
Browse files

testsuite: Reduce use of g_assert

Stop using g_assert() in the css tests.
parent 90d18789
Pipeline #274047 passed with stages
in 11 minutes and 57 seconds
......@@ -77,7 +77,7 @@ load_ui_file (GFile *file, gboolean generate)
ui_file = g_file_get_path (file);
css_file = test_get_other_file (ui_file, ".css");
g_assert (css_file != NULL);
g_assert_nonnull (css_file);
provider = gtk_css_provider_new ();
gtk_css_provider_load_from_path (provider, css_file);
......@@ -90,7 +90,7 @@ load_ui_file (GFile *file, gboolean generate)
if (window == NULL)
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
g_assert (window != NULL);
g_assert_nonnull (window);
output = NULL;
......
......@@ -84,7 +84,7 @@ test_parse (gconstpointer data)
g_assert_nonnull (bytes);
g_assert_no_error (error);
if (test->mimetype == NULL)
g_assert (mimetype == NULL);
g_assert_null (mimetype);
else
g_assert_cmpstr (mimetype, ==, test->mimetype);
......
......@@ -80,7 +80,7 @@ load_ui_file (GFile *file, gboolean generate)
builder = gtk_builder_new_from_file (ui_file);
window = GTK_WIDGET (gtk_builder_get_object (builder, "window1"));
g_assert (window != NULL);
g_assert_nonnull (window);
output = NULL;
g_signal_connect (window, "map", G_CALLBACK (style_context_changed), &output);
......
......@@ -97,7 +97,7 @@ load_ui_file (GFile *file, gboolean generate)
ui_file = g_file_get_path (file);
css_file = test_get_other_file (ui_file, ".css");
g_assert (css_file != NULL);
g_assert_nonnull (css_file);
provider = gtk_css_provider_new ();
gtk_css_provider_load_from_path (provider, css_file);
......@@ -108,7 +108,7 @@ load_ui_file (GFile *file, gboolean generate)
builder = gtk_builder_new_from_file (ui_file);
window = GTK_WIDGET (gtk_builder_get_object (builder, "window1"));
g_assert (window != NULL);
g_assert_nonnull (window);
output = NULL;
g_signal_connect (window, "map", G_CALLBACK (style_context_changed), &output);
......@@ -125,7 +125,7 @@ load_ui_file (GFile *file, gboolean generate)
}
reference_file = test_get_other_file (ui_file, ".nodes");
g_assert (reference_file != NULL);
g_assert_nonnull (reference_file);
diff = diff_with_file (reference_file, output, -1, &error);
g_assert_no_error (error);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment