summaryrefslogtreecommitdiffstats
path: root/testsuite/buildok/twelve.stp
diff options
context:
space:
mode:
authorgraydon <graydon>2005-08-13 01:36:41 +0000
committergraydon <graydon>2005-08-13 01:36:41 +0000
commit51bf37c337fbd49b59d9b6039b1722818dde8491 (patch)
tree382ecd87c484a9173ff7725d15af2c02c4d24d86 /testsuite/buildok/twelve.stp
parent3a20432bc0a0aa6d8651561d508cc730e6dabc97 (diff)
downloadsystemtap-steved-51bf37c337fbd49b59d9b6039b1722818dde8491.tar.gz
systemtap-steved-51bf37c337fbd49b59d9b6039b1722818dde8491.tar.xz
systemtap-steved-51bf37c337fbd49b59d9b6039b1722818dde8491.zip
[ChangeLog]
2005-08-12 Graydon Hoare <graydon@redhat.com> * translate.cxx (c_tmpcounter::visit_array_in): Implement. (c_unparser::visit_array_in): Likewise. (mapvar::exists): New method. [runtime/ChangeLog] 2005-08-12 Graydon Hoare <graydon@redhat.com> * map-values.c (_stp_map_entry_exists): New function. * map.h (_stp_map_entry_exists): Declare it.
Diffstat (limited to 'testsuite/buildok/twelve.stp')
-rwxr-xr-xtestsuite/buildok/twelve.stp31
1 files changed, 31 insertions, 0 deletions
diff --git a/testsuite/buildok/twelve.stp b/testsuite/buildok/twelve.stp
new file mode 100755
index 00000000..f30e0813
--- /dev/null
+++ b/testsuite/buildok/twelve.stp
@@ -0,0 +1,31 @@
+#! stap -p4
+
+# testing the "in" operator
+
+global foo, goo, moo
+
+probe begin
+{
+ foo[10] = "a"
+ goo["a",12,"c",14,"d"] = 10
+ moo[1,2,3,4,5] = "hello"
+
+ if (10 in foo)
+ {
+ foo[10] = "yes"
+ }
+
+ if (["a",12,"c",14,"d"] in goo)
+ {
+ goo["p",1,"q",2,"r"] += (12 in foo)
+ }
+
+ x = 1
+ y = 2
+ z = 3
+
+ if ([x,y,z,y,x] in moo)
+ {
+ foo[30] = moo[(x in foo), (y in foo), (z in foo), (y in foo), (x in foo)]
+ }
+}