Script-Based Unit Testing Problem (from MathWorks example)
显示 更早的评论
Hello,
I copied and pasted the Script-Based Unit Testing Example from MathWorks http://www.mathworks.com/help/matlab/matlab_prog/write-script-based-unit-tests.html?refresh=true, but I am encountering an error. All of the tests fail because the variables in the shared variable section are not properly defined. From my understanding of the example, the variables in this section should be defined globally and can be used for any of the four tests in the example. However, there is obviously some error here.
Here's an example of the error:
Uncaught error occurred in rightTriTolTest/Test1_SumOfAngles. The remainder of the test method will not run to completion.
--------------
Error Details:
--------------
Undefined function or variable 'tri'.
I have tried creating the variables in the workspace before running the tests, but that did that work either. I also am running on R2014a, not sure if there were any changes in 2015.
Please let me know of any suggestions, I have followed the example exactly as shown in the link (copy+pasted)
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Run Unit Tests 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!