tstest.cc 1.27 KB
Newer Older
thomas.forbriger's avatar
thomas.forbriger committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*! \file tstest.cc
 * \brief test time series modules
 * 
 * ----------------------------------------------------------------------------
 * 
 * $Id: tstest.cc,v 1.1 2003-12-22 09:08:58 tforb Exp $
 * \author Thomas Forbriger
 * \date 20/12/2003
 * 
 * test time series modules
 * 
 * Copyright (c) 2003 by Thomas Forbriger (BFO Schiltach) 
 * 
 * REVISIONS and CHANGES 
 *  - 20/12/2003   V1.0   Thomas Forbriger
 * 
 * ============================================================================
 */
#define TSTEST_VERSION \
  "TSTEST   V1.0   test time series modules"
#define TSTEST_CVSID \
  "$Id: tstest.cc,v 1.1 2003-12-22 09:08:58 tforb Exp $"

#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 ----- */