Added unitary test in colon overladed method (dynDate).

time-shift
Stéphane Adjemian (Charybdis) 2012-11-12 15:02:49 +01:00
parent 1df227ce21
commit cae06f3d80
1 changed files with 20 additions and 0 deletions

View File

@ -103,3 +103,23 @@ end
%$ t(2) = dyn_assert(d3.freq,e.freq);
%$ T = all(t);
%@eof:1
%@test:2
%$ addpath ../matlab
%$
%$ % Create an empty dynDate object
%$ date = dynDate();
%$
%$ % Define expected results.
%$ e.freq = 4;
%$ e.time = [1950 2; 1950 3; 1950 4; 1951 1; 1951 2; 1951 3; 1951 4];
%$
%$ % Call the tested routine.
%$ d = date('1950Q2'):date('1951Q4');
%$
%$ % Check the results.
%$ t(1) = dyn_assert(d.time,e.time);
%$ t(2) = dyn_assert(d.freq,e.freq);
%$ T = all(t);
%@eof:2