Skip to content

Commit

Permalink
add bug fix test section
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Feb 24, 2023
1 parent 2412ebf commit cb43ed1
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/run_jsonlab_test.m
Expand Up @@ -24,7 +24,7 @@ function run_jsonlab_test(tests)
%

if(nargin==0)
tests={'js','jso','bj','bjo','jmap','bmap'};
tests={'js','jso','bj','bjo','jmap','bmap','bugs'};
end

%%
Expand Down Expand Up @@ -344,4 +344,13 @@ function run_jsonlab_test(tests)
'[["$",[1,24]]]','compact',1);
test_jsonlab('test multiple root objects with N padding',@savejson,loadbj([savebj({[1,2,3],struct('a',[4,5])}) 'NNN' savebj(struct('b',[4,5]))],'mmaponly',1,'mmapinclude','.b'),...
'[["$1.b",[32,8]]]','compact',1);
end

%%
if(ismember('bugs',tests))
fprintf(sprintf('%s\n',char(ones(1,79)*61)));
fprintf('Test bug fixes\n');
fprintf(sprintf('%s\n',char(ones(1,79)*61)));
test_jsonlab('simplify cell arrays mixing numbers and chars',@savejson,loadjson('[1,0,"-","L",900]'),'[1,0,"-","L",900]','compact',1);
test_jsonlab('simplify cell arrays with string elements',@savejson,loadjson('["j","s","o","n"]'),'["j","s","o","n"]','compact',1);
end

0 comments on commit cb43ed1

Please sign in to comment.