Skip to content

Commit 8162e4f

Browse files
committed
buildtool add
1 parent 1024884 commit 8162e4f

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
classdef TestALint < matlab.unittest.TestCase
1+
classdef TestLint < matlab.unittest.TestCase
22

33
properties
44
TestData
@@ -42,8 +42,7 @@ function test_lint(tc, file)
4242

4343

4444
function filenames = get_files()
45-
cwd = fileparts(mfilename('fullpath'));
46-
flist = dir(fullfile(cwd, '/**/*.m'));
45+
flist = dir(fullfile(fileparts(mfilename('fullpath')), '/**/*.m'));
4746
for i = 1:length(flist)
4847
filenames{i} = fullfile(flist(i).folder, flist(i).name); %#ok<AGROW>
4948
end

TestAll.m renamed to buildfile.m

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1-
% this script is run on Azure (or local)
1+
function plan = buildfile
2+
plan = buildplan(localfunctions);
3+
end
24

5+
function testTask(~)
6+
assertSuccess(runtests('matmap3d'))
7+
end
8+
9+
function coverageTask(~)
310
import matlab.unittest.TestRunner;
411
import matlab.unittest.Verbosity;
512
import matlab.unittest.plugins.CodeCoveragePlugin;
@@ -21,3 +28,4 @@
2128
assert(~isempty(results), "no tests found")
2229

2330
assertSuccess(results)
31+
end

0 commit comments

Comments
 (0)