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

Download this file

29 lines (23 with data), 952 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
%TestCaseTest Unit tests for the TestCaseWithAddPath class
% Steven L. Eddins
% Copyright The MathWorks 2008
classdef TestCaseWithAddPathTest < TestCaseWithAddPath
methods
function self = TestCaseWithAddPathTest(name)
self = self@TestCaseWithAddPath(name, ...
fullfile(fileparts(which(mfilename)), 'helper_classes'));
end
function testPath(self)
% Verify that a function in helper_classes is seen on the path.
assertEqual(exist('testFunctionHandlesA', 'file'), 2);
end
function testRunTestOnPath(self)
% Verify that we can make a test suite and run it using a file
% in the new path directory.
logger = TestRunLogger();
suite = TestSuite('testFunctionHandlesA');
did_pass = suite.run(logger);
assertTrue(did_pass);
end
end
end