'make doc' is now working also in case of external build.
3 * This file is a part of LEMON, a generic C++ optimization library
5 * Copyright (C) 2003-2006
6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
7 * (Egervary Research Group on Combinatorial Optimization, EGRES).
9 * Permission to use, modify and distribute this software is granted
10 * provided that this copyright notice appears in all copies. For
11 * precise terms see the accompanying LICENSE file.
13 * This software is provided "AS IS" with no warranty of any kind,
14 * express or implied, and with no claim as to its suitability for any
21 #include "test_tools.h"
24 using namespace lemon;
28 cout << "Testing classes `xy' and `boundingbox'." << endl;
37 check(seged.x==4 && seged.y==6, "Wrong vector addition");
40 check(seged.x==-2 && seged.y==-2, "a-b");
42 check(a.normSquare()==5,"Wrong norm calculation");
43 check(a*b==11, "a*b");
47 check(seged.x==2 && seged.y==4, "a*l");
50 check(seged.x==1 && seged.y==2, "b/l");
52 typedef BoundingBox<int> BB;
54 check(doboz1.empty(), "It should be empty.");
57 check(!doboz1.empty(), "It should not be empty.");
60 check(doboz1.bottomLeft().x==1 &&
61 doboz1.bottomLeft().y==2 &&
62 doboz1.topRight().x==3 &&
63 doboz1.topRight().y==4,
64 "added points to box");
67 check(doboz1.inside(seged),"It should be inside.");
70 check(doboz1.inside(seged),"It should be inside.");
73 check(!doboz1.inside(seged),"It should not be inside.");
76 check(!doboz2.empty(),
77 "It should not be empty. Constructed from 1 point.");
80 check(doboz2.inside(seged),
81 "It should be inside. Incremented a box with another one.");