[gtk+/a11y] tests: Reset the unnamed counter before a test run
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/a11y] tests: Reset the unnamed counter before a test run
- Date: Wed, 22 Jun 2011 02:31:57 +0000 (UTC)
commit 04453bd4b9a9c129718caa433c0c97c60f050217
Author: Benjamin Otte <otte redhat com>
Date: Wed Jun 22 04:14:49 2011 +0200
tests: Reset the unnamed counter before a test run
This guarantees that objects are named the same all the time.
tests/a11y/accessibility-dump.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/tests/a11y/accessibility-dump.c b/tests/a11y/accessibility-dump.c
index d91df61..3f21523 100644
--- a/tests/a11y/accessibility-dump.c
+++ b/tests/a11y/accessibility-dump.c
@@ -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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]