Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

cryptix.test
Class Testlet  view Testlet download Testlet.java

java.lang.Object
  extended bycryptix.test.Testlet

public abstract class Testlet
extends java.lang.Object

Abstract superclass for all tests.


Field Summary
(package private)  java.util.Vector debug
           
(package private)  boolean fail
           
(package private)  java.lang.String globalname
           
private static char[] hexDigits
           
(package private)  int level
           
(package private)  long start
           
(package private)  java.lang.String testdatadir
           
(package private)  java.lang.String testname
           
 
Constructor Summary
Testlet(java.lang.String name)
           
 
Method Summary
 void beginTest(java.lang.String name)
           
 void debug(java.lang.String text)
           
static int fromDigit(char ch)
          Returns the number from 0 to 15 corresponding to the hex digit ch.
 java.lang.String getTestdatadir()
           
static boolean isEqual(byte[] a, byte[] b)
           
static byte[] parseHexString(java.lang.String hex)
           
 void passIf(boolean pass)
           
 boolean run()
           
 void setLevel(int level)
           
 void setTestdatadir(java.lang.String dir)
           
abstract  void test()
           
static java.lang.String toString(byte[] ba)
           
static java.lang.String toString(byte[] ba, int offset, int length)
          Returns a string of hexadecimal digits from a byte array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

level

int level

fail

boolean fail

debug

java.util.Vector debug

globalname

java.lang.String globalname

testname

java.lang.String testname

testdatadir

java.lang.String testdatadir

start

long start

hexDigits

private static final char[] hexDigits
Constructor Detail

Testlet

public Testlet(java.lang.String name)
Method Detail

setLevel

public void setLevel(int level)

setTestdatadir

public void setTestdatadir(java.lang.String dir)

getTestdatadir

public java.lang.String getTestdatadir()

test

public abstract void test()
                   throws java.lang.Exception

beginTest

public void beginTest(java.lang.String name)

debug

public void debug(java.lang.String text)

passIf

public void passIf(boolean pass)

run

public boolean run()

parseHexString

public static byte[] parseHexString(java.lang.String hex)

fromDigit

public static int fromDigit(char ch)
Returns the number from 0 to 15 corresponding to the hex digit ch.


toString

public static java.lang.String toString(byte[] ba)

toString

public static java.lang.String toString(byte[] ba,
                                        int offset,
                                        int length)
Returns a string of hexadecimal digits from a byte array. Each byte is converted to 2 hex symbols.

If offset and length are omitted, the whole array is used.


isEqual

public static boolean isEqual(byte[] a,
                              byte[] b)