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

Download this file

19 lines (14 with data), 617 Bytes

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