Code covered by the BSD License  

Highlights from
MATLAB xUnit Test Framework

image thumbnail

MATLAB xUnit Test Framework

by

 

31 Jan 2009 (Updated )

MATLAB xUnit is a unit test framework for MATLAB code.

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

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

% Copyright 2013 The MathWorks, Inc.

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