How can I test a long function in Matlab?
显示 更早的评论
Hello community,
I have to test certain functions and some of them are very long, how can I generate a test that verifies it?
Thank you so much,
Gabriela
采纳的回答
更多回答(1 个)
John D'Errico
2021-4-12
0 个投票
Don't test your long function. Because you should be writing SHORT functions. Then you can test each piece, verify it works as designed. And only then put it all together.
类别
在 帮助中心 和 File Exchange 中查找有关 Run Unit Tests 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!