文件名称:rulewizard教材
文件大小:1.49MB
文件格式:PDF
更新时间:2014-07-15 07:40:55
C++Test rulewizard
RuleWizard for C++Test User’s Guide Table of Contents Introduction Welcome to RuleWizard! .....................................................................................................................1 Contacting Parasoft .............................................................................................................................4 The RuleWizard GUI Overview .............................................................................................................................................5 The Menu Bar .....................................................................................................................................7 Tool Bar ..............................................................................................................................................9 Tab Bar and Tab Panel ........................................................................................................................12 Messages Panel .................................................................................................................................16 Status Bar ...........................................................................................................................................17 New File Panel ....................................................................................................................................18 RuleWizard Preferences Panel ............................................................................................................22 RuleWizard Fundamentals What is a Rule? ..................................................................................................................................26 How to Create a Rule ..........................................................................................................................29 Automatic Rule Creation ......................................................................................................................36 How to Save a Rule .............................................................................................................................37 Enforcing Custom Coding Standards ..................................................................................................38 Working With Node Sets ......................................................................................................................40 Using Python Scripts in Rule Definitions ..............................................................................................52 RuleWizard Tutorial Tutorial: Introduction ............................................................................................................................57 Basic Rules Lesson 1: Do not use the ?: operator ..................................................................................................58 Lesson 2: Function Names Must Begin With a Capital Letter ..............................................................65 Lesson 3: Assignment Within an IF Statement ....................................................................................74 Lesson 4: Cast an Unsigned Character ...............................................................................................78 Lesson 5: Creating Rules With the Auto-Create Rules Feature ..........................................................85 C++Text Rules Lesson 6: No Whitespace Between Variables and Operands .............................................................95 Lesson 7: Single ASCII Space Between Conditional Statement and Its Opening Parenthesis ...........98 Advanced Rules Lesson 8: Return Rule .........................................................................................................................104 Lesson 9: Unused Variables ................................................................................................................113 Lesson 10: Using the OR Logical Component .....................................................................................119 Lesson 11: Using Containers ...............................................................................................................123 ii Lesson 12: Creating Format Component .............................................................................................131 Lesson 13: Using a Python Method to Enforce a File Naming Rule ....................................................136 Reference Guide RuleWizard Commands .......................................................................................................................141 Expressions and Regular Expressions ................................................................................................160 Available C/C++ Rule Nodes ...............................................................................................................163 Available C++Text Rule Nodes ............................................................................................................194 Index Index ...................................................................................................................................................221