gate.util
Class TestJdk

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--gate.util.TestJdk
All Implemented Interfaces:
junit.framework.Test

public class TestJdk
extends junit.framework.TestCase

Tests for the Jdk class and for GateClassLoader. The testReloading method reads a class from a .jar that is reached via a URL. This is called TestJdk.jar; to build it, do "make TestJdk.jar" in the build directory (the source for the class lives there, under "testpkg").


Field Summary
private static boolean DEBUG
          Debug flag
private  Jdk jdk
          Instance of the Jdk class
 
Fields inherited from class junit.framework.TestCase
fName
 
Constructor Summary
TestJdk(String name)
          Construction
 
Method Summary
static void main(String[] args)
           
 void setUp()
          Fixture set up
static junit.framework.Test suite()
          Test suite routine for the test runner
 void testCompiler()
          Jdk compiler
 void testCompiler2()
          Jdk compiler test 2.
 void testFinder()
          Jdk tool directory finder
 void testReloading()
          Test reloading of classes.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, name, run, run, runBare, runTest, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, fail, fail, failNotEquals, failNotSame
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

DEBUG

private static final boolean DEBUG
Debug flag

jdk

private Jdk jdk
Instance of the Jdk class
Constructor Detail

TestJdk

public TestJdk(String name)
Construction
Method Detail

setUp

public void setUp()
Fixture set up
Overrides:
setUp in class junit.framework.TestCase

testFinder

public void testFinder()
                throws Exception
Jdk tool directory finder

testCompiler

public void testCompiler()
                  throws GateException
Jdk compiler

testCompiler2

public void testCompiler2()
                   throws GateException
Jdk compiler test 2. Does nothing if it can't find the gate class files in the usual places.

testReloading

public void testReloading()
                   throws Exception
Test reloading of classes.

suite

public static junit.framework.Test suite()
Test suite routine for the test runner

main

public static void main(String[] args)