diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-07-07 09:46:26 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-07-13 22:02:33 -0400 |
commit | d25557a5ef346e3b1a4dead8f71f19706f151335 (patch) | |
tree | 3844a860548c70b1b27fecdcdc80f7504e26b972 /testsuite/gtk | |
parent | da3ca6604bb4b25bd0812f9625b73f1a7af1a9d4 (diff) | |
download | gtk+-d25557a5ef346e3b1a4dead8f71f19706f151335.tar.gz |
Clean up the GtkComposeTable api
Keep the list of composetables private to GtkIMContextSimple,
and just have an api that creates new GtkComposeTables, either
from a file or from data.
Update tests to use the new api.
Diffstat (limited to 'testsuite/gtk')
-rw-r--r-- | testsuite/gtk/composetable.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/testsuite/gtk/composetable.c b/testsuite/gtk/composetable.c index ea17e7a6a0..4348dfbea0 100644 --- a/testsuite/gtk/composetable.c +++ b/testsuite/gtk/composetable.c @@ -77,12 +77,10 @@ gtk_compose_table_print (GtkComposeTable *table) static void generate_output (const char *file) { - GSList *tables = NULL; GtkComposeTable *table; char *output; - tables = gtk_compose_table_list_add_file (tables, file); - table = tables->data; + table = gtk_compose_table_new_with_file (file); output = gtk_compose_table_print (table); g_print ("%s", output); @@ -92,7 +90,6 @@ static void compose_table_compare (gconstpointer data) { const char *basename = data; - GSList *tables = NULL; GtkComposeTable *table; char *file; char *expected; @@ -103,11 +100,7 @@ compose_table_compare (gconstpointer data) file = g_build_filename (g_test_get_dir (G_TEST_DIST), "compose", basename, NULL); expected = g_strconcat (file, ".expected", NULL); - tables = gtk_compose_table_list_add_file (tables, file); - - g_assert_true (g_slist_length (tables) == 1); - - table = tables->data; + table = gtk_compose_table_new_with_file (file); output = gtk_compose_table_print (table); diff = diff_with_file (expected, output, -1, &error); @@ -128,7 +121,6 @@ compose_table_compare (gconstpointer data) static void compose_table_match (void) { - GSList *tables = NULL; GtkComposeTable *table; char *file; guint16 buffer[8] = { 0, }; @@ -139,11 +131,7 @@ compose_table_match (void) file = g_build_filename (g_test_get_dir (G_TEST_DIST), "compose", "match", NULL); - tables = gtk_compose_table_list_add_file (tables, file); - - g_assert_true (g_slist_length (tables) == 1); - - table = tables->data; + table = gtk_compose_table_new_with_file (file); buffer[0] = GDK_KEY_Multi_key; buffer[1] = 0; |