From df27664107205cccec6eacb890d6800db7ee95cc Mon Sep 17 00:00:00 2001 From: hunt Date: Wed, 9 Nov 2005 06:55:42 +0000 Subject: 2005-11-08 Martin Hunt * 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. --- runtime/tests/maps/issii.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'runtime/tests/maps/issii.c') 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", -- cgit