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

Added unit test.

parent 839c01dd
Branches
Tags
No related merge requests found
......@@ -152,4 +152,36 @@ end
%$ t(5) = dyn_assert(ts2.data,[B; NaN(1,2)], 1e-15);
%$ end
%$ T = all(t);
%@eof:2
\ No newline at end of file
%@eof:2
%@test:3
%$ % Define a datasets.
%$ A = rand(8,3); B = rand(7,2);
%$
%$ % Define names
%$ A_name = {'A1';'A2';'A3'};
%$ B_name = {'B1';'B2'};
%$
%$ % Define initial dates
%$ A_init = '1990Q1';
%$ B_init = '1990Q1';
%$
%$ % Instantiate two dynSeries objects
%$ ts1 = dynSeries(A,A_init,A_name);
%$ ts2 = dynSeries(B,B_init,B_name);
%$
%$ try
%$ [ts2, ts1] = align(ts2, ts1);
%$ t(1) = 1;
%$ catch
%$ t(1) = 0;
%$ end
%$
%$ if t(1)
%$ t(2) = dyn_assert(ts1.nobs,ts2.nobs);
%$ t(3) = dyn_assert(ts1.init==ts2.init,1);
%$ t(4) = dyn_assert(ts1.data,A, 1e-15);
%$ t(5) = dyn_assert(ts2.data,[B; NaN(1,2)], 1e-15);
%$ end
%$ T = all(t);
%@eof:3
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment