A Test Suite IV

 [Previous Chapter]  [Previous Page]  [Contents]  [Next Page]  [Next Chapter]

ArrayedStackTester.java
/**
 * Run the test suite on stacks of different sizes.
 *
 * @param minSize   minimal stack size.
 * @param maxSize   maximal stack size.
 */
public void runTestSuite(int minSize, int maxSize) {
   for (int size = minSize; size <= maxSize; ++size) {
      testEmptyStack(size);
      for (int numberOfObjects = 1;
            numberOfObjects <= size;
            ++numberOfObjects) {
         testStorage(size, numberOfObjects);
      }
   }
}

/**
 * Retrieve the test protocol as string.
 *
 * @return test protocol.
 */
public String toString() {
   return protocol.toString();
}

 [Previous Chapter]  [Previous Page]  [Contents]  [Next Page]  [Next Chapter]
Copyright © 2001, 2002 Andreas Borchert, converted to HTML on February 11, 2002