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


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

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


desc
@concat testing
@


1.2
log
@fixed comments
@
text
@// Emacs: -*- C++ -*-

static char rcsid[] = "$Id: test044.c,v 1.1 1994/08/30 14:57:12 monica Exp monica $";

//
// $Log: test044.c,v $
// Revision 1.1  1994/08/30  14:57:12  monica
// Initial revision
//
// Revision 1.4  1994/08/17  03:12:53  monica
// added return 0 to main
//
// Revision 1.3  1994/08/16  18:47:20  monica
// added "Testing" output line
//
// Revision 1.2  1994/08/16  18:03:43  monica
// changed include <DoublePoint.h> to include "test.h"
//
// Revision 1.1  1994/08/05  03:42:19  monica
// Initial revision
//
// Revision 1.1  92/08/20  22:25:58  rjj
// Initial revision
// 
// 
// 

#include "test.h"

int main(int argc, char**argv)
{
    IA_Point<double>	p(10,20,30,40), r, P;
    IA_Point<int>    q(0), Q;
    int         a=11;
    double       b=2.1;
    void        prlp (char*, IA_Point<double>&);
    void        prlp (char*, IA_Point<int>&);
    void        prlc (char*, int&);
    
    IA::abort_on_throw = 0;
    cout << "Testing concat\n";
    prlp("p: ", p);    prlp("q: ", q);    prlp("r: ", r);
    cout << "int a: " << a << "\n";
    cout << "double b: " << b << "\n";
    
    P = concat(P, P);
    prlp("P = concat(P, P); ", P);
    
    P = concat(P, 1);
    prlp("P = concat(P, 1); ", P);
    
    P = concat(P, 1.2);
    prlp("P = concat(P, 1.2); ", P);
    
    P = concat(P, 2);
    prlp("P = concat(P, 2); ", P);
    
    P = concat(p, q);
    prlp("P = concat(p, q); ", P);
    P = concat(q, p);
    prlp("P = concat(q, p); ", P);

    Q = concat(q, q);
    prlp("Q = concat(q, q); ", Q);

    P = concat(q, r);
    prlp("P = concat(q, r); ", P);
    P = concat(r, q);
    prlp("P = concat(r, q); ", P);

    P = concat(p, a);
    prlp("P = concat(p, a); ", P);
    P = concat(a, p);
    prlp("P = concat(a, p); ", P);

    P = concat(p, b);
    prlp("P = concat(p, b); ", P);
    P = concat(b, p);
    prlp("P = concat(b, p); ", P);

    // Should throw
    
    P = concat(p, p);
    prlp("P = concat(p, p); ", P);

    
    for (int i = -1; i <= 1; i++) {
	P = (i); 
	cout << P << "\n";
	for (double j = -1; j <= 1; j++) {
	    P = concat(i, IA_Point<double>(j)); 
	    cout <<  P << "\n";
	    for (int k = -1; k <= 1; k++) {
		P = concat(i, concat(IA_Point<double>(j), IA_Point<int>(k)));
		cout << P << "\n";
		for (float l = -1; l <= 1; l++) {
		    P = concat(concat(i, IA_Point<double>(j)), concat(IA_Point<double>(k), l)); 
		    cout << P << "\n";
		}
	    }
	}
    }

return 0;

}

void
prlp (char *label, IA_Point<double>& p)
{
    cout << "IA_Point<double>: " << label << p <<  "\n";
}


void
prlp (char *label, IA_Point<int>& p)
{
    cout << "IA_Point<int>: " << label << p <<  "\n";
}


@


1.1
log
@Initial revision
@
text
@d3 1
a3 1
static char rcsid[] = "$Id: test044.c,v 1.4 1994/08/17 03:12:53 monica Exp $";
d7 15
a21 12
 * Revision 1.4  1994/08/17  03:12:53  monica
 * added return 0 to main
 *
 * Revision 1.3  1994/08/16  18:47:20  monica
 * added "Testing" output line
 *
 * Revision 1.2  1994/08/16  18:03:43  monica
 * changed include <DoublePoint.h> to include "test.h"
 *
 * Revision 1.1  1994/08/05  03:42:19  monica
 * Initial revision
 *
@
