このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。
addRule
クラス: slcoverage.Filter
名前空間: slcoverage
カバレッジ フィルター規則をフィルターに追加
構文
result = addRule(filter,rule)
入力引数
filter
— 規則を追加するフィルター オブジェクト
slcoverage.Filter
オブジェクト
規則を追加するフィルター オブジェクト。slcoverage.Filter
オブジェクトとして指定します。
rule
— フィルターに追加する規則
slcoverage.FilterRule
オブジェクト
フィルターに追加する規則。slcoverage.FilterRule
オブジェクトとして指定します。
出力引数
result
— 規則の追加結果
logical
規則の追加結果。0 または 1 として返されます。
例
オブジェクト フィルターへの規則の追加
ブロック セレクター、フィルター、およびセレクターの規則を作成します。次に、規則をフィルターに追加します。
モデルを開きます。カバレッジの設定を指定して、カバレッジの記録をオンにします。
modelName = 'slcoverage_lct_bus'; open_system(modelName); set_param(modelName,'CovMetricStructuralLevel','MCDC','RecordCoverage','on');
BlockSelector
オブジェクト、bl
を作成します。このブロック セレクターは 'RelationalOperator'
プロパティを使用して、モデル内のすべてのブロックを選択します。
bl = slcoverage.BlockSelector(slcoverage.BlockSelectorType.BlockType,'RelationalOperator');
フィルター オブジェクトを作成し、規則オブジェクトを作成して、規則をフィルター オブジェクトに追加します。
filt = slcoverage.Filter;
rule = slcoverage.FilterRule(bl,'Tested elsewhere',slcoverage.FilterMode.Exclude);
filt.addRule(rule);
バージョン履歴
R2017b で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)