summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-11-02 16:07:50 -0400
committerMatthias Clasen <mclasen@redhat.com>2019-11-04 22:27:27 +0000
commitd915e942b8a3f99e297141b70ac7912d8da3e395 (patch)
tree0874d32ce94582d1bb13f95ad82006a4ab123dae
parent91d02f6a9e5e354c6d1fd18ed0395702cd349771 (diff)
downloadpango-d915e942b8a3f99e297141b70ac7912d8da3e395.tar.gz
test-shape: Cosmetics
Remove an unused function, and rename another.
-rw-r--r--tests/test-shape.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/tests/test-shape.c b/tests/test-shape.c
index 8c84ab0a..6c1ae296 100644
--- a/tests/test-shape.c
+++ b/tests/test-shape.c
@@ -53,24 +53,6 @@ append_text (GString *s,
}
}
-static void
-parse_params (const char *str,
- gboolean *insert_hyphen)
-{
- char **strings;
- int i;
-
- strings = g_strsplit (str, ",", -1);
- for (i = 0; strings[i]; i++)
- {
- char **str2 = g_strsplit (strings[i], "=", -1);
- if (strcmp (str2[0], "insert-hyphen") == 0)
- *insert_hyphen = strcmp (str2[1], "true") == 0;
- g_strfreev (str2);
- }
- g_strfreev (strings);
-}
-
static gboolean
affects_itemization (PangoAttribute *attr,
gpointer data)
@@ -154,7 +136,6 @@ test_file (const gchar *filename, GString *string)
PangoAttrList *shape_attrs;
GList *items, *l;
GString *s1, *s2, *s3, *s4, *s5, *s6, *s7;
- gboolean insert_hyphen = FALSE;
char *p, *p1;
const char *sep = "";
@@ -174,7 +155,6 @@ test_file (const gchar *filename, GString *string)
p = strchr (test, '\n');
*p = '\0';
- parse_params (test, &insert_hyphen);
test = p + 1;
if (!pango_parse_markup (test, -1, 0, &attrs, &text, NULL, &error))
@@ -320,7 +300,7 @@ get_expected_filename (const gchar *filename)
}
static void
-test_itemize (gconstpointer d)
+test_shape (gconstpointer d)
{
const gchar *filename = d;
gchar *expected_file;
@@ -390,7 +370,7 @@ main (int argc, char *argv[])
path = g_strdup_printf ("/shape/%s", name);
g_test_add_data_func_full (path, g_test_build_filename (G_TEST_DIST, "shape", name, NULL),
- test_itemize, g_free);
+ test_shape, g_free);
g_free (path);
}
g_dir_close (dir);