diff options
author | hunt <hunt> | 2005-11-09 06:55:42 +0000 |
---|---|---|
committer | hunt <hunt> | 2005-11-09 06:55:42 +0000 |
commit | df27664107205cccec6eacb890d6800db7ee95cc (patch) | |
tree | f297ed4ad7011eeca4da1f58474d27cb151484f2 /runtime/tests/maps/issii.c | |
parent | fa3f3d4d2e3d173750685ff89a0f53f8c8a2310c (diff) | |
download | systemtap-steved-df27664107205cccec6eacb890d6800db7ee95cc.tar.gz systemtap-steved-df27664107205cccec6eacb890d6800db7ee95cc.tar.xz systemtap-steved-df27664107205cccec6eacb890d6800db7ee95cc.zip |
2005-11-08 Martin Hunt <hunt@redhat.com>
* maps/map.test: Remove old map API tests.
* maps/ii2.c: Renamed ii.c.
* maps/iiss2.c: Renamed iiss.c.
* maps/is2.c: Renamed is.c.
* maps/issii2.c: Renamed issii.c.
* maps/isx2.c: Renamed isx.c.
* maps/map_format2.c: Renamed map_format.c.
* maps/si2.c: Renamed si.c.
* maps/keys.c: Deleted
* maps/test_list_int64.c: Deleted.
* maps/test_list_string.c: Deleted.
* maps/sort.c: Update to use new map API.
Diffstat (limited to 'runtime/tests/maps/issii.c')
-rw-r--r-- | runtime/tests/maps/issii.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/runtime/tests/maps/issii.c b/runtime/tests/maps/issii.c index 4be3b776..4861428a 100644 --- a/runtime/tests/maps/issii.c +++ b/runtime/tests/maps/issii.c @@ -1,27 +1,23 @@ #include "runtime.h" /* test of maps with keys of int64,string.string.int64 and value of int64 */ -#define NEED_INT64_VALS +#define VALUE_TYPE INT64 #define KEY1_TYPE INT64 #define KEY2_TYPE STRING #define KEY3_TYPE STRING #define KEY4_TYPE INT64 -#include "map-keys.c" +#include "map-gen.c" #include "map.c" int main () { struct map_node *ptr; - MAP map = _stp_map_new_int64_str_str_int64(4, INT64); - - _stp_map_key_int64_str_str_int64(map, 1, "Boston", "MA", 1970); - _stp_map_set_int64 (map, 5224303 ); - _stp_map_key_int64_str_str_int64(map, 2, "Boston", "MA", 2000); - _stp_map_set_int64 (map, 6057826 ); - _stp_map_key_int64_str_str_int64(map, 3, "Chicago", "IL", 2000); - _stp_map_set_int64 (map, 8272768 ); + MAP map = _stp_map_new_issii(4); + _stp_map_set_issii (map, 1, "Boston", "MA", 1970, 5224303 ); + _stp_map_set_issii (map, 2, "Boston", "MA", 2000, 6057826 ); + _stp_map_set_issii (map, 3, "Chicago", "IL", 2000, 8272768 ); foreach (map, ptr) printf ("map[%lld, %s, %s, %lld] = %lld\n", |