summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhunt <hunt>2005-09-14 21:12:37 +0000
committerhunt <hunt>2005-09-14 21:12:37 +0000
commit0235ca6a116e0f20607e4e8d5bd0547750469d16 (patch)
treef3bff1a96f64381a75d6b47dec98577b2247e97d
parent66bb48fd1b2f9c83db087640f18a47403ca848b4 (diff)
downloadsystemtap-steved-0235ca6a116e0f20607e4e8d5bd0547750469d16.tar.gz
systemtap-steved-0235ca6a116e0f20607e4e8d5bd0547750469d16.tar.xz
systemtap-steved-0235ca6a116e0f20607e4e8d5bd0547750469d16.zip
2005-09-14 Martin Hunt <hunt@redhat.com>
* maps/ii.c (main): Add test for _stp_map_clear(). * maps/map.test: Update results.
-rw-r--r--runtime/tests/ChangeLog5
-rw-r--r--runtime/tests/maps/ii.c13
-rw-r--r--runtime/tests/maps/map.test8
3 files changed, 26 insertions, 0 deletions
diff --git a/runtime/tests/ChangeLog b/runtime/tests/ChangeLog
index 58ccd13a..d490b4ea 100644
--- a/runtime/tests/ChangeLog
+++ b/runtime/tests/ChangeLog
@@ -1,3 +1,8 @@
+2005-09-14 Martin Hunt <hunt@redhat.com>
+
+ * maps/ii.c (main): Add test for _stp_map_clear().
+ * maps/map.test: Update results.
+
2005-09-12 Martin Hunt <hunt@redhat.com>
* math/div64.c (main): Set the expected result for LLONG_MIN/-1 to
diff --git a/runtime/tests/maps/ii.c b/runtime/tests/maps/ii.c
index e44530cf..2eb830cc 100644
--- a/runtime/tests/maps/ii.c
+++ b/runtime/tests/maps/ii.c
@@ -93,6 +93,19 @@ int main ()
_stp_map_print(map,"map[%1d] = %d");
+ /* finally check clearing the map */
+ for (i = 33; i < 77; i+=11)
+ {
+ _stp_map_key_int64 (map, i);
+ _stp_map_set_int64 (map, 100*i+i);
+ }
+ _stp_map_print(map,"map[%1d] = %d");
+
+ _stp_map_clear(map);
+ _stp_map_print(map,"map[%1d] = %d");
+ _stp_map_key_int64 (map, 1970);
+ _stp_map_set_int64 (map, 1799);
+ _stp_map_print(map,"map[%1d] = %d");
_stp_map_del (map);
return 0;
}
diff --git a/runtime/tests/maps/map.test b/runtime/tests/maps/map.test
index 072fd9d0..88c097a3 100644
--- a/runtime/tests/maps/map.test
+++ b/runtime/tests/maps/map.test
@@ -51,6 +51,14 @@ map[903] = 1903
map[526] = 1526
+
+map[33] = 3333
+map[44] = 4444
+map[55] = 5555
+map[66] = 6666
+
+
+map[1970] = 1799
}
test is {Test of int64 keys and string values} -setup {