Is there an equivalent of "mock functions" for linked atomic subcharts?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Vivek Chugh
le 9 Avr 2018
Réponse apportée : Anmol Pradeep Bhargava
le 4 Mai 2018
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.
0 commentaires
Réponse acceptée
Anmol Pradeep Bhargava
le 4 Mai 2018
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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Test Model Components dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!