AFF --- A container for numbers (array) by Friederich and Forbriger.
tests/seriestest.cc

Test series class aff::Series.

See also
tests/seriestest.cc
#define AFF_SERIESTEST_CC_VERSION \
"AFF_SERIESTEST_CC V1.2"
#include <aff/series.h>
#include <aff/dump.h>
using std::cout;
using std::endl;
void section(const char* s)
{
cout << endl
<< s << endl;
const char* p=s;
while (*p) {
cout << "-";
++p;
}
cout << endl;
}
int main()
{
cout << AFF_SERIESTEST_CC_VERSION << endl;
section("array dimensions");
CODE( const int N=5 );
CODE( const int N2=-5 );
section("create a series container");
CODE( aff::Series<int> C(N2,N) );
DUMP( A );
DUMP( B );
DUMP( C );
CODE( A=B );
DUMP( A );
CODE( for (int i=C.first(); i<=C.last(); i++) { C(i)=i; } );
DUMP( D );
CODE( C.setlastindex(N-2); );
DUMP( C );
#ifdef ILLEGAL1
CODE( D(6)=10 );
#endif
CODE( D.shift(300) );
DUMP( D );
}
/* ----- END OF seriestest.cc ----- */