Class TreeTest

java.lang.Object
  |
  +--TreeTest

class TreeTest
extends java.lang.Object

Unit test for the BinaryTree class


Nested Class Summary
private  class TreeTest.IntegerComparator
          An object to compare two Integer objects.
private  class TreeTest.OrderedVector
          An ordered version of the Vector object.
 
Constructor Summary
(package private) TreeTest()
           
 
Method Summary
private  boolean equals(java.lang.Object[] treeArray, TreeTest.OrderedVector ordVec)
           
static void main(java.lang.String[] argv)
           
private  void treeTest()
          Test that values in the BinaryTree object are ordered properly and that object delete works properly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeTest

TreeTest()
Method Detail

equals

private boolean equals(java.lang.Object[] treeArray,
                       TreeTest.OrderedVector ordVec)

treeTest

private void treeTest()
Test that values in the BinaryTree object are ordered properly and that object delete works properly. This test builds an ordered Vector which mirrors the ordered contents of the binary tree. Elements are removed from the tree and from the ordered vector. A check is then made that both the ordered vector and the contents of the tree are the same. This is a test, so no thought is given to efficiency.


main

public static void main(java.lang.String[] argv)