0001 function [result] = default_test()
0002
0003
0004
0005 clear; clc; close all;
0006 addpath('./fcn_core','./fcn_help');
0007
0008 ProjectID = 'Test01';
0009
0010
0011 x = linspace(0,7);
0012 y = rand(1,100)+2;
0013 dataset1 = 'test_data.mat';
0014 save('CI_files/test_data.mat','x','y');
0015
0016 x1 = linspace(0,2*pi);
0017 y1 = sin(x1)+2;
0018
0019
0020 fpath = "CI_files/testdata_2.h5";
0021 dataset2 = 'testdata_2.h5';
0022
0023
0024 h5create(fpath, "/x1", size(x1), "Datatype", class(x1))
0025 h5create(fpath, "/y1", size(y1), "Datatype", class(y1))
0026 h5write(fpath, "/x1", x1)
0027 h5write(fpath, "/y1", y1)
0028
0029
0030
0031 fig(1) =figure('visible','off');
0032 plot(x,y,'-k');
0033 hold on
0034 plot(x1,y1,'-r');
0035
0036
0037 try
0038 [figs, ID] = TagPlot(fig, ProjectID);
0039
0040
0041 a=1;
0042 a = example_fcn(a);
0043
0044
0045
0046
0047
0048 path.script = mfilename('fullpath');
0049
0050
0051 path.rdata = {dataset1,dataset2} ;
0052
0053 Publish(path, ID, figs, 'Location', 'CI-Test')
0054
0055
0056 delete CI_files/export/* CI_files/*.mat CI_files/*.h5
0057 rmdir('CI_files/export','s');
0058 result = true;
0059 clc;
0060 catch
0061 result = false;
0062 warning('simple_test failed');
0063 end
0064
0065 end
0066