Code covered by the BSD License  

Highlights from
MATLAB xUnit Test Framework

image thumbnail
from MATLAB xUnit Test Framework by Steve Eddins
MATLAB xUnit is a unit test framework for MATLAB code.

testSetupExample
function test_suite = testSetupExample
initTestSuite;

function fh = setup
fh = figure;

function teardown(fh)
delete(fh);

function testColormapColumns(fh)
assertEqual(size(get(fh, 'Colormap'), 2), 3);

function testPointer(fh)
assertEqual(get(fh, 'Pointer'), 'arrow');

Contact us at files@mathworks.com