Exemple #1
0
 /**
  * testing leaf
  *
  * @author Sam Whitlock (cs61b-eo)
  * @param void
  * @return void
  */
 @Test
 public void leafTest1() {
   QuadPoint qp = new QuadPoint(13, 19);
   Leaf<QuadTree.QuadPoint> myPt = new Leaf<QuadTree.QuadPoint>(qp, null, null);
   assertTrue(myPt.x() == 13);
   assertTrue(myPt.y() == 19);
   assertEquals(qp, myPt.leaf);
   LeafNode<QuadPoint> lfnd = new LeafNode<QuadPoint>(null, null, 0, 0, 100, 100);
   myPt.parent = lfnd;
   assertEquals(myPt.parent = lfnd);
   QuadTree<QuadPoint> tree = new QuadTree<QuadPoint>(0, 0, 100, 100, .01);
   myPt.tree = tree;
   assertEquals(myPt.tree, tree);
 }