Test Exceptions and Mask Contraints within the TestManager
0 comentarios
Respuestas (2)
0 comentarios
3 comentarios
Hi @Kris Schweikert,
That’s a great solution — I’m glad my response helped spark the idea! Using set_param directly in the custom criteria to inject an invalid value and then catching the expected error is a smart way to bypass simulation-level failures while still validating error handling. I like how you explicitly fail the test when no error is thrown — that makes the intent very clear.
As you pointed out, wrapping this in a broader test with other logical or temporal assessments ensures that the expected error doesn’t inadvertently fail the entire test run. It's a clean workaround for the limitations of TestResult mutability.
Thanks for sharing your approach — I’m sure others will find it helpful too!
Ver también
Categorías
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!