head	1.4;
access
	monica
	thoth;
symbols
	Eglin_alpha_1:1.1;
locks; strict;
comment	@// @;


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

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

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

1.1
date	92.08.23.13.30.33;	author thoth;	state Exp;
branches;
next	;


desc
@CFrontified version
@


1.4
log
@removed include devfrags & any debugging calls to malloc
@
text
@// Emacs: -*- C++ -*-
static char rcsid[] = "$Id: test002.c,v 1.3 1994/10/06 01:07:08 monica Exp monica $";

// 
// $Log: test002.c,v $
// Revision 1.3  1994/10/06  01:07:08  monica
// updated for DOS file naming
//
// Revision 1.2  1994/08/17  04:12:11  monica
// added int main & return 0
//
// Revision 1.1  1992/08/23  13:30:33  thoth
// Initial revision
//
// 

#include "IntPoint.h"
#include "IntPS.h"
#include "PSIter.h"

#include "gen-test.h"

int main()
{
#if 1
    const int	x0=-17, x1=-10, x2=-8, x3=0, x4=4, x5=7, x6=10;
    const int	y0=-2, y1=4, y2=7, y3=12, y4=17, y5=20;
#else
    const int	x0=-4, x1=-4, x2=-2, x3=-1, x4=-1, x5=1, x6=1;
    const int	y0=-2, y1=-2, y2=0, y3=0, y4=2, y5=2;
#endif
    IA_Set<IA_Point<int> > ps0,ps1;

    ps0 = IA_Set<IA_Point<int> >(IA_Point<int>(y0), IA_Point<int>(y1));
    test_iter(ps0);
    ps1 = IA_Set<IA_Point<int> >(IA_Point<int>(y2), IA_Point<int>(y5));
    test_iter(ps1);
    ps0 = ps0 | ps1;
    test_iter(ps0);
    ps1 = IA_Set<IA_Point<int> >(IA_Point<int>(y2), IA_Point<int>(y3));
    test_iter(ps1);
    test_union(ps0, ps1, ps0|ps1);
    

    ps0 = IA_Set<IA_Point<int> >(IA_Point<int>(x5,y0), IA_Point<int>(x6,y5));
    test_iter(ps0);
    ps1 = IA_Set<IA_Point<int> >(IA_Point<int>(x0,y0), IA_Point<int>(x6,y1));
    test_iter(ps1);
    test_union(ps0, ps1, ps0|ps1);

    ps0 = ps0 | ps1;
    test_iter(ps0);
    printIntSet(ps0);
    ps1 = IA_Set<IA_Point<int> >(IA_Point<int>(x0,y5), IA_Point<int>(x1,y0));
    test_iter(ps1);
    test_union(ps0, ps1, ps0|ps1);

    ps0 = ps0 | ps1;
    test_iter(ps0);
    printIntSet(ps0);
    ps1 = IA_Set<IA_Point<int> >(IA_Point<int>(x4,y4), IA_Point<int>(x0,y5));
    test_iter(ps1);
    test_union(ps0, ps1, ps0|ps1);

    ps0 = ps0 | ps1;
    test_iter(ps0);
    printIntSet(ps0);
    ps1 = IA_Set<IA_Point<int> >(IA_Point<int>(x4,y4), IA_Point<int>(x0,y5));
    test_iter(ps1);
    test_union(ps0, ps1, ps0|ps1);

    ps0 = ps0 | ps1;
    test_iter(ps0);
    printIntSet(ps0);
    ps1 = IA_Set<IA_Point<int> >(IA_Point<int>(x4,y4), IA_Point<int>(x3,y2));
    test_iter(ps1);
    test_union(ps0, ps1, ps0|ps1);

    ps0 = ps0 | ps1;
    test_iter(ps0);
    printIntSet(ps0);
    ps1 = IA_Set<IA_Point<int> >(IA_Point<int>(x2,y3), IA_Point<int>(x4,y2));
    test_iter(ps1);
    test_union(ps0, ps1, ps0|ps1);

    ps0 = ps0 | ps1;
    test_iter(ps0);
    cout << ps0.contains(IA_Point<int>(-1,1));
    printIntSet(ps0);

    return 0;

}
@


1.3
log
@updated for DOS file naming
@
text
@d2 1
a2 1
static char rcsid[] = "$Id: test002.c,v 1.2 1994/08/17 04:12:11 monica Exp monica $";
d6 3
a16 1
#include "devfrags.h"
a32 2

    malloc_debug(2);
@


1.2
log
@added int main & return 0
@
text
@d2 1
a2 1
static char rcsid[] = "$Id: test002.c,v 1.1 1992/08/23 13:30:33 thoth Exp monica $";
d6 3
d14 1
a14 1
#include "dev-frags.h"
d19 1
a19 1
#include "generic-tests.h"
@


1.1
log
@Initial revision
@
text
@d2 1
a2 1
static char rcsid[] = "$Id: test002.cc,v 1.3 92/08/20 11:16:30 thoth Exp $";
d5 4
a8 1
// $Log:	test002.cc,v $
d13 2
a14 2
#include "IntPointSet.h"
#include "IPSIter.h"
d18 1
a18 1
main()
d27 1
a27 1
    IntPointSet ps0,ps1;
d31 1
a31 1
    ps0 = IntPointSet(IntPoint(y0), IntPoint(y1));
d33 1
a33 1
    ps1 = IntPointSet(IntPoint(y2), IntPoint(y5));
d37 1
a37 1
    ps1 = IntPointSet(IntPoint(y2), IntPoint(y3));
d42 1
a42 1
    ps0 = IntPointSet(IntPoint(x5,y0), IntPoint(x6,y5));
d44 1
a44 1
    ps1 = IntPointSet(IntPoint(x0,y0), IntPoint(x6,y1));
d51 1
a51 1
    ps1 = IntPointSet(IntPoint(x0,y5), IntPoint(x1,y0));
d58 1
a58 1
    ps1 = IntPointSet(IntPoint(x4,y4), IntPoint(x0,y5));
d65 1
a65 1
    ps1 = IntPointSet(IntPoint(x4,y4), IntPoint(x0,y5));
d72 1
a72 1
    ps1 = IntPointSet(IntPoint(x4,y4), IntPoint(x3,y2));
d79 1
a79 1
    ps1 = IntPointSet(IntPoint(x2,y3), IntPoint(x4,y2));
d85 1
a85 1
    cout << ps0.contains(IntPoint(-1,1));
d87 3
@
