diff options
author | hunt <hunt> | 2005-05-17 06:58:05 +0000 |
---|---|---|
committer | hunt <hunt> | 2005-05-17 06:58:05 +0000 |
commit | ca7d122b7b3fb57d6cabdbdc5da9c1ecc60de5d8 (patch) | |
tree | 7272af5f7bfb67412fbdbfa2a9cc7f63e8fa09c3 /runtime/tests/testl64R.c | |
parent | e96dd1fa4e4ba81198e92f7abd340124ba126258 (diff) | |
download | systemtap-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/testl64R.c')
-rw-r--r-- | runtime/tests/testl64R.c | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/runtime/tests/testl64R.c b/runtime/tests/testl64R.c deleted file mode 100644 index b5db7228..00000000 --- a/runtime/tests/testl64R.c +++ /dev/null @@ -1,50 +0,0 @@ -#include "test.h" - -#define LLONG_MAX 9223372036854775807LL -#define LLONG_MIN (-LLONG_MAX - 1LL) - -/* testl64R.c - DO NOT EDIT without updating the expected results in map.test. */ - -/* - key - long - val - INT64 - - Testing range of values -*/ - -int main () -{ - struct map_node_int64 *ptr; - MAP mymap = map_new(4, INT64); - - map_key_long (mymap, 1); - map_set_int64 (mymap, LLONG_MIN); - map_key_long (mymap, 2); - map_set_int64 (mymap, LLONG_MAX); - map_key_long (mymap, 3); - map_set_int64 (mymap, 0); /* will not be saved */ - map_key_long (mymap, 4); - map_set_int64 (mymap, -1); - map_key_long (mymap, 5); - map_set_int64 (mymap, 5); - - - for (ptr = (struct map_node_int64 *)map_start(mymap); ptr; - ptr = (struct map_node_int64 *)map_iter (mymap, (struct map_node *)ptr)) - printf ("mymap[%ld] = %lld\n", key1int(ptr), (long long)ptr->val); - - - /* stress test - create a million entries then print last 4 */ - int i; - for (i = 0; i < 1000000; i++) - { - map_key_long (mymap, i); - map_set_int64 (mymap, i+i); - } - - for (ptr = (struct map_node_int64 *)map_start(mymap); ptr; - ptr = (struct map_node_int64 *)map_iter (mymap, (struct map_node *)ptr)) - printf ("mymap[%ld] = %lld\n", key1int(ptr), (long long)ptr->val); - - return 0; -} |