diff options
author | hunt <hunt> | 2005-05-31 19:56:57 +0000 |
---|---|---|
committer | hunt <hunt> | 2005-05-31 19:56:57 +0000 |
commit | a75f0fb713418d4704d0ce9ea892ab939ce9f00f (patch) | |
tree | 2c1792f127cc4aab3d70cf95a0337f89f8438e1d /runtime/tests/maps/is.c | |
parent | 2e4153f6f3908b6746e8e50194d0a6e8e2f35111 (diff) | |
download | systemtap-steved-a75f0fb713418d4704d0ce9ea892ab939ce9f00f.tar.gz systemtap-steved-a75f0fb713418d4704d0ce9ea892ab939ce9f00f.tar.xz systemtap-steved-a75f0fb713418d4704d0ce9ea892ab939ce9f00f.zip |
added formatting to _stp_map_print() and updated tests.
Diffstat (limited to 'runtime/tests/maps/is.c')
-rw-r--r-- | runtime/tests/maps/is.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/runtime/tests/maps/is.c b/runtime/tests/maps/is.c index bfb21753..6b2cbb0e 100644 --- a/runtime/tests/maps/is.c +++ b/runtime/tests/maps/is.c @@ -18,13 +18,13 @@ int main () _stp_map_key_int64 (map, 1); _stp_map_set_str (map, "one"); printf ("map[%lld]=%s\n", key1int(map->key), _stp_map_get_str(map)); - _stp_map_print(map,"map"); + _stp_map_print(map,"map[%1d] = %s"); /* map[3] = "three" */ /* try it with macros this time */ _stp_map_key (map, 3); _stp_map_set (map, "three"); - _stp_map_print (map, "map"); + _stp_map_print(map,"map[%1d] = %s"); /* now try to confuse things */ @@ -36,7 +36,7 @@ int main () _stp_map_key_del (map); _stp_map_set_str (map,"1000000"); - _stp_map_print (map, "map"); + _stp_map_print(map,"map[%1d] = %s"); /* create and delete a key */ _stp_map_key_int64 (map, 1024); @@ -44,14 +44,14 @@ int main () _stp_map_key_int64 (map, 1024); _stp_map_key_del (map); - _stp_map_print (map, "map"); + _stp_map_print(map,"map[%1d] = %s"); /* create and delete a key again*/ _stp_map_key_int64 (map, 1024); _stp_map_set_str (map, "2048"); _stp_map_key_del (map); - _stp_map_print (map, "map"); + _stp_map_print(map,"map[%1d] = %s"); /* check that unset values are 0 */ _stp_map_key_int64 (map, 5); @@ -59,11 +59,11 @@ int main () /* map[5] = "five" */ _stp_map_set (map, "five"); - _stp_map_print (map, "map"); + _stp_map_print(map,"map[%1d] = %s"); /* test empty string */ _stp_map_set (map, ""); - _stp_map_print (map, "map"); + _stp_map_print(map,"map[%1d] = %s"); /* add 4 new entries, pushing the others out */ @@ -76,7 +76,7 @@ int main () _stp_map_set_str (map, buf); } - _stp_map_print (map, "map"); + _stp_map_print(map,"map[%1d] = %s"); /* 5, 382, 526, and 903 all hash to the same value (23) */ /* use them to test the hash chain */ @@ -85,24 +85,24 @@ int main () _stp_map_key_int64 (map, 526); _stp_map_set_str (map, "1526"); _stp_map_key_int64 (map, 903); _stp_map_set_str (map, "1903"); - _stp_map_print (map, "map"); + _stp_map_print(map,"map[%1d] = %s"); /* now delete all 4 nodes, one by one */ _stp_map_key_int64 (map, 382); _stp_map_key_del (map); - _stp_map_print (map, "map"); + _stp_map_print(map,"map[%1d] = %s"); _stp_map_key_int64 (map, 5); _stp_map_key_del (map); - _stp_map_print (map, "map"); + _stp_map_print(map,"map[%1d] = %s"); _stp_map_key_int64 (map, 903); _stp_map_key_del (map); - _stp_map_print (map, "map"); + _stp_map_print(map,"map[%1d] = %s"); _stp_map_key_int64 (map, 526); _stp_map_key_del (map); - _stp_map_print (map, "map"); + _stp_map_print(map,"map[%1d] = %s"); _stp_map_del (map); return 0; |