summaryrefslogtreecommitdiff
path: root/tests/check_switcher-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/check_switcher-util.c')
-rw-r--r--tests/check_switcher-util.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/tests/check_switcher-util.c b/tests/check_switcher-util.c
index e37f8e4..2fbe0dd 100644
--- a/tests/check_switcher-util.c
+++ b/tests/check_switcher-util.c
@@ -11,6 +11,20 @@ WindowList *list;
CompWindow *a, *b, *c, *d;
+void setup ()
+{
+ list = newWindowList ();
+ tree = newWindowTree ();
+ a = 0x5;
+ b = 0x4;
+ c = 0x4;
+ d = 0x4;
+}
+
+void teardown ()
+{
+}
+
static Bool testCompare (CompWindow *a, CompWindow *b)
{
printf("In testCompare\n");
@@ -42,8 +56,6 @@ END_TEST
START_TEST (test_addToList)
{
- list = newWindowList ();
-
fail_unless (addWindowToList (list, a),
"addWindowToList returned FALSE");
@@ -82,6 +94,7 @@ switcher_util_suite (void)
/* Add windows to tree test cases */
TCase *tc_addToList = tcase_create ("Add To List");
+ tcase_add_checked_fixture (tc_addToList, setup, teardown);
tcase_add_test (tc_addToList, test_addToList);
suite_add_tcase (s, tc_addToList);