summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher James Halse Rogers <chris@Burninator.(none)>2007-06-25 17:03:58 +1000
committerChristopher James Halse Rogers <chris@Burninator.(none)>2007-06-25 17:03:58 +1000
commit6cb706ecf1f82c833ecaf880741d2f8640edf963 (patch)
tree7c7f7e6164caef35a749059fcd0aab0578911cce
parentfdc717ce97c4dc9bb5a54d5a21618b8e7dffe7fc (diff)
downloadradial-switcher-6cb706ecf1f82c833ecaf880741d2f8640edf963.tar.gz
radial-switcher-6cb706ecf1f82c833ecaf880741d2f8640edf963.tar.bz2
Add test for adding many windows to a WindowList
-rw-r--r--tests/check_switcher-util.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/check_switcher-util.c b/tests/check_switcher-util.c
index e3fe59c..ee73385 100644
--- a/tests/check_switcher-util.c
+++ b/tests/check_switcher-util.c
@@ -29,7 +29,6 @@ void teardown ()
static Bool testCompare (CompWindow *a, CompWindow *b)
{
- printf("In testCompare\n");
return a == b;
}
@@ -68,6 +67,24 @@ START_TEST (test_addToList)
}
END_TEST
+START_TEST (test_addMultipleToList)
+{
+ CompWindow *array[500];
+ int i;
+
+ for (i = 0; i < 500; ++i)
+ array[i] = (CompWindow *)i;
+
+ for (i = 0; i < 500; ++i)
+ fail_unless (addWindowToList (list, array[i]),
+ "addWindowToList returned FALSE");
+
+ for (i = 0; i < 500; ++i)
+ fail_unless (list->w[i] == (CompWindow *)i,
+ "Incorrect window inserted in list");
+}
+END_TEST
+
/*
START_TEST (test_addToTree)
{