mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-04 17:50:18 +00:00
Rework naming of tests to make better use of path matching feature
This commit is contained in:
parent
a4a5d3da0e
commit
105e0be70e
@ -875,10 +875,10 @@ test_type_string (int test_type)
|
|||||||
{
|
{
|
||||||
switch (test_type) {
|
switch (test_type) {
|
||||||
case BEFORE:
|
case BEFORE:
|
||||||
return "before";
|
return "before-realize";
|
||||||
|
|
||||||
case AFTER:
|
case AFTER:
|
||||||
return "after";
|
return "after-realize";
|
||||||
|
|
||||||
case BOTH:
|
case BOTH:
|
||||||
return "both";
|
return "both";
|
||||||
@ -914,7 +914,7 @@ add_test (const char *path,
|
|||||||
|
|
||||||
align = align_string (use_align, row_align);
|
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),
|
test_type_string (test_type),
|
||||||
mixed ? "mixed" : "constant",
|
mixed ? "mixed" : "constant",
|
||||||
path, align);
|
path, align);
|
||||||
@ -1014,42 +1014,46 @@ main (int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Test different alignments in view with single row */
|
/* 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_fixture_single_setup,
|
||||||
scroll_no_align,
|
scroll_no_align,
|
||||||
scroll_fixture_teardown);
|
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_fixture_single_setup,
|
||||||
scroll_align_0_0,
|
scroll_align_0_0,
|
||||||
scroll_fixture_teardown);
|
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_fixture_single_setup,
|
||||||
scroll_align_0_5,
|
scroll_align_0_5,
|
||||||
scroll_fixture_teardown);
|
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_fixture_single_setup,
|
||||||
scroll_align_1_0,
|
scroll_align_1_0,
|
||||||
scroll_fixture_teardown);
|
scroll_fixture_teardown);
|
||||||
|
|
||||||
/* Test scrolling in a very large model; also very slow */
|
/* Test scrolling in a very large model; also very slow */
|
||||||
if (g_test_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",
|
ScrollFixture, "50000",
|
||||||
scroll_fixture_constant_big_setup,
|
scroll_fixture_constant_big_setup,
|
||||||
scroll_no_align,
|
scroll_no_align,
|
||||||
scroll_fixture_teardown);
|
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",
|
ScrollFixture, "99999",
|
||||||
scroll_fixture_constant_big_setup,
|
scroll_fixture_constant_big_setup,
|
||||||
scroll_no_align,
|
scroll_no_align,
|
||||||
scroll_fixture_teardown);
|
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",
|
ScrollFixture, "50000",
|
||||||
scroll_fixture_mixed_big_setup,
|
scroll_fixture_mixed_big_setup,
|
||||||
scroll_no_align,
|
scroll_no_align,
|
||||||
scroll_fixture_teardown);
|
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",
|
ScrollFixture, "99999",
|
||||||
scroll_fixture_mixed_big_setup,
|
scroll_fixture_mixed_big_setup,
|
||||||
scroll_no_align,
|
scroll_no_align,
|
||||||
@ -1057,12 +1061,12 @@ main (int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Test scrolling to a newly created row */
|
/* 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),
|
GINT_TO_POINTER (0),
|
||||||
scroll_fixture_constant_setup,
|
scroll_fixture_constant_setup,
|
||||||
scroll_new_row,
|
scroll_new_row,
|
||||||
scroll_fixture_teardown);
|
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),
|
GINT_TO_POINTER (4),
|
||||||
scroll_fixture_constant_setup,
|
scroll_fixture_constant_setup,
|
||||||
scroll_new_row,
|
scroll_new_row,
|
||||||
@ -1071,27 +1075,29 @@ main (int argc, char **argv)
|
|||||||
* based on my font setting of "Vera Sans 11" and
|
* based on my font setting of "Vera Sans 11" and
|
||||||
* the separators set to 0. (This should be made dynamic; FIXME).
|
* 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),
|
GINT_TO_POINTER (8),
|
||||||
scroll_fixture_constant_setup,
|
scroll_fixture_constant_setup,
|
||||||
scroll_new_row,
|
scroll_new_row,
|
||||||
scroll_fixture_teardown);
|
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),
|
GINT_TO_POINTER (500),
|
||||||
scroll_fixture_constant_setup,
|
scroll_fixture_constant_setup,
|
||||||
scroll_new_row,
|
scroll_new_row,
|
||||||
scroll_fixture_teardown);
|
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),
|
GINT_TO_POINTER (999),
|
||||||
scroll_fixture_constant_setup,
|
scroll_fixture_constant_setup,
|
||||||
scroll_new_row,
|
scroll_new_row,
|
||||||
scroll_fixture_teardown);
|
scroll_fixture_teardown);
|
||||||
|
|
||||||
/* Misc. tests */
|
/* 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_constant_setup, test_bug316689,
|
||||||
scroll_fixture_teardown);
|
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 ();
|
return g_test_run ();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user