comparison testing/utp_1.1/utp_fcns/get_test_objects_timespan.m @ 44:409a22968d5e default

Add unit tests
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Tue, 06 Dec 2011 18:42:11 +0100
parents
children
comparison
equal deleted inserted replaced
43:bc767aaa99a8 44:409a22968d5e
1 % GET_TEST_OBJECTS_TIMESPAN returns a set of TIMESPAN objects suitable for many of the UTPs
2 %
3 % CALL: [ts1, ts2, ts3, ts4, ts5, ts6, tsv, tsm] = get_test_objects_timespan
4 %
5 % OUTPUTS:
6 % ts1 - An empty timespan
7 % ts2 - A timespan
8 % ts3 - A timespan
9 % ts4 - A timespan
10 % ts5 - A timespan
11 % ts6 - A timespan
12 % tsv - [ts6 ts2 ts5]
13 % tsm - [ts1 ts2 ts3; ts4 ts5 ts6];
14 %
15 % M Hewitson 06-08-08
16 %
17 % $Id: get_test_objects_timespan.m,v 1.3 2009/08/03 18:34:11 ingo Exp $
18 %
19 function [ts1, ts2, ts3, ts4, ts5, ts6, tsv, tsm] = get_test_objects_timespan
20
21 %% TS1
22 ts1 = timespan();
23 ts1.setName();
24 %% TS2
25 ts2 = timespan(1000, 10000);
26 ts2.setName();
27 %% TS3
28 ts3 = timespan('2008-08-08 12:00:00', '2008-08-08 13:00:00');
29 ts3.setName();
30 %% TS4
31 ts4 = timespan(time(10), time(100));
32 ts4.setName();
33 %% TS5
34 pl = plist('timezone', 'PST', 'timeformat', 'HH:MM:SS.FFF', 'startT', time(1234), 'endT', time(12345));
35 ts5 = timespan(pl);
36 ts5.setName();
37 %% TS6
38 ts6 = timespan(10, time(100), 'HH:MM:SS');
39 ts6.setName();
40 %% TSV
41 tsv = [ts6 ts2 ts5];
42 %% TSM
43 tsm = [ts1 ts2 ts3; ts4 ts5 ts6];
44
45 end