Skip to content

Commit d693a72

Browse files
committed
add tests for copy atlas function
1 parent 0579645 commit d693a72

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/test_copyAtlasToSpmDir.m

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
function test_suite = test_copyAtlasToSpmDir %#ok<*STOUT>
2+
% (C) Copyright 2022 CPP ROI developers
3+
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
4+
test_functions = localfunctions(); %#ok<*NASGU>
5+
catch % no problem; early Matlab versions can use initTestSuite fine
6+
end
7+
initTestSuite;
8+
end
9+
10+
function test_copyAtlasToSpmDir_basic()
11+
12+
copyAtlasToSpmDir('AAL', 'verbose', false);
13+
14+
spmAtlasDir = fullfile(spm('dir'), 'atlas');
15+
16+
targetAtlasImage = fullfile(spmAtlasDir, 'AAL3v1_1mm.nii');
17+
targetAtlasXml = fullfile(spmAtlasDir, 'AAL3v1_1mm.xml');
18+
19+
assertEqual(exist(targetAtlasImage, 'file'), 2);
20+
assertEqual(exist(targetAtlasXml, 'file'), 2);
21+
22+
end

0 commit comments

Comments
 (0)