From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 59862 invoked by alias); 7 Dec 2015 09:07:09 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 59795 invoked by uid 89); 7 Dec 2015 09:07:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.9 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: heian.cn.fujitsu.com Received: from cn.fujitsu.com (HELO heian.cn.fujitsu.com) (59.151.112.132) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 07 Dec 2015 09:07:07 +0000 Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 07 Dec 2015 17:06:41 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (unknown [10.167.33.83]) by cn.fujitsu.com (Postfix) with ESMTP id B30784092579 for ; Mon, 7 Dec 2015 17:06:37 +0800 (CST) Received: from localhost.localdomain (10.167.226.48) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.181.6; Mon, 7 Dec 2015 17:06:37 +0800 From: Zhou Wenjian To: Subject: [PATCH 1/3] add test cases for arith Date: Mon, 07 Dec 2015 09:07:00 -0000 Message-ID: <1449479119-10817-1-git-send-email-zhouwj-fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain X-yoursite-MailScanner-Information: Please contact the ISP for more information X-yoursite-MailScanner-ID: B30784092579.A42FA X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: zhouwj-fnst@cn.fujitsu.com X-IsSubscribed: yes X-SW-Source: 2015-q4/txt/msg00238.txt.bz2 * testsuite/systemtap.base/arith.stp: add more cases --- testsuite/systemtap.base/arith.stp | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/testsuite/systemtap.base/arith.stp b/testsuite/systemtap.base/arith.stp index 84a8fb0..894ccb8 100644 --- a/testsuite/systemtap.base/arith.stp +++ b/testsuite/systemtap.base/arith.stp @@ -29,9 +29,22 @@ probe begin { test ("-", -1, 2-3) test ("==", 1, -1==-1) test ("!=", 1, -1!=1) + test (">", 1, 2>1) + test (">= (=)", 1, 1>=1) + test (">= (>)", 1, 2>=1) + test ("<", 1, -1<1) + test ("<= (=)", 1, 1<=1) + test ("<= (<)", 1, -1<=1) + test ("== s", 1, "foobar"=="foobar") - test ("<= s", 1, "fooban"<="foobar") + test (">= s (=)", 1, "foobar">="foobar") + test ("<= s (=)", 1, "foobar"<="foobar") + test ("<= s (<)", 1, "fooban"<="foobar") + test (">= s (>)", 1, "xxx">="aaa") test ("> s", 1, "xxx">"aaa") + test ("< s", 1, "aaa"<"xxx") + test ("!= s", 1, "aaa"!="xxx") + test ("<", 1, -1<0) test ("<", 1, 85723838<8273823892) test ("*", 100300400500, 1003004005 * 100) @@ -65,8 +78,22 @@ probe begin { i=1; test ("i--", i--, 1) i=1; test ("i++", i++, 1) i=1; test ("+=", i+=4, 5) test ("after +=", i, 5) + i=2; test ("*=", i-=1, 1) test ("after -=", i, 1) i=5; test ("/=", i/=2, 2) test ("after /=", i, 2) + i=2; test ("*=", i*=2, 4) test ("after *=", i, 4) + i=3; test ("*=", i%=2, 1) test ("after %=", i, 1) + i=0xf; test (">>=", i>>=1, 7) test ("after >>=", i, 7) + i=0xf; test ("<<=", i<<=1, 30) test ("after <<=", i, 30) + i=0xf; test ("&=", i&=1, 1) test ("after &=", i, 1) + i=0xf; test ("^=", i^=1, 14) test ("after ^=", i, 14) + i=0xf; test ("|=", i|=1, 15) test ("after |=", i, 15) + i=+5; test ("+", i+5, 10) + i=-5; test ("+", i+5, 0) + i=5; test ("!", !i, 0) + i=0xf; test ("~", ~i, -16) a="1" b="2"; stest (".=", a .= b, "12") stest ("after .=", a, "12") + + test ("?:", 5==5?1:2, 1) } -- 1.8.3.1