All Packages  This Package  Class Hierarchy  Class Search  Index

Class edu.utah.janos.tests.nodeos.BufferHandleTester
java.lang.Object
   |
   +----edu.utah.janos.tests.Tester
           |
           +----edu.utah.janos.tests.nodeos.BufferHandleTester

  Summary

public class  BufferHandleTester
     extends edu.utah.janos.tests.Tester
{
          // Constructors 1
     public BufferHandleTester();

          // Methods 4
     private boolean cmpByteArray(byte[], int, byte[]);
     private byte[] genByteArray(int);
     private int listCount(BufferHandle);
     public void testUnit() throws TestFailedException;
}




  Constructors

· BufferHandleTester

Summary  |  Top

   public BufferHandleTester() 

Default constructor



  Methods

· genByteArray

Summary  |  Top
   private byte[] genByteArray(int length) 

Generate some random byte array for testing

Parameter Description
length The length of the byte array to construct

Returns:
The a byte array of the given length with random element values


· cmpByteArray

Summary  |  Top
   private boolean cmpByteArray(byte[] ba1, 
                                int offset, 
                                byte[] ba2) 

Compare a byte array against a subsection of another one

Parameter Description
ba1 The subarray to test for
offset The offset into the larger byte array
ba2 The super byte array

Returns:
True if the subarray matched the section in the larger array


· listCount

Summary  |  Top
   private int listCount(BufferHandle list) 

Count the number of BufferHandles in the given list

Parameter Description
list A BufferHandle node that is in a circularly linked list

Returns:
The number of BufferHandles in the list


· testUnit

Summary  |  Top
   public void testUnit()  throws TestFailedException
Overrides:
testUnit in class Tester


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7