Class ListSearchTest

java.lang.Object
  |
  +--ListSearchTest

public class ListSearchTest
extends java.lang.Object

Class ListSearchTest illustrates the use of the two methods defined in the companion ListSearch class.


Field Summary
protected static ListSearch search
          Class to be tested
 
Constructor Summary
ListSearchTest()
           
 
Method Summary
static void main(java.lang.String[] args)
          Allocate a ListSearch class and call its methods with some test data.
protected static void testMethods(java.lang.Object[] list, int size)
          Test both methods by searching for each element in the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

search

protected static ListSearch search
Class to be tested
Constructor Detail

ListSearchTest

public ListSearchTest()
Method Detail

main

public static void main(java.lang.String[] args)
Allocate a ListSearch class and call its methods with some test data. The data are sorted arrays of sizes 0 through 17. The methods are also tested on a list not containing the searched-for element.

testMethods

protected static void testMethods(java.lang.Object[] list,
                                  int size)
Test both methods by searching for each element in the list. Then test by searching for an element above and below the bottom and top boundaries, and at four evenly distributed points in the body of the list.