Changes in test/dim_test.cc [253:dbe309b5e855:242:dbe3fc9c875d] in lemon-main
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/dim_test.cc
r253 r242 51 51 check(p.x==1 && p.y==2, "Wrong dim2::Point division by a scalar."); 52 52 53 typedef dim2::Bo x<int> Box;54 B oxbox1;55 check(box1.empty(), "Wrong empty() in dim2::Bo x.");53 typedef dim2::BoundingBox<int> BB; 54 BB box1; 55 check(box1.empty(), "Wrong empty() in dim2::BoundingBox."); 56 56 57 57 box1.add(a); 58 check(!box1.empty(), "Wrong empty() in dim2::Bo x.");58 check(!box1.empty(), "Wrong empty() in dim2::BoundingBox."); 59 59 box1.add(b); 60 60 61 61 check(box1.left()==1 && box1.bottom()==2 && 62 62 box1.right()==3 && box1.top()==4, 63 "Wrong addition of points to dim2::Bo x.");63 "Wrong addition of points to dim2::BoundingBox."); 64 64 65 check(box1.inside(Point(2,3)), "Wrong inside() in dim2::Bo x.");66 check(box1.inside(Point(1,3)), "Wrong inside() in dim2::Bo x.");67 check(!box1.inside(Point(0,3)), "Wrong inside() in dim2::Bo x.");65 check(box1.inside(Point(2,3)), "Wrong inside() in dim2::BoundingBox."); 66 check(box1.inside(Point(1,3)), "Wrong inside() in dim2::BoundingBox."); 67 check(!box1.inside(Point(0,3)), "Wrong inside() in dim2::BoundingBox."); 68 68 69 B oxbox2(Point(2,2));70 check(!box2.empty(), "Wrong empty() in dim2::Bo x.");71 69 BB box2(Point(2,2)); 70 check(!box2.empty(), "Wrong empty() in dim2::BoundingBox."); 71 72 72 box2.bottomLeft(Point(2,0)); 73 73 box2.topRight(Point(5,3)); 74 B oxbox3 = box1 & box2;74 BB box3 = box1 & box2; 75 75 check(!box3.empty() && 76 box3.left()==2 && box3.bottom()==2 && 76 box3.left()==2 && box3.bottom()==2 && 77 77 box3.right()==3 && box3.top()==3, 78 "Wrong intersection of two dim2::Bo x objects.");79 78 "Wrong intersection of two dim2::BoundingBox objects."); 79 80 80 box1.add(box2); 81 81 check(!box1.empty() && 82 82 box1.left()==1 && box1.bottom()==0 && 83 83 box1.right()==5 && box1.top()==4, 84 "Wrong addition of two dim2::Bo x objects.");84 "Wrong addition of two dim2::BoundingBox objects."); 85 85 86 86 return 0;
Note: See TracChangeset
for help on using the changeset viewer.