COIN-OR::LEMON - Graph Library

Changeset 253:dbe309b5e855 in lemon-1.2 for test/dim_test.cc


Ignore:
Timestamp:
08/30/08 22:19:43 (11 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Rename BoundingBox? to Box (ticket #126)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/dim_test.cc

    r242 r253  
    5151  check(p.x==1 && p.y==2, "Wrong dim2::Point division by a scalar.");
    5252
    53   typedef dim2::BoundingBox<int> BB;
    54   BB box1;
    55   check(box1.empty(), "Wrong empty() in dim2::BoundingBox.");
     53  typedef dim2::Box<int> Box;
     54  Box box1;
     55  check(box1.empty(), "Wrong empty() in dim2::Box.");
    5656
    5757  box1.add(a);
    58   check(!box1.empty(), "Wrong empty() in dim2::BoundingBox.");
     58  check(!box1.empty(), "Wrong empty() in dim2::Box.");
    5959  box1.add(b);
    6060
    6161  check(box1.left()==1 && box1.bottom()==2 &&
    6262        box1.right()==3 && box1.top()==4,
    63         "Wrong addition of points to dim2::BoundingBox.");
     63        "Wrong addition of points to dim2::Box.");
    6464
    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.");
     65  check(box1.inside(Point(2,3)), "Wrong inside() in dim2::Box.");
     66  check(box1.inside(Point(1,3)), "Wrong inside() in dim2::Box.");
     67  check(!box1.inside(Point(0,3)), "Wrong inside() in dim2::Box.");
    6868
    69   BB box2(Point(2,2));
    70   check(!box2.empty(), "Wrong empty() in dim2::BoundingBox.");
    71  
     69  Box box2(Point(2,2));
     70  check(!box2.empty(), "Wrong empty() in dim2::Box.");
     71
    7272  box2.bottomLeft(Point(2,0));
    7373  box2.topRight(Point(5,3));
    74   BB box3 = box1 & box2;
     74  Box box3 = box1 & box2;
    7575  check(!box3.empty() &&
    76         box3.left()==2 && box3.bottom()==2 && 
     76        box3.left()==2 && box3.bottom()==2 &&
    7777        box3.right()==3 && box3.top()==3,
    78         "Wrong intersection of two dim2::BoundingBox objects.");
    79  
     78        "Wrong intersection of two dim2::Box objects.");
     79
    8080  box1.add(box2);
    8181  check(!box1.empty() &&
    8282        box1.left()==1 && box1.bottom()==0 &&
    8383        box1.right()==5 && box1.top()==4,
    84         "Wrong addition of two dim2::BoundingBox objects.");
     84        "Wrong addition of two dim2::Box objects.");
    8585
    8686  return 0;
Note: See TracChangeset for help on using the changeset viewer.