Script-Based Unit Testing Problem (from MathWorks example)
Afficher commentaires plus anciens
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)
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Run Unit Tests dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!