Fixed unit tests (path issues for private functions).

parent 6de61794
......@@ -51,8 +51,8 @@ p = varargin{2};
%@test:1
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$
%$ try
%$ [o, p] = comparison_arg_checks(1);
......@@ -67,8 +67,8 @@ p = varargin{2};
%@test:2
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$
%$ try
%$ [o, p] = comparison_arg_checks('make', 'my', 'day');
......@@ -83,8 +83,8 @@ p = varargin{2};
%@test:3
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$
%$ try
%$ [o, p] = comparison_arg_checks('punk', dates('1950Q1'));
......@@ -99,8 +99,8 @@ p = varargin{2};
%@test:4
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$
%$ try
%$ [o, p] = comparison_arg_checks(dates('1950Q1'), 1);
......@@ -115,8 +115,8 @@ p = varargin{2};
%@test:5
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$
%$ try
%$ [o, p] = comparison_arg_checks(dates('1950Q1'), dates('1950M1'));
......@@ -131,8 +131,8 @@ p = varargin{2};
%@test:6
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$
%$ try
%$ [o, p] = comparison_arg_checks(dates('1950Q1'):dates('1950Q2'), dates('1950Q1'):dates('1950Q3'));
......@@ -147,8 +147,8 @@ p = varargin{2};
%@test:7
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$
%$ try
%$ [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));
%@test:1
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$ addpath('../../../data/')
%$
%$ try
......@@ -77,8 +77,8 @@ str = sprintf('%s%s>\n', str, date2string(o.time(o.length(),:),o.freq));
%@test:2
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$ addpath('../../../data/')
%$
%$ try
......@@ -105,8 +105,8 @@ str = sprintf('%s%s>\n', str, date2string(o.time(o.length(),:),o.freq));
%@test:3
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$ addpath('../../../data/')
%$
%$ try
......@@ -133,8 +133,8 @@ str = sprintf('%s%s>\n', str, date2string(o.time(o.length(),:),o.freq));
%@test:4
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$ addpath('../../../data/')
%$
%$ try
......
......@@ -31,8 +31,8 @@ end
%@test:1
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$
%$ a = [2, 4];
%$ b = [1, 2];
......@@ -54,8 +54,8 @@ end
%@test:2
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$
%$ a = [1, 4];
%$ b = [2, 2];
......@@ -77,8 +77,8 @@ end
%@test:3
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$
%$ a = [1, 4];
%$ b = [1, 2];
......@@ -100,8 +100,8 @@ end
%@test:4
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$
%$ a = [1, 2];
%$ b = [1, 4];
......@@ -123,8 +123,8 @@ end
%@test:5
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$
%$ a = [1, 2];
%$ b = [1, 2];
......
......@@ -31,8 +31,8 @@ end
%@test:1
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$
%$ a = [2, 4];
%$ b = [1, 2];
......@@ -54,8 +54,8 @@ end
%@test:2
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$
%$ a = [1, 4];
%$ b = [2, 2];
......@@ -77,8 +77,8 @@ end
%@test:3
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$
%$ a = [1, 4];
%$ b = [1, 2];
......@@ -100,8 +100,8 @@ end
%@test:4
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$
%$ a = [1, 2];
%$ b = [1, 4];
......@@ -123,8 +123,8 @@ end
%@test:5
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$
%$ a = [1, 2];
%$ b = [1, 2];
......
......@@ -31,8 +31,8 @@ end
%@test:1
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$
%$ a = [2, 4];
%$ b = [1, 2];
......@@ -54,8 +54,8 @@ end
%@test:2
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$
%$ a = [1, 4];
%$ b = [2, 2];
......@@ -77,8 +77,8 @@ end
%@test:3
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$
%$ a = [1, 4];
%$ b = [1, 2];
......@@ -100,8 +100,8 @@ end
%@test:4
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$
%$ a = [1, 2];
%$ b = [1, 4];
......@@ -123,8 +123,8 @@ end
%@test:5
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$
%$ a = [1, 2];
%$ b = [1, 2];
......
......@@ -31,8 +31,8 @@ end
%@test:1
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$
%$ a = [2, 4];
%$ b = [1, 2];
......@@ -54,8 +54,8 @@ end
%@test:2
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$
%$ a = [1, 4];
%$ b = [2, 2];
......@@ -77,8 +77,8 @@ end
%@test:3
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$
%$ a = [1, 4];
%$ b = [1, 2];
......@@ -100,8 +100,8 @@ end
%@test:4
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$
%$ a = [1, 2];
%$ b = [1, 4];
......@@ -123,8 +123,8 @@ end
%@test:5
%$ OPATH = pwd();
%$ [DATES_PATH, ~, ~] = fileparts(which('initialize_dates_toolbox'));
%$ cd([DATES_PATH '/@dates/private']);
%$ DSERIES_PATH = strrep(which('dseries.initialize'),'/+dseries/initialize.m','');
%$ cd([DSERIES_PATH '/@dates/private']);
%$
%$ a = [1, 2];
%$ b = [1, 2];
......@@ -142,4 +142,4 @@ end
%$
%$ T = all(t);
%$ cd(OPATH);
%@eof:5
%@eof:5
\ No newline at end of file
......@@ -35,10 +35,10 @@ unit_tests_root = strrep(which('runalltests'),'runalltests.m','');
% Initialize the dseries module
try
initialize_dseries_toolbox();
dseries.initialize();
catch
addpath([unit_tests_root '../src']);
initialize_dseries_toolbox();
dseries.initialize();
end
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