summaryrefslogtreecommitdiffstats
path: root/test-llist.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2007-10-01 20:16:28 +0000
committerLennart Poettering <lennart@poettering.net>2007-10-01 20:16:28 +0000
commit7d83e5c7816b5e343695a75ba58b32dbe1be969a (patch)
treebfd1dfc9b7c8f4a2aaf66c1b30e78355dee8c88a /test-llist.c
parent762196328ab7e60f1d2908fd5a337d2ca99726dd (diff)
move all sources down to a seperate src/ tree
git-svn-id: file:///home/lennart/svn/public/libsydney/trunk@34 9ba3c220-e4d3-45a2-8aa3-73fcc9aff6ce
Diffstat (limited to 'test-llist.c')
-rw-r--r--test-llist.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/test-llist.c b/test-llist.c
deleted file mode 100644
index 2059ef8..0000000
--- a/test-llist.c
+++ /dev/null
@@ -1,34 +0,0 @@
-#include "llist.h"
-
-struct foobar {
- SA_LLIST_ITEM(struct foobar, list);
-};
-
-
-static SA_LLIST_HEAD(struct foobar, list);
-
-int main(int argc, char *argv[]) {
- struct foobar a, b, c;
-
- SA_LLIST_HEAD_INIT(struct foobar, list);
-
- SA_LLIST_ITEM_INIT(struct foobar, list, &a);
- SA_LLIST_ITEM_INIT(struct foobar, list, &b);
- SA_LLIST_ITEM_INIT(struct foobar, list, &c);
-
- SA_LLIST_PREPEND(struct foobar, list, list, &a);
- SA_LLIST_INSERT_BEFORE(struct foobar, list, list, &a, &b);
- SA_LLIST_INSERT_AFTER(struct foobar, list, list, &a, &c);
-
- sa_assert(list == &b);
- sa_assert(list->list_next == &a);
- sa_assert(list->list_next->list_next == &c);
-
- SA_LLIST_REMOVE(struct foobar, list, list, &a);
- SA_LLIST_REMOVE(struct foobar, list, list, &b);
- SA_LLIST_REMOVE(struct foobar, list, list, &c);
-
- sa_assert(!list);
-
- return 0;
-}