diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-04-12 08:33:41 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-04-12 08:33:41 -0400 |
commit | f9fa92766bace56b3c3924840dbc4a040793a405 (patch) | |
tree | dc37c4fd74382744a445e9f43a8a4c1f6f02ef9e | |
parent | 90d187894d5d96111617fe017c41ee2ad4929b30 (diff) | |
download | gtk+-f9fa92766bace56b3c3924840dbc4a040793a405.tar.gz |
testsuite: Reduce use of g_assert
Stop using g_assert() in the css tests.
-rw-r--r-- | testsuite/css/change/test-css-change.c | 4 | ||||
-rw-r--r-- | testsuite/css/data.c | 2 | ||||
-rw-r--r-- | testsuite/css/nodes/test-css-nodes.c | 2 | ||||
-rw-r--r-- | testsuite/css/style/test-css-style.c | 6 |
4 files changed, 7 insertions, 7 deletions
diff --git a/testsuite/css/change/test-css-change.c b/testsuite/css/change/test-css-change.c index 1d60f0bcff..24650fa4c2 100644 --- a/testsuite/css/change/test-css-change.c +++ b/testsuite/css/change/test-css-change.c @@ -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; diff --git a/testsuite/css/data.c b/testsuite/css/data.c index 978be0e55e..9cb3544de6 100644 --- a/testsuite/css/data.c +++ b/testsuite/css/data.c @@ -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); diff --git a/testsuite/css/nodes/test-css-nodes.c b/testsuite/css/nodes/test-css-nodes.c index a44c4e4508..d8dd50471e 100644 --- a/testsuite/css/nodes/test-css-nodes.c +++ b/testsuite/css/nodes/test-css-nodes.c @@ -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); diff --git a/testsuite/css/style/test-css-style.c b/testsuite/css/style/test-css-style.c index 93367fc336..68e8bfefcf 100644 --- a/testsuite/css/style/test-css-style.c +++ b/testsuite/css/style/test-css-style.c @@ -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); |