MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1
res =

1x2 TestResult array with properties:

Name
Passed
Failed
Incomplete
Duration
Details

Totals:
2 Passed, 0 Failed, 0 Incomplete.
2.138 seconds testing time.

Run Single Test Method

To run the single test, testRealSolution:

testCase = SolverTest;
res = run(testCase,'testRealSolution')

Running SolverTest
.
Done SolverTest
__________

res =

TestResult with properties:

Name: 'SolverTest/testRealSolution'
Passed: 1
Failed: 0
Incomplete: 0
Duration: 0.0426
Details: [1x1 struct]

Totals:
1 Passed, 0 Failed, 0 Incomplete.

33 Unit Testing

Free download pdf