Verified Commit f0a18744 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Fixed unit tests (path issues for private functions).

parent 6de61794
...@@ -51,8 +51,8 @@ p = varargin{2}; ...@@ -51,8 +51,8 @@ p = varargin{2};
%@test:1 %@test:1
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ %$
%$ try %$ try
%$ [o, p] = comparison_arg_checks(1); %$ [o, p] = comparison_arg_checks(1);
...@@ -67,8 +67,8 @@ p = varargin{2}; ...@@ -67,8 +67,8 @@ p = varargin{2};
%@test:2 %@test:2
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ %$
%$ try %$ try
%$ [o, p] = comparison_arg_checks('make', 'my', 'day'); %$ [o, p] = comparison_arg_checks('make', 'my', 'day');
...@@ -83,8 +83,8 @@ p = varargin{2}; ...@@ -83,8 +83,8 @@ p = varargin{2};
%@test:3 %@test:3
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ %$
%$ try %$ try
%$ [o, p] = comparison_arg_checks('punk', dates('1950Q1')); %$ [o, p] = comparison_arg_checks('punk', dates('1950Q1'));
...@@ -99,8 +99,8 @@ p = varargin{2}; ...@@ -99,8 +99,8 @@ p = varargin{2};
%@test:4 %@test:4
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ %$
%$ try %$ try
%$ [o, p] = comparison_arg_checks(dates('1950Q1'), 1); %$ [o, p] = comparison_arg_checks(dates('1950Q1'), 1);
...@@ -115,8 +115,8 @@ p = varargin{2}; ...@@ -115,8 +115,8 @@ p = varargin{2};
%@test:5 %@test:5
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ %$
%$ try %$ try
%$ [o, p] = comparison_arg_checks(dates('1950Q1'), dates('1950M1')); %$ [o, p] = comparison_arg_checks(dates('1950Q1'), dates('1950M1'));
...@@ -131,8 +131,8 @@ p = varargin{2}; ...@@ -131,8 +131,8 @@ p = varargin{2};
%@test:6 %@test:6
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ %$
%$ try %$ try
%$ [o, p] = comparison_arg_checks(dates('1950Q1'):dates('1950Q2'), dates('1950Q1'):dates('1950Q3')); %$ [o, p] = comparison_arg_checks(dates('1950Q1'):dates('1950Q2'), dates('1950Q1'):dates('1950Q3'));
...@@ -147,8 +147,8 @@ p = varargin{2}; ...@@ -147,8 +147,8 @@ p = varargin{2};
%@test:7 %@test:7
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ %$
%$ try %$ try
%$ [o, p] = comparison_arg_checks(dates('1950Q2'), dates('1950Q1')); %$ [o, p] = comparison_arg_checks(dates('1950Q2'), dates('1950Q1'));
......
...@@ -49,8 +49,8 @@ str = sprintf('%s%s>\n', str, date2string(o.time(o.length(),:),o.freq)); ...@@ -49,8 +49,8 @@ str = sprintf('%s%s>\n', str, date2string(o.time(o.length(),:),o.freq));
%@test:1 %@test:1
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ addpath('../../../data/') %$ addpath('../../../data/')
%$ %$
%$ try %$ try
...@@ -77,8 +77,8 @@ str = sprintf('%s%s>\n', str, date2string(o.time(o.length(),:),o.freq)); ...@@ -77,8 +77,8 @@ str = sprintf('%s%s>\n', str, date2string(o.time(o.length(),:),o.freq));
%@test:2 %@test:2
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ addpath('../../../data/') %$ addpath('../../../data/')
%$ %$
%$ try %$ try
...@@ -105,8 +105,8 @@ str = sprintf('%s%s>\n', str, date2string(o.time(o.length(),:),o.freq)); ...@@ -105,8 +105,8 @@ str = sprintf('%s%s>\n', str, date2string(o.time(o.length(),:),o.freq));
%@test:3 %@test:3
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ addpath('../../../data/') %$ addpath('../../../data/')
%$ %$
%$ try %$ try
...@@ -133,8 +133,8 @@ str = sprintf('%s%s>\n', str, date2string(o.time(o.length(),:),o.freq)); ...@@ -133,8 +133,8 @@ str = sprintf('%s%s>\n', str, date2string(o.time(o.length(),:),o.freq));
%@test:4 %@test:4
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ addpath('../../../data/') %$ addpath('../../../data/')
%$ %$
%$ try %$ try
......
...@@ -31,8 +31,8 @@ end ...@@ -31,8 +31,8 @@ end
%@test:1 %@test:1
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ %$
%$ a = [2, 4]; %$ a = [2, 4];
%$ b = [1, 2]; %$ b = [1, 2];
...@@ -54,8 +54,8 @@ end ...@@ -54,8 +54,8 @@ end
%@test:2 %@test:2
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ %$
%$ a = [1, 4]; %$ a = [1, 4];
%$ b = [2, 2]; %$ b = [2, 2];
...@@ -77,8 +77,8 @@ end ...@@ -77,8 +77,8 @@ end
%@test:3 %@test:3
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ %$
%$ a = [1, 4]; %$ a = [1, 4];
%$ b = [1, 2]; %$ b = [1, 2];
...@@ -100,8 +100,8 @@ end ...@@ -100,8 +100,8 @@ end
%@test:4 %@test:4
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ %$
%$ a = [1, 2]; %$ a = [1, 2];
%$ b = [1, 4]; %$ b = [1, 4];
...@@ -123,8 +123,8 @@ end ...@@ -123,8 +123,8 @@ end
%@test:5 %@test:5
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ %$
%$ a = [1, 2]; %$ a = [1, 2];
%$ b = [1, 2]; %$ b = [1, 2];
......
...@@ -31,8 +31,8 @@ end ...@@ -31,8 +31,8 @@ end
%@test:1 %@test:1
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ %$
%$ a = [2, 4]; %$ a = [2, 4];
%$ b = [1, 2]; %$ b = [1, 2];
...@@ -54,8 +54,8 @@ end ...@@ -54,8 +54,8 @@ end
%@test:2 %@test:2
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ %$
%$ a = [1, 4]; %$ a = [1, 4];
%$ b = [2, 2]; %$ b = [2, 2];
...@@ -77,8 +77,8 @@ end ...@@ -77,8 +77,8 @@ end
%@test:3 %@test:3
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ %$
%$ a = [1, 4]; %$ a = [1, 4];
%$ b = [1, 2]; %$ b = [1, 2];
...@@ -100,8 +100,8 @@ end ...@@ -100,8 +100,8 @@ end
%@test:4 %@test:4
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ %$
%$ a = [1, 2]; %$ a = [1, 2];
%$ b = [1, 4]; %$ b = [1, 4];
...@@ -123,8 +123,8 @@ end ...@@ -123,8 +123,8 @@ end
%@test:5 %@test:5
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ %$
%$ a = [1, 2]; %$ a = [1, 2];
%$ b = [1, 2]; %$ b = [1, 2];
......
...@@ -31,8 +31,8 @@ end ...@@ -31,8 +31,8 @@ end
%@test:1 %@test:1
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ %$
%$ a = [2, 4]; %$ a = [2, 4];
%$ b = [1, 2]; %$ b = [1, 2];
...@@ -54,8 +54,8 @@ end ...@@ -54,8 +54,8 @@ end
%@test:2 %@test:2
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ %$
%$ a = [1, 4]; %$ a = [1, 4];
%$ b = [2, 2]; %$ b = [2, 2];
...@@ -77,8 +77,8 @@ end ...@@ -77,8 +77,8 @@ end
%@test:3 %@test:3
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ %$
%$ a = [1, 4]; %$ a = [1, 4];
%$ b = [1, 2]; %$ b = [1, 2];
...@@ -100,8 +100,8 @@ end ...@@ -100,8 +100,8 @@ end
%@test:4 %@test:4
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ %$
%$ a = [1, 2]; %$ a = [1, 2];
%$ b = [1, 4]; %$ b = [1, 4];
...@@ -123,8 +123,8 @@ end ...@@ -123,8 +123,8 @@ end
%@test:5 %@test:5
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ %$
%$ a = [1, 2]; %$ a = [1, 2];
%$ b = [1, 2]; %$ b = [1, 2];
......
...@@ -31,8 +31,8 @@ end ...@@ -31,8 +31,8 @@ end
%@test:1 %@test:1
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ %$
%$ a = [2, 4]; %$ a = [2, 4];
%$ b = [1, 2]; %$ b = [1, 2];
...@@ -54,8 +54,8 @@ end ...@@ -54,8 +54,8 @@ end
%@test:2 %@test:2
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ %$
%$ a = [1, 4]; %$ a = [1, 4];
%$ b = [2, 2]; %$ b = [2, 2];
...@@ -77,8 +77,8 @@ end ...@@ -77,8 +77,8 @@ end
%@test:3 %@test:3
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ %$
%$ a = [1, 4]; %$ a = [1, 4];
%$ b = [1, 2]; %$ b = [1, 2];
...@@ -100,8 +100,8 @@ end ...@@ -100,8 +100,8 @@ end
%@test:4 %@test:4
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ %$
%$ a = [1, 2]; %$ a = [1, 2];
%$ b = [1, 4]; %$ b = [1, 4];
...@@ -123,8 +123,8 @@ end ...@@ -123,8 +123,8 @@ end
%@test:5 %@test:5
%$ OPATH = pwd(); %$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox')); %$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DATES_PATH '/@dates/private']); %$ cd([DSERIES_PATH '/@dates/private']);
%$ %$
%$ a = [1, 2]; %$ a = [1, 2];
%$ b = [1, 2]; %$ b = [1, 2];
...@@ -142,4 +142,4 @@ end ...@@ -142,4 +142,4 @@ end
%$ %$
%$ T = all(t); %$ T = all(t);
%$ cd(OPATH); %$ cd(OPATH);
%@eof:5 %@eof:5
\ No newline at end of file
...@@ -35,10 +35,10 @@ unit_tests_root = strrep(which('runalltests'),'runalltests.m',''); ...@@ -35,10 +35,10 @@ unit_tests_root = strrep(which('runalltests'),'runalltests.m','');
% Initialize the dseries module % Initialize the dseries module
try try
initialize_dseries_toolbox(); dseries.initialize();
catch catch
addpath([unit_tests_root '../src']); addpath([unit_tests_root '../src']);
initialize_dseries_toolbox(); dseries.initialize();
end end
warning off warning off
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment