How can I test if a function is executed without any error using the unit test framework in MATLAB R2020b?
조회 수: 13 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2023년 11월 6일
편집: MathWorks Support Team
2024년 12월 30일
Hi, I am using the MATLAB Unit Test Framework, which includes a verification function called "verifyWarningFree". This function can verify if a function runs without any warnings. However, I would like to check if the function executes without any errors, not just warnings. Is there a command available that can achieve this?
채택된 답변
MathWorks Support Team
2024년 12월 30일
편집: MathWorks Support Team
2024년 12월 30일
You can simply invoke the function being tested, and the test framework will report a failure if the function executes with any error.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Testing Frameworks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!