[b4b313]: / matlab_xunit_3.1 / matlab_xunit / tests / testIsSetUpString.m

Download this file

19 lines (14 with data), 563 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
function test_suite = testIsSetUpString
%testIsSetUpString Unit tests for isSetUpString
% Steven L. Eddins
% Copyright 2008 The MathWorks, Inc.
initTestSuite;
function testOneStringIs
assertTrue(xunit.utils.isSetUpString('setup'));
assertTrue(xunit.utils.isSetUpString('setUp_fixture'));
function testOneStringIsNot
assertFalse(xunit.utils.isSetUpString('bogus'));
function testCellArray
strs = {'setup', 'bogus'};
assertEqual(xunit.utils.isSetUpString(strs), [true false]);
assertEqual(xunit.utils.isSetUpString(strs'), [true; false]);