summaryrefslogtreecommitdiffstats
path: root/runtime/tests/testlist.c
diff options
context:
space:
mode:
authorhunt <hunt>2005-05-17 06:58:05 +0000
committerhunt <hunt>2005-05-17 06:58:05 +0000
commitca7d122b7b3fb57d6cabdbdc5da9c1ecc60de5d8 (patch)
tree7272af5f7bfb67412fbdbfa2a9cc7f63e8fa09c3 /runtime/tests/testlist.c
parente96dd1fa4e4ba81198e92f7abd340124ba126258 (diff)
downloadsystemtap-steved-ca7d122b7b3fb57d6cabdbdc5da9c1ecc60de5d8.tar.gz
systemtap-steved-ca7d122b7b3fb57d6cabdbdc5da9c1ecc60de5d8.tar.xz
systemtap-steved-ca7d122b7b3fb57d6cabdbdc5da9c1ecc60de5d8.zip
Restructuring of tests. New tests for new maps.
Diffstat (limited to 'runtime/tests/testlist.c')
-rw-r--r--runtime/tests/testlist.c63
1 files changed, 0 insertions, 63 deletions
diff --git a/runtime/tests/testlist.c b/runtime/tests/testlist.c
deleted file mode 100644
index 7086ff9b..00000000
--- a/runtime/tests/testlist.c
+++ /dev/null
@@ -1,63 +0,0 @@
-#include "test.h"
-
-/* testliat.c - DO NOT EDIT without updating the expected results in map.test. */
-
-/*
- Tests maps acting as Lists
-*/
-
-
-
-static void
-map_dump (MAP map)
-{
- struct map_node_str *ptr;
- foreach (map, ptr)
- printf ("map[%ld] = %s\n", key1int(ptr), ptr->str);
- printf ("\n");
-}
-
-
-int main ()
-{
- char buf[32];
- int i;
- MAP map = _stp_list_new(10, STRING);
-
- for (i = 0; i < 10; i++)
- {
- sprintf (buf, "Item%d", i);
- _stp_list_add_str (map, buf);
- }
-
- map_dump(map);
- printf ("size is %d\n", _stp_list_size(map));
-
- /* we set a limit of 10 elements so these push */
- /* the first entries out of the list */
- for (i = 50; i < 55; i++)
- {
- sprintf (buf, "Item%d", i);
- _stp_list_add_str (map, buf);
- }
-
- map_dump(map);
-
- for (i = 0; i < 10; i++)
- {
- sprintf (buf, "Item%d", i);
- _stp_list_add_str (map, buf);
- }
-
- map_dump(map);
- _stp_list_clear (map);
- map_dump(map);
- for (i = 50; i < 55; i++)
- {
- sprintf (buf, "Item%d", i);
- _stp_list_add_str (map, buf);
- }
- map_dump(map);
- _stp_map_del (map);
- return 0;
-}