flowValue() is reset to deal with excess[t].
3 #include "test_tools.h"
10 cout << "Testing classes xy and boundingbox." << endl;
19 check(seged.x==4 && seged.y==6, "Wrong vector addition");
22 check(seged.x==-2 && seged.y==-2, "a-b");
24 check(a.normSquare()==5,"Wrong norm calculation");
25 check(a*b==11, "a*b");
29 check(seged.x==2 && seged.y==4, "a*l");
32 check(seged.x==1 && seged.y==2, "b/l");
34 typedef BoundingBox<int> BB;
36 check(doboz1.empty(), "empty? Should be.");
39 check(!doboz1.empty(), "empty? Should not be.");
42 check(doboz1.bottomLeft().x==1 &&
43 doboz1.bottomLeft().y==2 &&
44 doboz1.topRight().x==3 &&
45 doboz1.topRight().y==4,
46 "added points to box");
49 check(doboz1.inside(seged),"Inside? It should be.");
52 check(doboz1.inside(seged),"Inside? It should be.");
55 check(!doboz1.inside(seged),"Inside? It should not be.");
58 check(!doboz2.empty(),
59 "empty? Should not be. Constructed from 1 point.");
62 check(doboz2.inside(seged),
63 "Not inside? It should be. Incremented a box with an other.");