head	1.6;
access
	monica
	thoth;
symbols;
locks; strict;
comment	@// @;


1.6
date	94.08.18.20.32.46;	author monica;	state Exp;
branches;
next	1.5;

1.5
date	94.08.17.03.12.53;	author monica;	state Exp;
branches;
next	1.4;

1.4
date	94.08.16.20.06.01;	author monica;	state Exp;
branches;
next	1.3;

1.3
date	94.08.16.18.08.16;	author monica;	state Exp;
branches;
next	1.2;

1.2
date	94.08.16.18.05.32;	author monica;	state Exp;
branches;
next	1.1;

1.1
date	94.08.05.03.43.59;	author monica;	state Exp;
branches;
next	;


desc
@@


1.6
log
@changed rcs info
@
text
@// $Id$
// $Log$

#include "test.h"
#define REPORT_SUM(n,p) {cout << "expected\t" << n  << "\tgot\t "<< sum(p) << endl;}
#define REPORT_PROD(n,p) { cout << "expected\t" << n  << "\tgot\t "<< product(p) << endl;}
int vector[]={ 4, 1, 3, 2, 5, 6 };
double dvector[] = {4.0, 1.0, 3.0, 2.0, 6.0, 5.5};
int main()
{
    cout << "Testing sum\n";
    cout << "Testing product\n";
    IA_Point<int>   ip;
    IA_Point<double> fp;

    ip = IA_Point<int>(1);
    REPORT_SUM(1,ip);
    ip = IA_Point<int>(0,1);
    REPORT_SUM(1,ip);
    ip = IA_Point<int>(0,1,2);
    REPORT_SUM(3,ip);
    ip = IA_Point<int>(0,1,2,3);
    REPORT_SUM(6,ip);
    ip = IA_Point<int>(4,0,1,2,3);
    REPORT_SUM(10,ip);
    ip = IA_Point<int>(&vector[0],6);
    REPORT_SUM(21,ip);


    ip = IA_Point<int>(1);
    REPORT_PROD(1,ip);
    ip = IA_Point<int>(1,2);
    REPORT_PROD(2,ip);
    ip = IA_Point<int>(1,2,3);
    REPORT_PROD(6,ip);
    ip = IA_Point<int>(4,1,2,3);
    REPORT_PROD(24,ip);
    ip = IA_Point<int>(4,1,2,3,5);
    REPORT_PROD(120,ip);
    ip = IA_Point<int>(&vector[0],6);
    REPORT_PROD(720,ip);
    
    fp = IA_Point<double>(1);
    REPORT_SUM(1.0,fp);
    fp = IA_Point<double>(0.0,1);
    REPORT_SUM(1.0,fp);
    fp = IA_Point<double>(1,2);
    REPORT_SUM(3.0,fp);
    fp = IA_Point<double>(0.0,1,2,3);
    REPORT_SUM(6.0,fp);
    fp = IA_Point<double>(4,0.0,1,2,3);
    REPORT_SUM(10.0,fp);
    fp = IA_Point<double>(&dvector[0], 6);
    REPORT_SUM(21.5,fp);

    fp = IA_Point<double>(1);
    REPORT_PROD(1,fp);
    fp = IA_Point<double>(1);
    REPORT_PROD(1,fp);
    fp = IA_Point<double>(1,2);
    REPORT_PROD(2,fp);
    fp = IA_Point<double>(1,2,3);
    REPORT_PROD(6,fp);
    fp = IA_Point<double>(4,1,2,3);
    REPORT_PROD(24,fp);
    fp = IA_Point<double>(&dvector[0], 6);
    REPORT_PROD(792,fp);

    return 0;

}
@


1.5
log
@added return 0 to main
@
text
@d1 3
@


1.4
log
@int main
@
text
@d65 3
@


1.3
log
@added "Testing" line
@
text
@d6 1
a6 1
main()
@


1.2
log
@changed includes to just include "test.h"
@
text
@d8 2
@


1.1
log
@Initial revision
@
text
@d1 1
a1 3
#include "IntPoint.h"
#include "DoublePoint.h"
#include <iostream.h>
@
