Skip to content

Commit dcdad52

Browse files
committed
fix coverage
1 parent 2d56abc commit dcdad52

File tree

3 files changed

+17
-14
lines changed

3 files changed

+17
-14
lines changed

Makefile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
# TODO make more general to use the local matlab version
2-
MATLAB = /usr/local/MATLAB/R2017a/bin/matlab
2+
MATLAB = /usr/local/MATLAB/R2018a/bin/matlab
33
ARG = -nodisplay -nosplash -nodesktop
44

5-
<<<<<<< HEAD
6-
=======
7-
.PHONY: clean manual clean_demos fix_submodule
8-
clean: clean_demos
5+
6+
.PHONY: clean manual fix_submodule
7+
clean:
98
rm -rf version.txt
109

1110
fix_submodule:
1211
git submodule update --init --recursive && git submodule update --recursive
1312

14-
>>>>>>> 3a67904c66439e90c8fc528ac8729254b91d56d6
1513
lint:
1614
mh_style --fix && mh_metric --ci && mh_lint
1715

cpp_bids.m

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@ function cpp_bids(varargin)
3535
case 'init'
3636

3737
initCppBids(verbose);
38+
39+
case 'dev'
40+
41+
initCppBids(verbose);
42+
thisDirectory = fileparts(mfilename('fullpath'));
43+
testFolder = fullfile(thisDirectory, 'tests');
44+
addpath(testFolder, '-begin');
45+
utilFolder = fullfile(thisDirectory, 'tests', 'utils');
46+
addpath(utilFolder, '-begin');
47+
3848

3949
case 'uninit'
4050

@@ -75,10 +85,10 @@ function initCppBids(verbose)
7585
CPP_BIDS_PATHS = cat(2, CPP_BIDS_PATHS, ...
7686
pathSep, ...
7787
genpath(fullfile(thisDirectory, 'src')));
78-
assert(isdir(fullfile(thisDirectory, 'lib', 'bids-matlab', '+bids')));
88+
assert(isfolder(fullfile(thisDirectory, 'lib', 'bids-matlab', '+bids')));
7989
CPP_BIDS_PATHS = cat(2, CPP_BIDS_PATHS, pathSep, ...
8090
fullfile(thisDirectory, 'lib', 'bids-matlab'));
81-
assert(isdir(fullfile(thisDirectory, 'lib', 'JSONio')));
91+
assert(isfolder(fullfile(thisDirectory, 'lib', 'JSONio')));
8292
CPP_BIDS_PATHS = cat(2, CPP_BIDS_PATHS, pathSep, ...
8393
fullfile(thisDirectory, 'lib', 'JSONio'));
8494

runTests.m

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,10 @@ function runTests()
1414
warning off;
1515
more off;
1616

17-
addpath(fullfile(thisPath, 'lib', 'JSONio'));
18-
addpath(fullfile(thisPath, 'lib', 'bids-matlab'));
17+
cpp_bids('dev');
1918

2019
folderToCover = fullfile(thisPath, 'src');
21-
addpath(genpath(folderToCover));
2220
testFolder = fullfile(thisPath, 'tests');
23-
addpath(testFolder);
24-
25-
addpath(fullfile(testFolder, 'utils'));
2621

2722
success = moxunit_runtests(testFolder, ...
2823
'-verbose', '-recursive', '-with_coverage', ...

0 commit comments

Comments
 (0)