head     1.3;
branch   ;
access   ;
symbols  ;
locks    ; strict;
comment  @// @;


1.3
date     92.06.22.07.42.16;  author fischer;  state Exp;
branches ;
next     1.2;

1.2
date     92.06.12.06.13.31;  author fischer;  state Exp;
branches ;
next     1.1;

1.1
date     92.06.10.05.17.14;  author fischer;  state Exp;
branches ;
next     ;


desc
@@


1.3
log
@
@
text
@// Emacs: -*- C++ -*-

static char rcsid[] = "$Id: test3.cc,v 1.2 92/06/12 06:13:31 fischer Exp Locker: fischer $";

//
// $Log:	test3.cc,v $
// Revision 1.2  92/06/12  06:13:31  fischer
// *** empty log message ***
// 
// Revision 1.1  92/06/10  05:17:14  fischer
// Initial revision
// 
// 

#include <Point.h>


int main(int argc, char**argv)
{
    void	pr(Point);
    void	prl(char*, Point);
    void	prb(char);
    void	relational_test(Point, Point);
    
    Point	a(0,0), b(3,1), c, d;

    IA::exit_on_throw = 0;
    
    prl("a, ", a);
    prl("b, ", b);

    c=b(0,0);
    prl("c=b(0,0), ", c);

    d=b(1,0,1,0,1);
    prl("d=b(1,0,1,0,1), ", d);

    // test <, >, ==

    cout << "\nRelational tests...\n";
    relational_test(Point(0.5,1,2),Point(1,1,2));
    relational_test(Point(1.0,1,2),Point(1,1,2));


}

void
relational_test(Point a, Point b)
{
    void	prb(char);

    cout << "\n\n a\t " << a << "\t" << a.type();
    cout << "\n b\t " << b << "\t" << b.type();
    cout << "\n a<b\t" ; prb(a<b);
    cout << "\n a<=b\t" ; prb(a<=b);
    cout << "\n a==b\t" ; prb(a==b);
    cout << "\n a>=b\t" ; prb(a>=b);
    cout << "\n a>b\t" ; prb(a>b);
    cout << "\n\n";
}
void
pr (Point point)
{
    cout << point.type() << point << "\n";
}

void
prb (char boolean)
{
    if (boolean == 0)
	cout << "False";
    else
	cout << "True";
}
	    
    
void
prl (char* label, Point point)
{
    cout << label << point.type() << point << "\n";
}

@


1.2
log
@*** empty log message ***
@
text
@d3 1
a3 1
static char rcsid[] = "$Id: test3.cc,v 1.1 92/06/10 05:17:14 fischer Exp Locker: fischer $";
d7 3
d17 1
d22 4
a25 2
    Point	a(0,0), b(3,1), c, d, e;
    float       f;
d27 2
d37 8
a44 1
    
d48 14
d64 1
a64 4
    // overly verbose to check all major access functions.
    cout << "type: " << point.type() 
	 << "; dimensions: " << point.dimensions() 
	 << "; values: " << point << "\n";
d67 11
d80 1
a80 3
    cout << label << "type: " << point.type() 
	 << "; dimensions: " << point.dimensions() 
	 << "; values: " << point << "\n";
@


1.1
log
@Initial revision
@
text
@d3 1
a3 1
static char rcsid[] = "$Id$";
d6 3
a8 1
// $Log$
d10 1
d19 1
@
