summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2016-10-17 17:41:03 +0200
committerBenjamin Otte <otte@redhat.com>2016-10-17 17:41:03 +0200
commit4322b69528203d0f3c9e725af8d72597c101ef99 (patch)
tree52fd08cc8d6310774489d45c6c5afe2e9566f8ee /testsuite
parentdbeeaf7de681d3471b73f5722dd94451d66af642 (diff)
downloadgtk+-4322b69528203d0f3c9e725af8d72597c101ef99.tar.gz
cssprovider: Return void, not TRUE
Parsing a css file always succeeds as CSS can recover from parsing errors.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/css/api.c2
-rw-r--r--testsuite/css/parser/test-css-parser.c2
-rw-r--r--testsuite/css/style/test-css-style.c3
-rw-r--r--testsuite/gtk/stylecontext.c4
-rw-r--r--testsuite/reftests/gtk-reftest.c3
5 files changed, 5 insertions, 9 deletions
diff --git a/testsuite/css/api.c b/testsuite/css/api.c
index 7f0b660ec5..c44caa2e4e 100644
--- a/testsuite/css/api.c
+++ b/testsuite/css/api.c
@@ -28,7 +28,7 @@ gtk_css_provider_load_data_not_null_terminated (void)
p = gtk_css_provider_new();
- gtk_css_provider_load_from_data(p, data, sizeof (data), NULL);
+ gtk_css_provider_load_from_data(p, data, sizeof (data));
g_object_unref (p);
}
diff --git a/testsuite/css/parser/test-css-parser.c b/testsuite/css/parser/test-css-parser.c
index a5bb173075..ff6340986c 100644
--- a/testsuite/css/parser/test-css-parser.c
+++ b/testsuite/css/parser/test-css-parser.c
@@ -174,7 +174,7 @@ parse_css_file (GFile *file, gboolean generate)
"parsing-error",
G_CALLBACK (parsing_error_cb),
errors);
- gtk_css_provider_load_from_path (provider, css_file, NULL);
+ gtk_css_provider_load_from_path (provider, css_file);
css = gtk_css_provider_to_string (provider);
diff --git a/testsuite/css/style/test-css-style.c b/testsuite/css/style/test-css-style.c
index 53fac070e5..130132af26 100644
--- a/testsuite/css/style/test-css-style.c
+++ b/testsuite/css/style/test-css-style.c
@@ -111,8 +111,7 @@ load_ui_file (GFile *file, gboolean generate)
g_assert (css_file != NULL);
provider = gtk_css_provider_new ();
- gtk_css_provider_load_from_path (provider, css_file, &error);
- g_assert_no_error (error);
+ gtk_css_provider_load_from_path (provider, css_file);
gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_FORCE);
diff --git a/testsuite/gtk/stylecontext.c b/testsuite/gtk/stylecontext.c
index 91d6b8d935..a32f1047cd 100644
--- a/testsuite/gtk/stylecontext.c
+++ b/testsuite/gtk/stylecontext.c
@@ -11,7 +11,6 @@ static void
test_parse_selectors (void)
{
GtkCssProvider *provider;
- gboolean res;
gint i;
const gchar *valid[] = {
"* {}",
@@ -60,8 +59,7 @@ test_parse_selectors (void)
for (i = 0; valid[i]; i++)
{
provider = gtk_css_provider_new ();
- res = gtk_css_provider_load_from_data (provider, valid[i], -1);
- g_assert (res);
+ gtk_css_provider_load_from_data (provider, valid[i], -1);
g_object_unref (provider);
}
diff --git a/testsuite/reftests/gtk-reftest.c b/testsuite/reftests/gtk-reftest.c
index 4930af8184..d8d82d695d 100644
--- a/testsuite/reftests/gtk-reftest.c
+++ b/testsuite/reftests/gtk-reftest.c
@@ -219,8 +219,7 @@ add_extra_css (const char *testname,
provider = GTK_STYLE_PROVIDER (gtk_css_provider_new ());
gtk_css_provider_load_from_path (GTK_CSS_PROVIDER (provider),
- css_file,
- NULL);
+ css_file);
gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
provider,
GTK_STYLE_PROVIDER_PRIORITY_FORCE);