tests: Reset the unnamed counter before a test run

This guarantees that objects are named the same all the time.
This commit is contained in:
Benjamin Otte 2011-06-22 04:14:49 +02:00 committed by Matthias Clasen
parent 521f9e2f15
commit 4c0814a176

View File

@ -100,7 +100,13 @@ done:
return diff;
}
static int unnamed_object_count = 0;
static int unnamed_object_count;
static void
setup_test (void)
{
unnamed_object_count = 0;
}
static const char *
get_name (AtkObject *accessible)
@ -727,7 +733,7 @@ add_test_for_file (GFile *file)
g_test_add_vtable (g_file_get_path (file),
0,
g_object_ref (file),
NULL,
(GTestFixtureFunc) setup_test,
(GTestFixtureFunc) test_ui_file,
(GTestFixtureFunc) g_object_unref);
}