Skip to content

Commit 80620c2

Browse files
committed
add test
1 parent eb52505 commit 80620c2

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
% (C) Copyright 2021 CPP BIDS SPM-pipeline developers
2+
3+
function test_suite = test_unit_convertToValidCamelCase %#ok<*STOUT>
4+
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
5+
test_functions = localfunctions(); %#ok<*NASGU>
6+
catch % no problem; early Matlab versions can use initTestSuite fine
7+
end
8+
initTestSuite;
9+
end
10+
11+
function test_convertToValidCamelCaseBasic()
12+
13+
str = 'foo bar';
14+
str = convertToValidCamelCase(str);
15+
assertEqual(str, 'fooBar');
16+
17+
%% set up
18+
19+
str = '&|@#-_(!{})01[]%+/=:;.?,\<> visual task';
20+
str = convertToValidCamelCase(str);
21+
assertEqual(str, '01VisualTask');
22+
23+
end

0 commit comments

Comments
 (0)