* This file is a part of LEMON, a generic C++ optimization library
* Copyright (C) 2003-2007
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
* (Egervary Research Group on Combinatorial Optimization, EGRES).
* Permission to use, modify and distribute this software is granted
* provided that this copyright notice appears in all copies. For
* precise terms see the accompanying LICENSE file.
* This software is provided "AS IS" with no warranty of any kind,
* express or implied, and with no claim as to its suitability for any
cout << "Testing classes 'dim2::Point' and 'dim2::BoundingBox'." << endl;
typedef dim2::Point<int> Point;
check(p.size()==2, "Wrong vector initialization.");
check(a[0]==1 && a[1]==2, "Wrong vector initialization.");
check(p.x==4 && p.y==6, "Wrong vector addition.");
check(p.x==-2 && p.y==-2, "Wrong vector subtraction.");
check(a.normSquare()==5,"Wrong vector norm calculation.");
check(a*b==11, "Wrong vector scalar product.");
check(p.x==2 && p.y==4, "Wrong vector multiplication by a scalar.");
check(p.x==1 && p.y==2, "Wrong vector division by a scalar.");
typedef dim2::BoundingBox<int> BB;
check(box1.empty(), "It should be empty.");
check(!box1.empty(), "It should not be empty.");
check(box1.bottomLeft().x==1 &&
box1.bottomLeft().y==2 &&
"Wrong addition of points to box.");
check(box1.inside(p), "It should be inside.");
check(box1.inside(p), "It should be inside.");
check(!box1.inside(p), "It should not be inside.");
"It should not be empty. Constructed from 1 point.");
"It should be inside. Incremented a box with another one.");