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.

testRuntestsWithDirectoryName
function test_suite = testRuntestsWithDirectoryName
%testRuntestsWithDirectoryName Unit test for mtest('dirname') syntax.

initTestSuite;

function testDirName
current_dir = pwd;
target_dir = fullfile(fileparts(which(mfilename)), 'cwd_test');
[T, did_pass] = evalc('runtests(target_dir)');
assertFalse(did_pass);
assertEqual(current_dir, pwd);

Contact us at files@mathworks.com