summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher James Halse Rogers <chris@Burninator.(none)>2007-06-25 16:50:59 +1000
committerChristopher James Halse Rogers <chris@Burninator.(none)>2007-06-25 16:50:59 +1000
commit148ce781baa3798014e18bf05c65ed501a893ab3 (patch)
treef5d07a8376508df78b8f81d3f685c4bf487d2e27
parent58404abe843ef07ebfe251aafa25ed18c51601cc (diff)
downloadradial-switcher-148ce781baa3798014e18bf05c65ed501a893ab3.tar.gz
radial-switcher-148ce781baa3798014e18bf05c65ed501a893ab3.tar.bz2
Fix tests, now that I know how setup/teardown works
-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);