Is there an equivalent of "mock functions" for linked atomic subcharts?

1 回表示 (過去 30 日間)
Vivek Chugh
Vivek Chugh 2018 年 4 月 9 日
回答済み: Anmol Pradeep Bhargava 2018 年 5 月 4 日
In code testing, it is fairly common to create mock alternatives for functions used by the code under test. This allows one to control the outputs of functions called by the code under test. Is there a similar alternative for linked atomic subcharts used in a stateflow chart under test? I wish to write high level tests using simulink test for my stateflow chart that does not depend on the logic contained in the linked atomic subcharts. So I am looking for some functionality that would perhaps replace the linked atomic subcharts with a dummy atomic subchart just for this test.

採用された回答

Anmol Pradeep Bhargava
Anmol Pradeep Bhargava 2018 年 5 月 4 日
Hi Vivek,
There isn't a functionality to stub out the linked atomic subchart. As a possible work around, you can create a separate library and link to it.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTest Model Components についてさらに検索

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by