From 51bf37c337fbd49b59d9b6039b1722818dde8491 Mon Sep 17 00:00:00 2001 From: graydon Date: Sat, 13 Aug 2005 01:36:41 +0000 Subject: [ChangeLog] 2005-08-12 Graydon Hoare * 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 * map-values.c (_stp_map_entry_exists): New function. * map.h (_stp_map_entry_exists): Declare it. --- testsuite/buildok/twelve.stp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 testsuite/buildok/twelve.stp (limited to 'testsuite') 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)] + } +} -- cgit