summaryrefslogtreecommitdiffstats
path: root/runtime/tests/maps
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/tests/maps')
-rw-r--r--runtime/tests/maps/all.tcl7
-rw-r--r--runtime/tests/maps/ii.c5
-rw-r--r--runtime/tests/maps/iiss.c5
-rw-r--r--runtime/tests/maps/is.c5
-rw-r--r--runtime/tests/maps/ist.c16
-rw-r--r--runtime/tests/maps/map_format.c18
-rw-r--r--runtime/tests/maps/si.c6
-rw-r--r--runtime/tests/maps/test_list_int64.c5
-rw-r--r--runtime/tests/maps/test_list_string.c6
9 files changed, 18 insertions, 55 deletions
diff --git a/runtime/tests/maps/all.tcl b/runtime/tests/maps/all.tcl
index aa408eea..c0b38a0e 100644
--- a/runtime/tests/maps/all.tcl
+++ b/runtime/tests/maps/all.tcl
@@ -1,12 +1,5 @@
package require tcltest
namespace import -force tcltest::*
-
-puts "Running all SystemTap tests"
-
-#puts [tcltest::configure]
-#puts [tcltest::configure -file]
-
tcltest::testsDirectory [file dir [info script]]
tcltest::runAllTests
-puts "All tests completed"
diff --git a/runtime/tests/maps/ii.c b/runtime/tests/maps/ii.c
index afee14d4..e44530cf 100644
--- a/runtime/tests/maps/ii.c
+++ b/runtime/tests/maps/ii.c
@@ -1,13 +1,10 @@
#include "runtime.h"
/* test of maps with keys of int64 and value of int64 */
-
+#define NEED_INT64_VALS
#define KEY1_TYPE INT64
#include "map-keys.c"
-#define VALUE_TYPE INT64
-#include "map-values.c"
-
#include "map.c"
int main ()
diff --git a/runtime/tests/maps/iiss.c b/runtime/tests/maps/iiss.c
index dc034c94..3321a329 100644
--- a/runtime/tests/maps/iiss.c
+++ b/runtime/tests/maps/iiss.c
@@ -1,15 +1,12 @@
#include "runtime.h"
/* test of maps with keys of int64,int64,string and value of string */
-
+#define NEED_STRING_VALS
#define KEY1_TYPE INT64
#define KEY2_TYPE INT64
#define KEY3_TYPE STRING
#include "map-keys.c"
-#define VALUE_TYPE STRING
-#include "map-values.c"
-
#include "map.c"
int main ()
diff --git a/runtime/tests/maps/is.c b/runtime/tests/maps/is.c
index 6b2cbb0e..8bdc6591 100644
--- a/runtime/tests/maps/is.c
+++ b/runtime/tests/maps/is.c
@@ -1,13 +1,10 @@
#include "runtime.h"
/* test of maps with keys of int64 and value of string */
-
+#define NEED_STRING_VALS
#define KEY1_TYPE INT64
#include "map-keys.c"
-#define VALUE_TYPE STRING
-#include "map-values.c"
-
#include "map.c"
int main ()
diff --git a/runtime/tests/maps/ist.c b/runtime/tests/maps/ist.c
index be3ca87d..2418a20c 100644
--- a/runtime/tests/maps/ist.c
+++ b/runtime/tests/maps/ist.c
@@ -1,13 +1,9 @@
#include "runtime.h"
/* test of maps with keys of int64 and value of stat */
-
+#define NEED_STAT_VALS
#define KEY1_TYPE INT64
#include "map-keys.c"
-
-#define VALUE_TYPE STAT
-#include "map-values.c"
-
#include "map.c"
int main ()
@@ -19,27 +15,27 @@ int main ()
_stp_map_key_int64 (map, 3);
for (i = 0; i < 100; i++)
for (j = 0; j <= i*10 ; j++ )
- _stp_map_add_int64_stat (map, i);
+ _stp_map_add_int64 (map, i);
_stp_map_key_int64 (map, 2);
for (i = 0; i < 10; i++)
for (j = 0; j < 10 ; j++ )
- _stp_map_add_int64_stat (map, j * i );
+ _stp_map_add_int64 (map, j * i );
_stp_map_key_int64 (map, 1);
for (i = 0; i < 100; i += 10)
for (j = 0; j < i/10 ; j++ )
- _stp_map_add_int64_stat (map, i);
+ _stp_map_add_int64 (map, i);
_stp_map_key_int64 (map2, 1);
for (i = 0; i < 128; i++)
for (j = 0; j < 128 ; j++ )
- _stp_map_add_int64_stat (map2, i);
+ _stp_map_add_int64 (map2, i);
_stp_map_key_int64 (map2, 2);
for (i = 0; i < 1024; i++)
for (j = 0; j < 1024 ; j++ )
- _stp_map_add_int64_stat (map2, i);
+ _stp_map_add_int64 (map2, i);
_stp_map_print (map, "map[%1d] = count:%C sum:%S avg:%A min:%m max:%M\n%H");
_stp_map_print (map2, "map2[%1d] = count:%C sum:%S avg:%A min:%m max:%M\n%H");
diff --git a/runtime/tests/maps/map_format.c b/runtime/tests/maps/map_format.c
index d6a848ab..338fd7dc 100644
--- a/runtime/tests/maps/map_format.c
+++ b/runtime/tests/maps/map_format.c
@@ -1,6 +1,9 @@
#include "runtime.h"
/* torture test of map formatting */
+#define NEED_INT64_VALS
+#define NEED_STRING_VALS
+#define NEED_STAT_VALS
#define KEY1_TYPE INT64
#define KEY2_TYPE INT64
@@ -11,15 +14,6 @@
#define KEY2_TYPE STRING
#include "map-keys.c"
-#define VALUE_TYPE STRING
-#include "map-values.c"
-
-#define VALUE_TYPE INT64
-#include "map-values.c"
-
-#define VALUE_TYPE STAT
-#include "map-values.c"
-
#include "map.c"
int main ()
@@ -61,17 +55,17 @@ int main ()
_stp_map_key_str_str (mapsst, "Riga", "Latvia");
for (i = 0; i < 100; i++)
for (j = 0; j <= i*10 ; j++ )
- _stp_map_add_int64_stat (mapsst, i);
+ _stp_map_add_int64 (mapsst, i);
_stp_map_key_str_str (mapsst, "Sofia", "Bulgaria");
for (i = 0; i < 10; i++)
for (j = 0; j < 10 ; j++ )
- _stp_map_add_int64_stat (mapsst, j * i );
+ _stp_map_add_int64 (mapsst, j * i );
_stp_map_key_str_str (mapsst, "Valletta", "Malta");
for (i = 0; i < 100; i += 10)
for (j = 0; j < i/10 ; j++ )
- _stp_map_add_int64_stat (mapsst, i);
+ _stp_map_add_int64 (mapsst, i);
_stp_map_print (mapsst, "Bogons per packet for %1s\ncount:%C sum:%S avg:%A min:%m max:%M\n%H");
diff --git a/runtime/tests/maps/si.c b/runtime/tests/maps/si.c
index 90544ed2..5f95e0dd 100644
--- a/runtime/tests/maps/si.c
+++ b/runtime/tests/maps/si.c
@@ -1,13 +1,9 @@
#include "runtime.h"
/* test of maps with keys of string and value of int64 */
-
+#define NEED_INT64_VALS
#define KEY1_TYPE STRING
#include "map-keys.c"
-
-#define VALUE_TYPE INT64
-#include "map-values.c"
-
#include "map.c"
int main ()
diff --git a/runtime/tests/maps/test_list_int64.c b/runtime/tests/maps/test_list_int64.c
index 810a18b6..6a0ce9a9 100644
--- a/runtime/tests/maps/test_list_int64.c
+++ b/runtime/tests/maps/test_list_int64.c
@@ -1,13 +1,10 @@
#include "runtime.h"
/* test of list with value of STRING */
-
+#define NEED_INT64_VALS
#define KEY1_TYPE INT64
#include "map-keys.c"
-#define VALUE_TYPE INT64
-#include "map-values.c"
-
#include "list.c"
int main ()
diff --git a/runtime/tests/maps/test_list_string.c b/runtime/tests/maps/test_list_string.c
index 455e8537..fa50a2f6 100644
--- a/runtime/tests/maps/test_list_string.c
+++ b/runtime/tests/maps/test_list_string.c
@@ -1,14 +1,10 @@
#include "runtime.h"
/* test of list with value of STRING */
-
+#define NEED_STRING_VALS
#define KEY1_TYPE INT64
#include "map-keys.c"
-#define VALUE_TYPE STRING
-#include "map-values.c"
-
-#include "map.c"
#include "list.c"
int main ()