tstest.cc 1.98 KB
Newer Older
thomas.forbriger's avatar
thomas.forbriger committed
1
2
3
4
5
/*! \file tstest.cc
 * \brief test time series modules
 * 
 * ----------------------------------------------------------------------------
 * 
thomas.forbriger's avatar
thomas.forbriger committed
6
 * $Id: tstest.cc,v 1.2 2006-03-29 07:42:58 tforb Exp $
thomas.forbriger's avatar
thomas.forbriger committed
7
8
9
10
11
12
 * \author Thomas Forbriger
 * \date 20/12/2003
 * 
 * test time series modules
 * 
 * Copyright (c) 2003 by Thomas Forbriger (BFO Schiltach) 
thomas.forbriger's avatar
thomas.forbriger committed
13
14
15
16
17
18
 *
 * ----
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version. 
thomas.forbriger's avatar
thomas.forbriger committed
19
 * 
thomas.forbriger's avatar
thomas.forbriger committed
20
21
22
23
24
25
26
27
28
29
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 * ----
 *
thomas.forbriger's avatar
thomas.forbriger committed
30
31
32
33
34
35
36
37
 * REVISIONS and CHANGES 
 *  - 20/12/2003   V1.0   Thomas Forbriger
 * 
 * ============================================================================
 */
#define TSTEST_VERSION \
  "TSTEST   V1.0   test time series modules"
#define TSTEST_CVSID \
thomas.forbriger's avatar
thomas.forbriger committed
38
  "$Id: tstest.cc,v 1.2 2006-03-29 07:42:58 tforb Exp $"
thomas.forbriger's avatar
thomas.forbriger committed
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73

#include <iostream>
#include <tsxx.h>
#include <aff/dump.h>

using std::cout;
using std::cerr;
using std::endl;

int main(int iargc, char* argv[])
{
  CODE( ts::TimeSeries<int> A(20) );
  CODE( cout << A.size() << endl);
  CODE( cout << A.dt << endl);
  CODE( A.dt=20. );
  CODE( A(8)=401 );
  CODE( const ts::TimeSeries<int> B(A) );
  CODE( cout << B.size() << endl);
  CODE( A(2)=-15 );
  aff::ConstSeries<int> Bs=B;
  DUMP(Bs);
#ifdef ILLEGAL1
  CODE( B(13)=3 );
#endif
#ifdef ILLEGAL2
  CODE( B.dt=3 );
#endif
  CODE( ts::TimeSeries<int> C );
  CODE( C=B );
  DUMP(C);
  CODE( C(3)=-15 );
  DUMP(B);
}

/* ----- END OF tstest.cc ----- */