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

xunit.utils.isTearDownString(str)
function tf = isTearDownString(str)
%isTearDownString True if string looks like the name of a teardown function
%   tf = isTearDownString(str) returns true if the string str looks like the
%   name of a teardown function.  If str is a cell array of strings, then
%   isTearDownString tests each string in the cell array, returning the results
%   in a logical array with the same size as str.

%   Steven L. Eddins
%   Copyright 2008-2009 The MathWorks, Inc.

setup_exp = '^[tT]ear[dD]own';
tf = xunit.utils.containsRegexp(str, setup_exp);

Contact us