Skip to content
Snippets Groups Projects
Commit e82399c8 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Allow uncommented blocks for unit tests.

In this case the unit tests blocks must be preceeded by a return
statement.
parent b2a8b9c0
No related branches found
No related tags found
No related merge requests found
......@@ -86,8 +86,17 @@ for i=1:nn
tid = fopen([FNAME '_test_' int2str(i) '.m'],'w');
fprintf(tid,['function [T,t,LOG] = ' FNAME '_test_' int2str(i) '()\n']);
fprintf(tid,['try\n']);
if isequal(file{b1(i)+1}(1:3), '%$ ') || isequal(file{b1(i)+1}(1:2), '%$')
remove_first_columns = true;
else
remove_first_columns = false;
end
for j=b1(i):b2(i)
str = sprintf('%s \n',file{j}(4:end));
if remove_first_columns
str = sprintf('%s \n',file{j}(4:end));
else
str = sprintf('%s \n',file{j}(1:end));
end
str = regexprep(str, '%', '%%');
fprintf(tid,str);
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment