Skip to content

Commit 941cba1

Browse files
committed
add test utils and version file
1 parent cf1d8d2 commit 941cba1

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

src/printCreditsCppPtb.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
function printCreditsCppPtb()
22

3-
version = '0.0.1';
3+
try
4+
version = fileread(fullfile(fileparts(mfilename('fullpath')), ...
5+
'..', '..', 'version.txt'));
6+
catch
7+
version = 'v1.0.0';
8+
end
49

510
contributors = { ...
611
'Rémi Gau', ...

tests/test_utils.m

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
function test_suite = test_utils %#ok<*STOUT>
2+
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
3+
test_functions = localfunctions(); %#ok<*NASGU>
4+
catch % no problem; early Matlab versions can use initTestSuite fine
5+
end
6+
initTestSuite;
7+
end
8+
9+
function test_utilsBasic()
10+
11+
printCreditsCppPtb();
12+
13+
end

version.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v1.0.0

0 commit comments

Comments
 (0)