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

Quick Search    Search Deep

org.jxcl.jxunit.cover.stmt
Class TestStmtCoverage  view TestStmtCoverage download TestStmtCoverage.java

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.jxcl.jxunit.cover.stmt.TestStmtCoverage
All Implemented Interfaces:
junit.framework.Test

public class TestStmtCoverage
extends junit.framework.TestCase

This is derived from org.jxcl.cl.TestTransformer; it instruments the test-data classes and the classes synthesized by ClassFactory. All of the instrumented classes are run and checked to see that they produce normal output, despite the instrumentation ;-)


Field Summary
private  org.jxcl.cl.ControlFlowGraph cfg
           
private  java.net.URL[] cp
          Classpath.
private  java.lang.String[] delegating
           
private  java.lang.String[] exclude
           
private  org.jxcl.cl.MethodXformer hdumper
           
private  org.jxcl.cl.MethodXformer idumper
           
private  java.lang.String[] include
           
private  org.jxcl.cl.JXClassLoader jxLoader
           
private  org.jxcl.cl.GraphXformer spy
           
private  StmtRegistry stmtReg
           
private  org.jxcl.cl.GraphXformer talker
           
private  org.jxcl.cl.GraphXformer talker2
           
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
TestStmtCoverage(java.lang.String name)
           
 
Method Summary
private  void checkInstrumentation(java.lang.Object rt)
          Check that the class has been properly instrumented by org.jxcl.jxunit.cover.stmt.
private  org.jxcl.cl.RunTest loadAsRunTest(java.lang.String name)
           
 void setUp()
          Sets up the fixture, for example, open a network connection.
 void testFinally()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cfg

private org.jxcl.cl.ControlFlowGraph cfg

cp

private java.net.URL[] cp
Classpath.


delegating

private java.lang.String[] delegating

include

private java.lang.String[] include

exclude

private java.lang.String[] exclude

spy

private org.jxcl.cl.GraphXformer spy

talker

private org.jxcl.cl.GraphXformer talker

talker2

private org.jxcl.cl.GraphXformer talker2

hdumper

private org.jxcl.cl.MethodXformer hdumper

idumper

private org.jxcl.cl.MethodXformer idumper

stmtReg

private StmtRegistry stmtReg

jxLoader

private org.jxcl.cl.JXClassLoader jxLoader
Constructor Detail

TestStmtCoverage

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

setUp

public void setUp()
Description copied from class: junit.framework.TestCase
Sets up the fixture, for example, open a network connection. This method is called before a test is executed.


loadAsRunTest

private org.jxcl.cl.RunTest loadAsRunTest(java.lang.String name)

checkInstrumentation

private void checkInstrumentation(java.lang.Object rt)
Check that the class has been properly instrumented by org.jxcl.jxunit.cover.stmt. At the moment this means only that the hitcount array, public static int[] z$$z is one of the class's fields. We also check that it has NOT been initialized, although we will eventually make sure that it has been.


testFinally

public void testFinally()