]> Pileus Git - ~andy/gtk/commitdiff
Rework naming of tests to make better use of path matching feature
authorKristian Rietveld <kris@gtk.org>
Sun, 23 Aug 2009 19:13:38 +0000 (21:13 +0200)
committerKristian Rietveld <kris@gtk.org>
Sun, 23 Aug 2009 20:06:16 +0000 (22:06 +0200)
gtk/tests/treeview-scrolling.c

index a36c8b8c8d629525d0906456f1bbd3d4effd81dc..e69c4c15ef701be52bcde3268d37caad87eaff29 100644 (file)
@@ -875,10 +875,10 @@ test_type_string (int test_type)
 {
        switch (test_type) {
                case BEFORE:
-                       return "before";
+                       return "before-realize";
 
                case AFTER:
-                       return "after";
+                       return "after-realize";
 
                case BOTH:
                        return "both";
@@ -914,7 +914,7 @@ add_test (const char *path,
 
        align = align_string (use_align, row_align);
 
-       test_path = g_strdup_printf ("/TreeView/scrolling/%s-%s-path-%s-%s",
+       test_path = g_strdup_printf ("/TreeView/scrolling/%s/%s-height/path-%s-%s",
                                     test_type_string (test_type),
                                     mixed ? "mixed" : "constant",
                                     path, align);
@@ -1014,42 +1014,46 @@ main (int argc, char **argv)
        }
 
        /* Test different alignments in view with single row */
-       g_test_add ("/TreeView/scrolling/single-no-align", ScrollFixture, "0",
+       g_test_add ("/TreeView/scrolling/single-row/no-align",
+                   ScrollFixture, "0",
                    scroll_fixture_single_setup,
                    scroll_no_align,
                    scroll_fixture_teardown);
-       g_test_add ("/TreeView/scrolling/single-align-0.0", ScrollFixture, "0",
+       g_test_add ("/TreeView/scrolling/single-row/align-0.0",
+                   ScrollFixture, "0",
                    scroll_fixture_single_setup,
                    scroll_align_0_0,
                    scroll_fixture_teardown);
-       g_test_add ("/TreeView/scrolling/single-align-0.5", ScrollFixture, "0",
+       g_test_add ("/TreeView/scrolling/single-row/align-0.5",
+                   ScrollFixture, "0",
                    scroll_fixture_single_setup,
                    scroll_align_0_5,
                    scroll_fixture_teardown);
-       g_test_add ("/TreeView/scrolling/single-align-1.0", ScrollFixture, "0",
+       g_test_add ("/TreeView/scrolling/single-row/align-1.0",
+                   ScrollFixture, "0",
                    scroll_fixture_single_setup,
                    scroll_align_1_0,
                    scroll_fixture_teardown);
 
        /* Test scrolling in a very large model; also very slow */
        if (g_test_slow ()) {
-               g_test_add ("/TreeView/scrolling/constant-big-middle-no-align",
+               g_test_add ("/TreeView/scrolling/large-model/constant-height/middle-no-align",
                            ScrollFixture, "50000",
                            scroll_fixture_constant_big_setup,
                            scroll_no_align,
                            scroll_fixture_teardown);
-               g_test_add ("/TreeView/scrolling/constant-big-end-no-align",
+               g_test_add ("/TreeView/scrolling/large-model/constant-height/end-no-align",
                            ScrollFixture, "99999",
                            scroll_fixture_constant_big_setup,
                            scroll_no_align,
                            scroll_fixture_teardown);
 
-               g_test_add ("/TreeView/scrolling/mixed-big-middle-no-align",
+               g_test_add ("/TreeView/scrolling/large-model/mixed-height/middle-no-align",
                            ScrollFixture, "50000",
                            scroll_fixture_mixed_big_setup,
                            scroll_no_align,
                            scroll_fixture_teardown);
-               g_test_add ("/TreeView/scrolling/mixed-big-end-no-align",
+               g_test_add ("/TreeView/scrolling/large-model/mixed-height/end-no-align",
                            ScrollFixture, "99999",
                            scroll_fixture_mixed_big_setup,
                            scroll_no_align,
@@ -1057,12 +1061,12 @@ main (int argc, char **argv)
        }
 
        /* Test scrolling to a newly created row */
-       g_test_add ("/TreeView/scrolling/new-row-path-0", ScrollFixture,
+       g_test_add ("/TreeView/scrolling/new-row/path-0", ScrollFixture,
                    GINT_TO_POINTER (0),
                    scroll_fixture_constant_setup,
                    scroll_new_row,
                    scroll_fixture_teardown);
-       g_test_add ("/TreeView/scrolling/new-row-path-4", ScrollFixture,
+       g_test_add ("/TreeView/scrolling/new-row/path-4", ScrollFixture,
                    GINT_TO_POINTER (4),
                    scroll_fixture_constant_setup,
                    scroll_new_row,
@@ -1071,27 +1075,29 @@ main (int argc, char **argv)
         * based on my font setting of "Vera Sans 11" and
         * the separators set to 0.  (This should be made dynamic; FIXME).
         */
-       g_test_add ("/TreeView/scrolling/new-row-path-8", ScrollFixture,
+       g_test_add ("/TreeView/scrolling/new-row/path-8", ScrollFixture,
                    GINT_TO_POINTER (8),
                    scroll_fixture_constant_setup,
                    scroll_new_row,
                    scroll_fixture_teardown);
-       g_test_add ("/TreeView/scrolling/new-row-path-500", ScrollFixture,
+       g_test_add ("/TreeView/scrolling/new-row/path-500", ScrollFixture,
                    GINT_TO_POINTER (500),
                    scroll_fixture_constant_setup,
                    scroll_new_row,
                    scroll_fixture_teardown);
-       g_test_add ("/TreeView/scrolling/new-row-path-999", ScrollFixture,
+       g_test_add ("/TreeView/scrolling/new-row/path-999", ScrollFixture,
                    GINT_TO_POINTER (999),
                    scroll_fixture_constant_setup,
                    scroll_new_row,
                    scroll_fixture_teardown);
 
        /* Misc. tests */
-       g_test_add ("/TreeView/scrolling/bug-316689", ScrollFixture, NULL,
+       g_test_add ("/TreeView/scrolling/specific/bug-316689",
+                       ScrollFixture, NULL,
                    scroll_fixture_constant_setup, test_bug316689,
                    scroll_fixture_teardown);
-       g_test_add_func ("/TreeView/scrolling/bug-359231", test_bug359231);
+       g_test_add_func ("/TreeView/scrolling/specific/bug-359231",
+                       test_bug359231);
 
        return g_test_run ();
 }