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/ii.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/ii.c')
-rw-r--r-- | runtime/tests/maps/ii.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/runtime/tests/maps/ii.c b/runtime/tests/maps/ii.c index 64aa05ac..afee14d4 100644 --- a/runtime/tests/maps/ii.c +++ b/runtime/tests/maps/ii.c @@ -18,13 +18,13 @@ int main () _stp_map_key_int64 (map, 1); _stp_map_set_int64 (map, 2); printf ("map[%lld]=%lld\n", key1int(map->key), _stp_map_get_int64(map)); - _stp_map_print(map,"map"); + _stp_map_print(map,"map[%1d] = %d"); /* map[3] = 4 */ /* try it with macros this time */ _stp_map_key (map, 3); _stp_map_set (map, 4); - _stp_map_print (map, "map"); + _stp_map_print(map,"map[%1d] = %d"); /* now try to confuse things */ /* These won't do anything useful, but shouldn't crash */ @@ -35,7 +35,7 @@ int main () _stp_map_key_del (map); _stp_map_set_int64 (map,1000000); - _stp_map_print (map, "map"); + _stp_map_print(map,"map[%1d] = %d"); /* create and delete a key */ _stp_map_key_int64 (map, 1024); @@ -43,14 +43,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] = %d"); /* create and delete a key again*/ _stp_map_key_int64 (map, 1024); _stp_map_set_int64 (map, 2048); _stp_map_key_del (map); - _stp_map_print (map, "map"); + _stp_map_print(map,"map[%1d] = %d"); /* check that unset values are 0 */ _stp_map_key_int64 (map, 5); @@ -58,7 +58,7 @@ int main () /* map[5] = 6 */ _stp_map_set (map, 6); - _stp_map_print (map, "map"); + _stp_map_print(map,"map[%1d] = %d"); /* add 4 new entries, pushing the others out */ int i; @@ -68,7 +68,7 @@ int main () _stp_map_set_int64 (map, 100 + i); } - _stp_map_print (map, "map"); + _stp_map_print(map,"map[%1d] = %d"); /* 5, 382, 526, and 903 all hash to the same value (23) */ /* use them to test the hash chain */ @@ -77,24 +77,24 @@ int main () _stp_map_key_int64 (map, 526); _stp_map_set_int64 (map, 1526); _stp_map_key_int64 (map, 903); _stp_map_set_int64 (map, 1903); - _stp_map_print (map, "map"); + _stp_map_print(map,"map[%1d] = %d"); /* 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] = %d"); _stp_map_key_int64 (map, 5); _stp_map_key_del (map); - _stp_map_print (map, "map"); + _stp_map_print(map,"map[%1d] = %d"); _stp_map_key_int64 (map, 903); _stp_map_key_del (map); - _stp_map_print (map, "map"); + _stp_map_print(map,"map[%1d] = %d"); _stp_map_key_int64 (map, 526); _stp_map_key_del (map); - _stp_map_print (map, "map"); + _stp_map_print(map,"map[%1d] = %d"); _stp_map_del (map); return 0; |