head     1.8;
branch   ;
access   ;
symbols  ;
locks    ; strict;
comment  @@;


1.8
date     92.07.01.13.46.13;  author thoth;  state Exp;
branches ;
next     1.7;

1.7
date     92.06.22.13.59.34;  author thoth;  state Exp;
branches ;
next     1.6;

1.6
date     92.06.22.07.41.31;  author fischer;  state Exp;
branches ;
next     1.5;

1.5
date     92.06.10.05.17.09;  author fischer;  state Exp;
branches ;
next     1.4;

1.4
date     92.06.08.02.54.39;  author fischer;  state Exp;
branches ;
next     1.3;

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

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

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


desc
@Test file for Poynt hacks.
@


1.8
log
@tested one of the SubPoint op=
@
text
@// This may look like C code, emacs, but it is really -*- C++ -*-

#include "Point.h"

int main(int argc, char**argv)
{
    void point_info(Point);

    Point	p(4,3,2), q(-2, 0, 3), r, s, t(-1.0, +2.3);

    IA::exit_on_throw = 0;

    cout  << "point p: ";
    point_info(p);

    cout << "point q: ";
    point_info(q);
    
    cout << "uninitialized point r: ";
    point_info (r);

    cout << "real point t[0]: " << t[0] << '\n';
    cout << "real point t: ";
    point_info (t);
        
    r = q+p;
    cout << "r=q+p: ";
    point_info(r);

    q = p;
    cout << "point q, q=p: ";
    point_info (q);

    r = -r;
    cout << "r=-r: ";
    point_info(r);
    
    r = r + 20;
    cout << "r=r+20: ";
    point_info(r);

    // bug!  q.type() is an integer.

    cout << "point q, q[1]=3.14 (this is a bug): ";
    q[1]=3.14;
    point_info (q);


    p = q = r;
    p = r * 1.0;

    cout << "p: ";    point_info(p);
    cout << "q: ";    point_info(q);

    if (p == q) 
	cout << "p==q: true\n";
    else
	cout << "p==q: false\n";
 
 
    if (p != q) 
	cout << "p!=q: true\n";
    else
	cout << "p!=q: false\n";
    
    if (p >= q) 
	cout << "p>=q: true\n";
    else
	cout << "p>=q: false\n";

    p = q = r;
    p = r * 1.0;
    q[1] -= 110;

    cout << "p: ";    point_info(p);
    cout << "q: ";    point_info(q);

    if (p == q) 
	cout << "p==q: true\n";
    else
	cout << "p==q: false\n";
 
 
    if (p != q) 
	cout << "p!=q: true\n";
    else
	cout << "p!=q: false\n";
    
    if (p >= q) 
	cout << "p>=q: true\n";
    else
	cout << "p>=q: false\n";

    p += 2;
    cout << "p+=2: ";
    point_info(p);

    cout << "p >= 400000.01: ";
    if (p >= 400000.01) 
	cout << "true\n";
    else
	cout << "false\n";
	    
    p -= p;   // zero it out


    p = Point(1,2,3);
    cout << "p++, initial value is: ";
    point_info(p);
    point_info(p++);
    point_info(p);
    
    p = Point(1,2,3);
    cout << "\n++p, initial value is: ";
    point_info(p);
    point_info(++p);
    point_info(p);

    q = Point(1,2,3);
    q += q;
    
    cout << "p: ";    point_info(p);
    cout << "q: ";    point_info(q);

    if (p == q) 
	cout << "p==q: true\n";
    else
	cout << "p==q: false\n";
 
 
    if (p != q) 
	cout << "p!=q: true\n";
    else
	cout << "p!=q: false\n";
    
    if (p >= q) 
	cout << "p>=q: true\n";
    else
	cout << "p>=q: false\n";
    
}

void
point_info (Point point)
{
    // overly verbose to check all major access functions.
    cout << "type: " << point.type() 
	 << "; dimensions: " << point.dimensions() 
	 << "; values: " << point << "\n";
}
@


1.7
log
@updated to follow new include conventions.
@
text
@d73 1
a73 1
    q[1] = q[1] - 110;
@


1.6
log
@munged to display problem with output of REAL point.
@
text
@d3 1
a3 1
#include <Point.h>
@


1.5
log
@*** empty log message ***
@
text
@d9 1
a9 1
    Point	p(4,3,2), q(-2, 0, 3), r, s;
d11 2
d22 4
d44 1
a45 1
    cout << "point q, q[1]=3.14 (this is a bug): ";
@


1.4
log
@*** empty log message ***
@
text
@d113 21
@


1.3
log
@*** empty log message ***
@
text
@d100 14
@


1.2
log
@*** empty log message ***
@
text
@d1 1
a1 1
#include <Poynt.h>
d3 2
d7 1
a7 1
    void point_info(Poynt);
d9 1
a9 1
    Poynt	p(4,3,2), q(-2, 0, 3), r, s;
d103 1
a103 1
point_info (Poynt point)
@


1.1
log
@Initial revision
@
text
@a95 1

a96 15

    if (!p)
	cout << "!p true, p: ";
    else
	cout << "!p false, p: ";
    point_info(p);

    p = q * 42.3;

    if (!p)
	cout << "!p true, p: ";
    else
	cout << "!p false, p: ";
    point_info(p);

@
