expSolution = [-1+3i, -1-3i];
testCase.verifyEqual(actSolution,expSolution);
end
end
end
Run SolverTest Test Case
Create a test suite, quadTests.
quadTests = matlab.unittest.TestSuite.fromClass(?SolverTest);
result = run(quadTests);
Running SolverTest
..
Done SolverTest
All tests passed.
Explore Output Argument, result
The output argument, result, is a matlab.unittest.TestResult object. It contains
information of the two tests in SolverTest.
whos result
Name Size Bytes Class Attributes
result 1x2 5392 matlab.unittest.TestResult
Display Information for One Test
To see the information for one value, type:
result(1)
ans =
TestResult with properties:
Name: 'SolverTest/testRealSolution'
Passed: 1
Failed: 0
Incomplete: 0
Duration: 1.8678
Analyze Test Case Results