commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcu...@apache.org
Subject svn commit: r367531 [1/2] - in /jakarta/commons/sandbox/javaflow/trunk: ./ src/test/org/apache/commons/javaflow/ src/test/org/apache/commons/javaflow/bytecode/transformation/ src/test/org/apache/commons/javaflow/bytecode/transformation/asm/ src/test/or...
Date Tue, 10 Jan 2006 09:16:34 GMT
Author: tcurdt
Date: Tue Jan 10 01:15:39 2006
New Revision: 367531

URL: http://svn.apache.org/viewcvs?rev=367531&view=rev
Log:
some tests are still failing but at least both implementations share the same test code now

Added:
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/AbstractClassTransformerClassLoader.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/AbstractTransformerTestCase.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/DefaultConstructorDump.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/Invoker.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/ResumeTestCase.java
      - copied, changed from r366393, jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/SimpleSerializableTestCase.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/SerializationTestCase.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/BcelClassTransformerClassLoader.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/BlackRedTestCase.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/ClassAccessTestCase.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/CounterTestCase.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/DefaultConstructorTestCase.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/InvokerTestCase.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/NewObjectTestCase.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/NoReferenceTestCase.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/ResumeTestCase.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/SerializationTestCase.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/SimpleTestCase.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/StackTestCase.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/
      - copied from r366393, jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/BlackRed.java
      - copied, changed from r367530, jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/BlackRed.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/ClassAccess1.java
      - copied, changed from r367530, jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/ClassAccess1.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/ClassAccess2.java
      - copied, changed from r367530, jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/ClassAccess2.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/ClassAccess3.java
      - copied, changed from r367530, jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/ClassAccess3.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/CounterFlow.java
      - copied, changed from r367530, jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/CounterFlow.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/DefaultConstructor.java
      - copied, changed from r367530, jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/DefaultConstructor.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/NewObject.java
      - copied, changed from r367530, jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/NewObject.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/NoReference.java
      - copied, changed from r367530, jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/NoReference.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/NullVariableMethodFlow.java
      - copied, changed from r366393, jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/flow/NullVariableMethodFlow.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/Simple.java
      - copied, changed from r367530, jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/Simple.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/SimpleSerializable.java
      - copied, changed from r367530, jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/SimpleSerializable.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/Stack.java
      - copied, changed from r367530, jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/Stack.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/tests/
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/tests/AbstractBlackRedTestCase.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/tests/AbstractClassAccessTestCase.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/tests/AbstractCounterTestCase.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/tests/AbstractDefaultConstructorTestCase.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/tests/AbstractInvokerTestCase.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/tests/AbstractNewObjectTestCase.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/tests/AbstractNoReferenceTestCase.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/tests/AbstractResumeTestCase.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/tests/AbstractSerializationTestCase.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/tests/AbstractSimpleTestCase.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/tests/AbstractStackTestCase.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/tests/RewritingTestCase.java   (with props)
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/tests/UsageTestCase.java   (with props)
Removed:
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/AbstractTestCase.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/RewritingTestCase.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/SerializationTestCase.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/SuspendResumeTestCase.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/TestClassLoader.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/UsageTestCase.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/ClassAccess2TestClass.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/DefaultConstructorDump.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/SimpleSerializableTestCase.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/TransformerTestCase.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/Invoker.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/flow/BlackRedFlow.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/flow/ClassAccessBugFlow.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/flow/CounterFlow.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/flow/FinallyFlow.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/flow/Invoker.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/flow/NewObjectFlow.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/flow/NoReferenceBugFlow.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/flow/NullVariableMethodFlow.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/flow/SimpleFlow.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/flow/SimpleSerializableFlow.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/flow/StackBugFlow.java
Modified:
    jakarta/commons/sandbox/javaflow/trunk/maven.xml
    jakarta/commons/sandbox/javaflow/trunk/project.xml
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/AsmClassTransformerClassLoader.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/BlackRedTestCase.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/ClassAccessTestCase.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/CounterTestCase.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/DefaultConstructorTestCase.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/InvokerTestCase.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/NewObjectTestCase.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/NoReferenceTestCase.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/SimpleTestCase.java
    jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/StackTestCase.java

Modified: jakarta/commons/sandbox/javaflow/trunk/maven.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/maven.xml?rev=367531&r1=367530&r2=367531&view=diff
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/maven.xml (original)
+++ jakarta/commons/sandbox/javaflow/trunk/maven.xml Tue Jan 10 01:15:39 2006
@@ -5,6 +5,7 @@
   xmlns:ant="jelly:ant"
   >
 
+<!--
   <postGoal name="test:compile">
 
     <ant:path id="rewrite.classpath">
@@ -21,19 +22,10 @@
         mode="${test.transformer}">
       <include name="org/apache/commons/javaflow/bytecode/transformation/asm/data/**"/>
       <include name="org/apache/commons/javaflow/flow/**"/>
-<!--
-      <include name="org.apache.commons.javaflow.bytecode.transformation.asm.data.**"/>
-      <include name="org.apache.commons.javaflow.flow.**"/>
-      <includes>
-        <include>org.apache.commons.javaflow.bytecode.transformation.asm.data.**</include>
-        <include>org/apache/commons/javaflow/bytecode/transformation/asm/data/**</include>
-        <include>org.apache.commons.javaflow.flow.**</include>
-        <include>org/apache/commons/javaflow/flow/**</include>
-      </includes>
--->          
     </rewrite>
 
   </postGoal>
+-->          
 
 </project>
 

Modified: jakarta/commons/sandbox/javaflow/trunk/project.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/project.xml?rev=367531&r1=367530&r2=367531&view=diff
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/project.xml (original)
+++ jakarta/commons/sandbox/javaflow/trunk/project.xml Tue Jan 10 01:15:39 2006
@@ -37,11 +37,11 @@
   </organization>
 
   <licenses>
-	<license>
-    	<name>The Apache Software License, Version 2.0</name>
-    	<url>/LICENSE.txt</url>
-    	<distribution>repo</distribution>
-	</license>
+    <license>
+    <name>The Apache Software License, Version 2.0</name>
+    <url>/LICENSE.txt</url>
+    <distribution>repo</distribution>
+    </license>
   </licenses>
   
   <gumpRepositoryId>jakarta</gumpRepositoryId>
@@ -100,12 +100,14 @@
   </contributors>
 
   <dependencies>
-    <!-- runtime dependencies -->
-    <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging-api</artifactId>
-      <version>1.0.4</version>
-    </dependency>
+   <dependency> 
+     <groupId>maven</groupId> 
+     <artifactId>maven-xdoc-plugin</artifactId> 
+     <version>1.9.2</version> 
+     <url>http://maven.apache.org/reference/plugins/xdoc</url> 
+     <type>plugin</type> 
+   </dependency>
+ 
     <dependency>
       <groupId>commons-logging</groupId>
       <artifactId>commons-logging</artifactId>
@@ -119,21 +121,12 @@
       <type>jar</type>
     </dependency>
     <dependency>
-      <groupId>asm</groupId>
-      <artifactId>asm-all</artifactId>
-      <version>2.2.1</version>
-      <jar>${basedir}/lib/asm-all-2.2.1.jar</jar>
-      <type>jar</type>
-    </dependency>
-    <!-- optional runtime dependency -->
-    <dependency>
       <groupId>commons-jci</groupId>
       <artifactId>commons-jci</artifactId>
       <version>r291284</version>
       <jar>${basedir}/lib/commons-jci-r291284.jar</jar>
       <type>jar</type>
     </dependency>
-    <!-- build/test dependencies -->
     <dependency>
       <groupId>ant</groupId>
       <artifactId>ant</artifactId>
@@ -154,6 +147,23 @@
       <artifactId>xstream</artifactId>
       <version>1.1</version>
     </dependency>
+    <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging-api</artifactId>
+      <version>1.0.4</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+      <version>20050621.133116</version>
+    </dependency>
+    <dependency>
+      <groupId>asm</groupId>
+      <artifactId>asm-all</artifactId>
+      <version>2.2.1</version>
+      <jar>${basedir}/lib/asm-all-2.2.1.jar</jar>
+      <type>jar</type>
+    </dependency>
   </dependencies>
 
   <build>
@@ -186,9 +196,9 @@
     <report>maven-file-activity-plugin</report>
     <report>maven-javadoc-plugin</report>
     <report>maven-junit-report-plugin</report>
-    <!--
+<!--
     <report>maven-jcoverage-plugin</report>
-    -->
+-->
     <report>maven-jxr-plugin</report>
     <report>maven-linkcheck-plugin</report>
   </reports>

Added: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/AbstractClassTransformerClassLoader.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/AbstractClassTransformerClassLoader.java?rev=367531&view=auto
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/AbstractClassTransformerClassLoader.java (added)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/AbstractClassTransformerClassLoader.java Tue Jan 10 01:15:39 2006
@@ -0,0 +1,58 @@
+package org.apache.commons.javaflow.bytecode.transformation;
+
+import java.io.IOException;
+import java.io.InputStream;
+import org.apache.commons.io.IOUtils;
+import org.objectweb.asm.ClassReader;
+
+public abstract class AbstractClassTransformerClassLoader extends ClassLoader {
+
+    private final ResourceTransformer transformer;
+    private final String prefix;
+    private final ClassLoader classloader;
+
+
+    public AbstractClassTransformerClassLoader(final String pPrefix, final ResourceTransformer pTransformer) {
+        prefix = pPrefix;
+        transformer = pTransformer;
+        classloader = getClass().getClassLoader();
+    }
+
+    protected byte[] transform( final InputStream pClassStream ) throws IOException {
+        return transformer.transform(IOUtils.toByteArray(pClassStream));
+    }
+
+    public Class loadClass( final String name ) throws ClassNotFoundException {
+        if (name.startsWith("org.apache.commons.javaflow.bytecode.transformation.")) {
+            //System.err.println("Loading: " + name);
+            try {
+                final InputStream is = getClass().getResourceAsStream(
+                        "/" + name.replace('.', '/') + ".class");
+                byte[] bytecode;
+                if (name.startsWith("org.apache.commons.javaflow.bytecode.transformation.data.")) {
+                    //System.err.println("Instrumenting: " + name);
+                    // bytecode = DefaultConstructorDump.dump();
+                    bytecode = transform(is);
+                    /*
+                     * FileOutputStream os = new FileOutputStream(name+".class");
+                     * os.write(bytecode); os.flush(); os.close();
+                     */
+                    // CheckClassAdapter.verify(new ClassReader(bytecode), true);
+                } else {
+                    ClassReader cr = new ClassReader(is);
+                    bytecode = cr.b;
+                }
+                return super.defineClass(name, bytecode, 0, bytecode.length);
+                // } catch( Error ex) {
+                // new ClassReader(bytecode).accept(new TraceClassVisitor(new
+                // PrintWriter(System.err)), false);
+                // throw ex;
+            } catch (Throwable ex) {
+                System.err.println("Load error: " + ex.toString());
+                ex.printStackTrace();
+                throw new ClassNotFoundException(name + " " + ex.getMessage(), ex);
+            }
+        }
+        return classloader.loadClass(name);
+    }
+}

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/AbstractClassTransformerClassLoader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/AbstractClassTransformerClassLoader.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/AbstractTransformerTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/AbstractTransformerTestCase.java?rev=367531&view=auto
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/AbstractTransformerTestCase.java (added)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/AbstractTransformerTestCase.java Tue Jan 10 01:15:39 2006
@@ -0,0 +1,49 @@
+package org.apache.commons.javaflow.bytecode.transformation;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import junit.framework.TestCase;
+import org.apache.commons.javaflow.bytecode.transformation.asm.AsmClassTransformer;
+import org.apache.commons.javaflow.bytecode.transformation.bcel.BcelClassTransformer;
+import org.objectweb.asm.ClassReader;
+import org.objectweb.asm.util.CheckClassAdapter;
+import org.objectweb.asm.util.TraceClassVisitor;
+
+
+public abstract class AbstractTransformerTestCase extends TestCase {
+
+    protected void assertSameTransformation( final String pClazzName ) throws IOException {
+        final InputStream is = getStream(pClazzName);
+        final ClassReader cr = new ClassReader(is);
+        
+        final AsmClassTransformer t1 = new AsmClassTransformer();
+        final BcelClassTransformer t2 = new BcelClassTransformer();
+        
+        final byte[] bytecode = t1.transform(cr.b);
+        CheckClassAdapter.verify(new ClassReader(bytecode), true);
+
+        final StringWriter sw1 = new StringWriter();
+        new ClassReader(bytecode).accept(new TraceClassVisitor(new PrintWriter(sw1)), false);
+
+        final StringWriter sw2 = new StringWriter();
+        new ClassReader(t2.transform(cr.b)).accept(new TraceClassVisitor(new PrintWriter(sw2)), false);
+        
+        assertEquals(sw2.toString(), sw1.toString());
+    }
+    
+  protected void runTest() throws Throwable {
+    try {
+      super.runTest();
+      
+    } catch( Throwable e) {
+        throw e;
+    }
+  }
+
+  private InputStream getStream( String name) {
+    return getClass().getResourceAsStream("/" + name.replace( '.', '/') + ".class");
+  }
+
+}

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/AbstractTransformerTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/AbstractTransformerTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/DefaultConstructorDump.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/DefaultConstructorDump.java?rev=367531&view=auto
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/DefaultConstructorDump.java (added)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/DefaultConstructorDump.java Tue Jan 10 01:15:39 2006
@@ -0,0 +1,107 @@
+package org.apache.commons.javaflow.bytecode.transformation;
+
+import org.objectweb.asm.AnnotationVisitor;
+import org.objectweb.asm.ClassWriter;
+import org.objectweb.asm.FieldVisitor;
+import org.objectweb.asm.Label;
+import org.objectweb.asm.MethodVisitor;
+import org.objectweb.asm.Opcodes;
+
+
+public class DefaultConstructorDump implements Opcodes {
+
+  public static byte[] dump() throws Exception {
+    FieldVisitor fv;
+    MethodVisitor mv;
+    AnnotationVisitor av0;
+
+    ClassWriter cw = new ClassWriter(true);
+    cw.visit( V1_2, ACC_PUBLIC + ACC_FINAL + ACC_SUPER, "org/apache/commons/javaflow/bytecode/transformation/asm/data/DefaultConstructor", null, "java/lang/Thread", null);
+
+    cw.visitSource( "DefaultConstructor.java", null);
+
+    {
+      mv = cw.visitMethod( ACC_PUBLIC, "<init>", "()V", null, null);
+      mv.visitCode();
+      
+      Label l0 = new Label();
+      mv.visitLabel( l0);
+      
+      mv.visitVarInsn( ALOAD, 0);
+      mv.visitMethodInsn( INVOKESPECIAL, "java/lang/Thread", "<init>", "()V");
+
+      mv.visitMethodInsn( INVOKESTATIC, "org/apache/commons/javaflow/bytecode/StackRecorder", "get", "()Lorg/apache/commons/javaflow/bytecode/StackRecorder;");
+      mv.visitInsn( DUP);
+      mv.visitVarInsn( ASTORE, 1);
+      Label l1 = new Label();
+      mv.visitJumpInsn( IFNULL, l1);
+      mv.visitVarInsn( ALOAD, 1);
+      mv.visitMethodInsn( INVOKEVIRTUAL, "org/apache/commons/javaflow/bytecode/StackRecorder", "isRestoring", "()Z");
+      mv.visitJumpInsn( IFEQ, l1);
+      mv.visitVarInsn( ALOAD, 1);
+      mv.visitMethodInsn( INVOKEVIRTUAL, "org/apache/commons/javaflow/bytecode/StackRecorder", "popInt", "()I");
+      Label l2 = new Label();
+      mv.visitTableSwitchInsn( 0, 0, l1, new Label[] { l2});
+      
+      mv.visitLabel( l2);
+      mv.visitLdcInsn( "restore locals");
+      mv.visitInsn( POP);
+      mv.visitVarInsn( ALOAD, 1);
+      mv.visitMethodInsn( INVOKEVIRTUAL, "org/apache/commons/javaflow/bytecode/StackRecorder", "popObject", "()Ljava/lang/Object;");
+      mv.visitTypeInsn( CHECKCAST, "org/apache/commons/javaflow/bytecode/transformation/asm/data/DefaultConstructor");
+      mv.visitVarInsn( ASTORE, 0);
+      mv.visitLdcInsn( "restore stack");
+      mv.visitInsn( POP);
+      mv.visitLdcInsn( "restore reference");
+      mv.visitInsn( POP);
+      mv.visitVarInsn( ALOAD, 1);
+      mv.visitMethodInsn( INVOKEVIRTUAL, "org/apache/commons/javaflow/bytecode/StackRecorder", "popReference", "()Ljava/lang/Object;");
+      mv.visitTypeInsn( CHECKCAST, "java/io/PrintStream");
+      mv.visitLdcInsn( "restore params");
+      mv.visitInsn( POP);
+      mv.visitInsn( ACONST_NULL);
+      mv.visitTypeInsn( CHECKCAST, "java/lang/String");
+      Label l3 = new Label();
+      mv.visitJumpInsn( GOTO, l3);
+      
+      mv.visitLabel( l1);
+      
+      mv.visitFieldInsn( GETSTATIC, "java/lang/System", "err", "Ljava/io/PrintStream;");
+      mv.visitLdcInsn( "aaa");
+      mv.visitLabel( l3);
+      mv.visitMethodInsn( INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V");
+      mv.visitVarInsn( ALOAD, 1);
+      Label l5 = new Label();
+      mv.visitJumpInsn( IFNULL, l5);
+      mv.visitVarInsn( ALOAD, 1);
+      mv.visitMethodInsn( INVOKEVIRTUAL, "org/apache/commons/javaflow/bytecode/StackRecorder", "isCapturing", "()Z");
+      mv.visitJumpInsn( IFEQ, l5);
+      mv.visitVarInsn( ALOAD, 1);
+      mv.visitVarInsn( ALOAD, 0);
+      mv.visitMethodInsn( INVOKEVIRTUAL, "org/apache/commons/javaflow/bytecode/StackRecorder", "pushReference",
+          "(Ljava/lang/Object;)V");
+      mv.visitVarInsn( ALOAD, 1);
+      mv.visitVarInsn( ALOAD, 0);
+      mv.visitMethodInsn( INVOKEVIRTUAL, "org/apache/commons/javaflow/bytecode/StackRecorder", "pushObject",
+          "(Ljava/lang/Object;)V");
+      mv.visitVarInsn( ALOAD, 1);
+      mv.visitIntInsn( BIPUSH, 0);
+      mv.visitMethodInsn( INVOKEVIRTUAL, "org/apache/commons/javaflow/bytecode/StackRecorder", "pushInt", "(I)V");
+      mv.visitInsn( RETURN);
+      
+      mv.visitLabel( l5);
+      mv.visitInsn( RETURN);
+      
+      Label l6 = new Label();
+      mv.visitLabel( l6);
+      mv.visitLocalVariable( "this", "Lorg/apache/commons/javaflow/bytecode/transformation/asm/data/DefaultConstructor;", null, l1, l6, 0);
+      mv.visitLocalVariable( "__stackRecorder", "Lorg/apache/commons/javaflow/bytecode/StackRecorder;", null, l0, l6, 1);
+      mv.visitMaxs( 2, 2);
+      mv.visitEnd();
+    }
+    cw.visitEnd();
+
+    return cw.toByteArray();
+  }
+}
+

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/DefaultConstructorDump.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/DefaultConstructorDump.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/Invoker.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/Invoker.java?rev=367531&view=auto
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/Invoker.java (added)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/Invoker.java Tue Jan 10 01:15:39 2006
@@ -0,0 +1,16 @@
+package org.apache.commons.javaflow.bytecode.transformation;
+
+
+public final class Invoker implements Runnable {
+
+    private Runnable runnable;
+    
+    public Invoker(Runnable runnable) {
+        this.runnable = runnable;
+    }
+    
+    public void run() {
+        runnable.run();
+    }
+    
+}

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/Invoker.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/Invoker.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/AsmClassTransformerClassLoader.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/AsmClassTransformerClassLoader.java?rev=367531&r1=367530&r2=367531&view=diff
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/AsmClassTransformerClassLoader.java (original)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/AsmClassTransformerClassLoader.java Tue Jan 10 01:15:39 2006
@@ -1,60 +1,13 @@
 
 package org.apache.commons.javaflow.bytecode.transformation.asm;
 
-import java.io.InputStream;
-import org.objectweb.asm.ClassReader;
+import org.apache.commons.javaflow.bytecode.transformation.AbstractClassTransformerClassLoader;
 
 
-public class AsmClassTransformerClassLoader extends ClassLoader {
-  private final AsmClassTransformer transformer = new AsmClassTransformer();
-//  private final BcelClassTransformer transformer = new BcelClassTransformer();
+public class AsmClassTransformerClassLoader extends AbstractClassTransformerClassLoader {
 
-  private final String prefix;
-  private final ClassLoader cl;
-
-
-  public AsmClassTransformerClassLoader(String prefix) {
-    this.prefix = prefix;
-    this.cl = getClass().getClassLoader();
-  }
-
-  public Class loadClass(String name) throws ClassNotFoundException {
-    if(name.startsWith(prefix)) {
-      System.err.println("Loading: " + name);
-      try {
-        InputStream is = getClass().getResourceAsStream("/" + name.replace( '.', '/') + ".class");
-        byte[] bytecode;
-        if(name.startsWith(prefix+".data")) {
-          // bytecode = DefaultConstructorDump.dump();
-          bytecode = transformer.transform(is);
-          
-          /*
-          FileOutputStream os = new FileOutputStream(name+".class");
-          os.write(bytecode);
-          os.flush();
-          os.close();
-          */
-          
-          // CheckClassAdapter.verify(new ClassReader(bytecode), true);
-          
-        } else {
-          ClassReader cr = new ClassReader(is);
-          bytecode = cr.b;
-        }
-        return super.defineClass(name, bytecode, 0, bytecode.length);
-
-//      } catch( Error ex) {
-//        new ClassReader(bytecode).accept(new TraceClassVisitor(new PrintWriter(System.err)), false);
-//        throw ex;
-        
-      } catch( Throwable ex) {
-        System.err.println("Load error: " + ex.toString());
-        ex.printStackTrace();
-        throw new ClassNotFoundException(name+" "+ex.getMessage(), ex);
-  
-      }
+    public AsmClassTransformerClassLoader( final String pPrefix ) {
+        super(pPrefix, new AsmClassTransformer());
     }
-    return cl.loadClass( name);
-  }
 
 }

Modified: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/BlackRedTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/BlackRedTestCase.java?rev=367531&r1=367530&r2=367531&view=diff
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/BlackRedTestCase.java (original)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/BlackRedTestCase.java Tue Jan 10 01:15:39 2006
@@ -2,30 +2,16 @@
 
 import junit.framework.Test;
 import junit.framework.TestSuite;
-import org.apache.commons.javaflow.Continuation;
-import org.apache.commons.javaflow.bytecode.transformation.asm.data.BlackRed;
+import org.apache.commons.javaflow.bytecode.transformation.tests.AbstractBlackRedTestCase;
 
+public final class BlackRedTestCase extends AbstractBlackRedTestCase {
 
-public class BlackRedTestCase extends TransformerTestCase {
-
-  public static Test suite() throws Exception {
-    Class test = BlackRedTestCase.class;
-    AsmClassTransformerClassLoader cl = new AsmClassTransformerClassLoader( test.getPackage().getName());
-    Class c = cl.loadClass( test.getName());
-    return new TestSuite( c);
-  }
-
-  public void testBlackRed() {
-    final Runnable r = new BlackRed();
-    final Continuation c1 = Continuation.startWith(r);
-    assertTrue(c1 != null);
-    final Continuation c2 = Continuation.continueWith(c1);
-    assertTrue(c2 == null);
-  }
-
-  protected String getData() {
-    return "org.apache.commons.javaflow.bytecode.transformation.asm.data.BlackRed";
-  }
-
+    public static Test suite() throws Exception {
+        final Class test = BlackRedTestCase.class;
+        final AsmClassTransformerClassLoader classloader =
+            new AsmClassTransformerClassLoader(test.getPackage().getName());
+        final Class clazz = classloader.loadClass(test.getName());
+        return new TestSuite(clazz);
+    }
+    
 }
-

Modified: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/ClassAccessTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/ClassAccessTestCase.java?rev=367531&r1=367530&r2=367531&view=diff
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/ClassAccessTestCase.java (original)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/ClassAccessTestCase.java Tue Jan 10 01:15:39 2006
@@ -2,28 +2,18 @@
 
 import junit.framework.Test;
 import junit.framework.TestSuite;
-import org.apache.commons.javaflow.Continuation;
-import org.apache.commons.javaflow.bytecode.transformation.asm.data.ClassAccess1;
+import org.apache.commons.javaflow.bytecode.transformation.tests.AbstractClassAccessTestCase;
 
 
-public class ClassAccessTestCase extends TransformerTestCase {
+public class ClassAccessTestCase extends AbstractClassAccessTestCase {
 
-  public static Test suite() throws Exception {
-    Class test = ClassAccessTestCase.class;
-    AsmClassTransformerClassLoader cl = new AsmClassTransformerClassLoader( test.getPackage().getName());
-    Class c = cl.loadClass( test.getName());
-    return new TestSuite( c);
-  }
-
-  public void testClassAccess() throws Exception {
-    final ClassAccess1 r = new ClassAccess1();
-    final Continuation c = Continuation.startWith(r);
-    assertTrue(c != null);
-  }
-
-  protected String getData() {
-    return "org.apache.commons.javaflow.bytecode.transformation.asm.data.ClassAccess1";
-  }
+    public static Test suite() throws Exception {
+        final Class test = ClassAccessTestCase.class;
+        final AsmClassTransformerClassLoader classloader =
+            new AsmClassTransformerClassLoader(test.getPackage().getName());
+        final Class clazz = classloader.loadClass(test.getName());
+        return new TestSuite(clazz);
+    }
   
 }
 

Modified: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/CounterTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/CounterTestCase.java?rev=367531&r1=367530&r2=367531&view=diff
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/CounterTestCase.java (original)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/CounterTestCase.java Tue Jan 10 01:15:39 2006
@@ -2,36 +2,18 @@
 
 import junit.framework.Test;
 import junit.framework.TestSuite;
-import org.apache.commons.javaflow.Continuation;
-import org.apache.commons.javaflow.bytecode.transformation.asm.data.CounterFlow;
+import org.apache.commons.javaflow.bytecode.transformation.tests.AbstractCounterTestCase;
 
 
-public class CounterTestCase extends TransformerTestCase {
+public final class CounterTestCase extends AbstractCounterTestCase {
 
-  public static Test suite() throws Exception {
-    Class test = CounterTestCase.class;
-    AsmClassTransformerClassLoader cl = new AsmClassTransformerClassLoader( test.getPackage().getName());
-    Class c = cl.loadClass( test.getName());
-    return new TestSuite( c);
-  }
-
-  public void testCounter() {
-    final int count = 5;
-    final Runnable r = new CounterFlow( count);
-
-    int i = 0;
-    Continuation c = Continuation.startWith( r);
-    while( c != null) {
-      c = Continuation.continueWith( c);
-      i++;
+    public static Test suite() throws Exception {
+        final Class test = CounterTestCase.class;
+        final AsmClassTransformerClassLoader classloader =
+            new AsmClassTransformerClassLoader(test.getPackage().getName());
+        final Class clazz = classloader.loadClass(test.getName());
+        return new TestSuite(clazz);
     }
-
-    assertTrue( i == count);
-  }
-  
-  protected String getData() {
-    return "org.apache.commons.javaflow.bytecode.transformation.asm.data.CounterFlow";
-  }
-  
+ 
 }
 

Modified: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/DefaultConstructorTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/DefaultConstructorTestCase.java?rev=367531&r1=367530&r2=367531&view=diff
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/DefaultConstructorTestCase.java (original)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/DefaultConstructorTestCase.java Tue Jan 10 01:15:39 2006
@@ -1,27 +1,18 @@
 package org.apache.commons.javaflow.bytecode.transformation.asm;
 
 import junit.framework.Test;
-import junit.framework.TestCase;
 import junit.framework.TestSuite;
-import org.apache.commons.javaflow.Continuation;
-import org.apache.commons.javaflow.bytecode.transformation.asm.data.DefaultConstructor;
+import org.apache.commons.javaflow.bytecode.transformation.tests.AbstractDefaultConstructorTestCase;
 
 
-public class DefaultConstructorTestCase extends TestCase {
+public final class DefaultConstructorTestCase extends AbstractDefaultConstructorTestCase {
 
     public static Test suite() throws Exception {
-        Class test = DefaultConstructorTestCase.class;
-        AsmClassTransformerClassLoader cl = new AsmClassTransformerClassLoader(test.getPackage().getName());
-        Class c = cl.loadClass(test.getName());
-        return new TestSuite(c);
-    }
-    
-    
-    public void testInvoker() {
-        Runnable o = new DefaultConstructor();
-        Continuation c = Continuation.startWith(o);
-        
-        assertTrue(c == null);
+        final Class test = DefaultConstructorTestCase.class;
+        final AsmClassTransformerClassLoader classloader =
+            new AsmClassTransformerClassLoader(test.getPackage().getName());
+        final Class clazz = classloader.loadClass(test.getName());
+        return new TestSuite(clazz);
     }
     
 }

Modified: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/InvokerTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/InvokerTestCase.java?rev=367531&r1=367530&r2=367531&view=diff
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/InvokerTestCase.java (original)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/InvokerTestCase.java Tue Jan 10 01:15:39 2006
@@ -1,28 +1,18 @@
 package org.apache.commons.javaflow.bytecode.transformation.asm;
 
 import junit.framework.Test;
-import junit.framework.TestCase;
 import junit.framework.TestSuite;
-import org.apache.commons.javaflow.Continuation;
-import org.apache.commons.javaflow.bytecode.transformation.asm.data.Invoker;
+import org.apache.commons.javaflow.bytecode.transformation.tests.AbstractInvokerTestCase;
 
 
-public class InvokerTestCase extends TestCase {
+public final class InvokerTestCase extends AbstractInvokerTestCase {
 
     public static Test suite() throws Exception {
-        Class test = InvokerTestCase.class;
-        AsmClassTransformerClassLoader cl = new AsmClassTransformerClassLoader(test.getPackage().getName());
-        Class c = cl.loadClass(test.getName());
-        return new TestSuite(c);
-    }
-    
-    
-    public void testInvoker() {
-        Runnable r = new Thread();
-        Runnable o = new Invoker(r);
-        Continuation c = Continuation.startWith(o);
-        
-        assertTrue(c == null);
+        final Class test = InvokerTestCase.class;
+        final AsmClassTransformerClassLoader classloader =
+            new AsmClassTransformerClassLoader(test.getPackage().getName());
+        final Class clazz = classloader.loadClass(test.getName());
+        return new TestSuite(clazz);
     }
     
 }

Modified: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/NewObjectTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/NewObjectTestCase.java?rev=367531&r1=367530&r2=367531&view=diff
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/NewObjectTestCase.java (original)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/NewObjectTestCase.java Tue Jan 10 01:15:39 2006
@@ -1,26 +1,18 @@
 package org.apache.commons.javaflow.bytecode.transformation.asm;
 
 import junit.framework.Test;
-import junit.framework.TestCase;
 import junit.framework.TestSuite;
-import org.apache.commons.javaflow.Continuation;
-import org.apache.commons.javaflow.bytecode.transformation.asm.data.NewObject;
+import org.apache.commons.javaflow.bytecode.transformation.tests.AbstractNewObjectTestCase;
 
 
-public class NewObjectTestCase extends TestCase {
-
-  public static Test suite() throws Exception {
-    Class test = NewObjectTestCase.class;
-    AsmClassTransformerClassLoader cl = new AsmClassTransformerClassLoader( test.getPackage().getName());
-    Class c = cl.loadClass( test.getName());
-    return new TestSuite( c);
-  }
-
-  
-  public void testNewObject() throws Exception {
-    final Runnable r = new NewObject();
-    final Continuation c = Continuation.startWith( r);
-    assertTrue( c == null);
-  }
+public final class NewObjectTestCase extends AbstractNewObjectTestCase {
 
+    public static Test suite() throws Exception {
+        final Class test = NewObjectTestCase.class;
+        final AsmClassTransformerClassLoader classloader =
+            new AsmClassTransformerClassLoader(test.getPackage().getName());
+        final Class clazz = classloader.loadClass(test.getName());
+        return new TestSuite(clazz);
+    }
+ 
 }

Modified: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/NoReferenceTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/NoReferenceTestCase.java?rev=367531&r1=367530&r2=367531&view=diff
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/NoReferenceTestCase.java (original)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/NoReferenceTestCase.java Tue Jan 10 01:15:39 2006
@@ -2,28 +2,18 @@
 
 import junit.framework.Test;
 import junit.framework.TestSuite;
-import org.apache.commons.javaflow.Continuation;
-import org.apache.commons.javaflow.bytecode.transformation.asm.data.NoReference;
+import org.apache.commons.javaflow.bytecode.transformation.tests.AbstractNoReferenceTestCase;
 
 
-public class NoReferenceTestCase extends TransformerTestCase {
+public final class NoReferenceTestCase extends AbstractNoReferenceTestCase {
 
-  public static Test suite() throws Exception {
-    Class test = NoReferenceTestCase.class;
-    AsmClassTransformerClassLoader cl = new AsmClassTransformerClassLoader( test.getPackage().getName());
-    Class c = cl.loadClass( test.getName());
-    return new TestSuite( c);
-  }
-
-  public void testNoReference() throws Exception {
-    final Runnable r = new NoReference();
-    final Continuation c = Continuation.startWith( r);
-    assertTrue( c != null);
-  }
-
-  protected String getData() {
-    return "org.apache.commons.javaflow.bytecode.transformation.asm.data.NoReference";
-  }
-  
+    public static Test suite() throws Exception {
+        final Class test = NoReferenceTestCase.class;
+        final AsmClassTransformerClassLoader classloader =
+            new AsmClassTransformerClassLoader(test.getPackage().getName());
+        final Class clazz = classloader.loadClass(test.getName());
+        return new TestSuite(clazz);
+    }
+   
 }
 

Copied: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/ResumeTestCase.java (from r366393, jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/SimpleSerializableTestCase.java)
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/ResumeTestCase.java?p2=jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/ResumeTestCase.java&p1=jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/SimpleSerializableTestCase.java&r1=366393&r2=367531&rev=367531&view=diff
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/SimpleSerializableTestCase.java (original)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/ResumeTestCase.java Tue Jan 10 01:15:39 2006
@@ -2,72 +2,17 @@
 
 import junit.framework.Test;
 import junit.framework.TestSuite;
-import org.apache.commons.javaflow.Continuation;
-import org.apache.commons.javaflow.bytecode.transformation.asm.data.SimpleSerializable;
+import org.apache.commons.javaflow.bytecode.transformation.tests.AbstractResumeTestCase;
 
 
-public class SimpleSerializableTestCase extends TransformerTestCase {
-
-  public static Test suite() throws Exception {
-    Class test = SimpleSerializableTestCase.class;
-    AsmClassTransformerClassLoader cl = new AsmClassTransformerClassLoader(test.getPackage().getName());
-    Class c = cl.loadClass( test.getName());
-    return new TestSuite( c);
-  }
-
-  
-  public void testSimpleSuspendResume() throws Exception {
-    final SimpleSerializable r = new SimpleSerializable();
-
-    assertTrue( r.g == -1);
-    assertTrue( r.l == -1);
-
-    Continuation c1 = Continuation.startWith( r);
-
-    assertTrue( r.g == 0);
-    assertTrue( r.l == 0);
-
-    Continuation c2 = Continuation.continueWith( c1);
-
-    assertTrue( r.g == 1);
-    assertTrue( r.l == 1);
-
-    Continuation c3 = Continuation.continueWith( c2);
-
-    assertTrue( r.g == 2);
-    assertTrue( r.l == 2);
-  }
-
-  public void testContinuationBranching() throws Exception {
-    final SimpleSerializable r = new SimpleSerializable();
-
-    assertTrue( r.g == -1);
-    assertTrue( r.l == -1);
-
-    Continuation c1 = Continuation.startWith( r);
-
-    assertTrue( r.g == 0);
-    assertTrue( r.l == 0);
-
-    Continuation c2 = Continuation.continueWith( c1);
-
-    assertTrue( r.g == 1);
-    assertTrue( r.l == 1);
-
-    Continuation c31 = Continuation.continueWith( c2);
-
-    assertTrue( r.g == 2);
-    assertTrue( r.l == 2);
-
-    Continuation c32 = Continuation.continueWith( c2);
-
-    assertTrue( r.g == 3);
-    assertTrue( r.l == 2);
-  }
-
-
-  protected String getData() {
-    return "org.apache.commons.javaflow.bytecode.transformation.asm.data.SimpleSerializable";
-  }
+public final class ResumeTestCase extends AbstractResumeTestCase {
 
+    public static Test suite() throws Exception {
+        final Class test = ResumeTestCase.class;
+        final AsmClassTransformerClassLoader classloader =
+            new AsmClassTransformerClassLoader(test.getPackage().getName());
+        final Class clazz = classloader.loadClass(test.getName());
+        return new TestSuite(clazz);
+    }
+ 
 }

Added: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/SerializationTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/SerializationTestCase.java?rev=367531&view=auto
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/SerializationTestCase.java (added)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/SerializationTestCase.java Tue Jan 10 01:15:39 2006
@@ -0,0 +1,18 @@
+package org.apache.commons.javaflow.bytecode.transformation.asm;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.apache.commons.javaflow.bytecode.transformation.tests.AbstractSerializationTestCase;
+
+
+public final class SerializationTestCase extends AbstractSerializationTestCase {
+
+    public static Test suite() throws Exception {
+        final Class test = SerializationTestCase.class;
+        final AsmClassTransformerClassLoader classloader =
+            new AsmClassTransformerClassLoader(test.getPackage().getName());
+        final Class clazz = classloader.loadClass(test.getName());
+        return new TestSuite(clazz);
+    }
+ 
+}

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/SerializationTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/SerializationTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/SimpleTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/SimpleTestCase.java?rev=367531&r1=367530&r2=367531&view=diff
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/SimpleTestCase.java (original)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/SimpleTestCase.java Tue Jan 10 01:15:39 2006
@@ -2,28 +2,18 @@
 
 import junit.framework.Test;
 import junit.framework.TestSuite;
-import org.apache.commons.javaflow.Continuation;
-import org.apache.commons.javaflow.bytecode.transformation.asm.data.Simple;
+import org.apache.commons.javaflow.bytecode.transformation.tests.AbstractSimpleTestCase;
 
 
-public class SimpleTestCase extends TransformerTestCase {
-
-  public static Test suite() throws Exception {
-    Class test = SimpleTestCase.class;
-    AsmClassTransformerClassLoader cl = new AsmClassTransformerClassLoader( test.getPackage().getName());
-    Class c = cl.loadClass( test.getName());
-    return new TestSuite( c);
-  }
-
-  public void testNoReferenceBug() throws Exception {
-    final Runnable r = new Simple();
-    final Continuation c = Continuation.startWith( r);
-    assertTrue( c != null);
-  }
-
-  protected String getData() {
-    return "org.apache.commons.javaflow.bytecode.transformation.asm.data.Simple";
-  }
+public final class SimpleTestCase extends AbstractSimpleTestCase {
 
+    public static Test suite() throws Exception {
+        final Class test = SimpleTestCase.class;
+        final AsmClassTransformerClassLoader classloader =
+            new AsmClassTransformerClassLoader(test.getPackage().getName());
+        final Class clazz = classloader.loadClass(test.getName());
+        return new TestSuite(clazz);
+    }
+ 
 }
 

Modified: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/StackTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/StackTestCase.java?rev=367531&r1=367530&r2=367531&view=diff
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/StackTestCase.java (original)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/StackTestCase.java Tue Jan 10 01:15:39 2006
@@ -1,26 +1,18 @@
 package org.apache.commons.javaflow.bytecode.transformation.asm;
 
-import org.apache.commons.javaflow.Continuation;
-import org.apache.commons.javaflow.flow.StackBugFlow;
-
 import junit.framework.Test;
-import junit.framework.TestCase;
 import junit.framework.TestSuite;
+import org.apache.commons.javaflow.bytecode.transformation.tests.AbstractStackTestCase;
 
 
-public class StackTestCase extends TestCase {
-
-  public static Test suite() throws Exception {
-    Class test = StackTestCase.class;
-    AsmClassTransformerClassLoader cl = new AsmClassTransformerClassLoader(test.getPackage().getName());
-    Class c = cl.loadClass( test.getName());
-    return new TestSuite( c);
-  }
-
-  public void testStackBug() throws Exception {
-    final Runnable r = new StackBugFlow();
-    final Continuation c = Continuation.startWith( r);
-    assertTrue( c == null);
-  }
-
+public final class StackTestCase extends AbstractStackTestCase {
+ 
+    public static Test suite() throws Exception {
+        final Class test = StackTestCase.class;
+        final AsmClassTransformerClassLoader classloader =
+            new AsmClassTransformerClassLoader(test.getPackage().getName());
+        final Class clazz = classloader.loadClass(test.getName());
+        return new TestSuite(clazz);
+    }
+ 
 }

Added: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/BcelClassTransformerClassLoader.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/BcelClassTransformerClassLoader.java?rev=367531&view=auto
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/BcelClassTransformerClassLoader.java (added)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/BcelClassTransformerClassLoader.java Tue Jan 10 01:15:39 2006
@@ -0,0 +1,11 @@
+package org.apache.commons.javaflow.bytecode.transformation.bcel;
+
+import org.apache.commons.javaflow.bytecode.transformation.AbstractClassTransformerClassLoader;
+
+public final class BcelClassTransformerClassLoader extends AbstractClassTransformerClassLoader {
+
+    public BcelClassTransformerClassLoader( final String pPrefix ) {
+        super(pPrefix, new BcelClassTransformer());
+    }
+
+}

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/BcelClassTransformerClassLoader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/BcelClassTransformerClassLoader.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/BlackRedTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/BlackRedTestCase.java?rev=367531&view=auto
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/BlackRedTestCase.java (added)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/BlackRedTestCase.java Tue Jan 10 01:15:39 2006
@@ -0,0 +1,17 @@
+package org.apache.commons.javaflow.bytecode.transformation.bcel;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.apache.commons.javaflow.bytecode.transformation.tests.AbstractBlackRedTestCase;
+
+public final class BlackRedTestCase extends AbstractBlackRedTestCase {
+
+    public static Test suite() throws Exception {
+        final Class test = BlackRedTestCase.class;
+        final BcelClassTransformerClassLoader classloader =
+            new BcelClassTransformerClassLoader(test.getPackage().getName());
+        final Class clazz = classloader.loadClass(test.getName());
+        return new TestSuite(clazz);
+    }
+    
+}

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/BlackRedTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/BlackRedTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/ClassAccessTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/ClassAccessTestCase.java?rev=367531&view=auto
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/ClassAccessTestCase.java (added)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/ClassAccessTestCase.java Tue Jan 10 01:15:39 2006
@@ -0,0 +1,19 @@
+package org.apache.commons.javaflow.bytecode.transformation.bcel;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.apache.commons.javaflow.bytecode.transformation.tests.AbstractClassAccessTestCase;
+
+
+public class ClassAccessTestCase extends AbstractClassAccessTestCase {
+
+    public static Test suite() throws Exception {
+        final Class test = ClassAccessTestCase.class;
+        final BcelClassTransformerClassLoader classloader =
+            new BcelClassTransformerClassLoader(test.getPackage().getName());
+        final Class clazz = classloader.loadClass(test.getName());
+        return new TestSuite(clazz);
+    }
+  
+}
+

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/ClassAccessTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/ClassAccessTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/CounterTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/CounterTestCase.java?rev=367531&view=auto
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/CounterTestCase.java (added)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/CounterTestCase.java Tue Jan 10 01:15:39 2006
@@ -0,0 +1,19 @@
+package org.apache.commons.javaflow.bytecode.transformation.bcel;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.apache.commons.javaflow.bytecode.transformation.tests.AbstractCounterTestCase;
+
+
+public final class CounterTestCase extends AbstractCounterTestCase {
+
+    public static Test suite() throws Exception {
+        final Class test = CounterTestCase.class;
+        final BcelClassTransformerClassLoader classloader =
+            new BcelClassTransformerClassLoader(test.getPackage().getName());
+        final Class clazz = classloader.loadClass(test.getName());
+        return new TestSuite(clazz);
+    }
+ 
+}
+

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/CounterTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/CounterTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/DefaultConstructorTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/DefaultConstructorTestCase.java?rev=367531&view=auto
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/DefaultConstructorTestCase.java (added)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/DefaultConstructorTestCase.java Tue Jan 10 01:15:39 2006
@@ -0,0 +1,19 @@
+package org.apache.commons.javaflow.bytecode.transformation.bcel;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.apache.commons.javaflow.bytecode.transformation.tests.AbstractDefaultConstructorTestCase;
+
+
+public final class DefaultConstructorTestCase extends AbstractDefaultConstructorTestCase {
+
+    public static Test suite() throws Exception {
+        final Class test = DefaultConstructorTestCase.class;
+        final BcelClassTransformerClassLoader classloader =
+            new BcelClassTransformerClassLoader(test.getPackage().getName());
+        final Class clazz = classloader.loadClass(test.getName());
+        return new TestSuite(clazz);
+    }
+    
+}
+

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/DefaultConstructorTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/DefaultConstructorTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/InvokerTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/InvokerTestCase.java?rev=367531&view=auto
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/InvokerTestCase.java (added)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/InvokerTestCase.java Tue Jan 10 01:15:39 2006
@@ -0,0 +1,19 @@
+package org.apache.commons.javaflow.bytecode.transformation.bcel;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.apache.commons.javaflow.bytecode.transformation.tests.AbstractInvokerTestCase;
+
+
+public final class InvokerTestCase extends AbstractInvokerTestCase {
+
+    public static Test suite() throws Exception {
+        final Class test = InvokerTestCase.class;
+        final BcelClassTransformerClassLoader classloader =
+            new BcelClassTransformerClassLoader(test.getPackage().getName());
+        final Class clazz = classloader.loadClass(test.getName());
+        return new TestSuite(clazz);
+    }
+    
+}
+

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/InvokerTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/InvokerTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/NewObjectTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/NewObjectTestCase.java?rev=367531&view=auto
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/NewObjectTestCase.java (added)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/NewObjectTestCase.java Tue Jan 10 01:15:39 2006
@@ -0,0 +1,18 @@
+package org.apache.commons.javaflow.bytecode.transformation.bcel;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.apache.commons.javaflow.bytecode.transformation.tests.AbstractNewObjectTestCase;
+
+
+public final class NewObjectTestCase extends AbstractNewObjectTestCase {
+
+    public static Test suite() throws Exception {
+        final Class test = NewObjectTestCase.class;
+        final BcelClassTransformerClassLoader classloader =
+            new BcelClassTransformerClassLoader(test.getPackage().getName());
+        final Class clazz = classloader.loadClass(test.getName());
+        return new TestSuite(clazz);
+    }
+ 
+}

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/NewObjectTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/NewObjectTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/NoReferenceTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/NoReferenceTestCase.java?rev=367531&view=auto
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/NoReferenceTestCase.java (added)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/NoReferenceTestCase.java Tue Jan 10 01:15:39 2006
@@ -0,0 +1,19 @@
+package org.apache.commons.javaflow.bytecode.transformation.bcel;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.apache.commons.javaflow.bytecode.transformation.tests.AbstractNoReferenceTestCase;
+
+
+public final class NoReferenceTestCase extends AbstractNoReferenceTestCase {
+
+    public static Test suite() throws Exception {
+        final Class test = NoReferenceTestCase.class;
+        final BcelClassTransformerClassLoader classloader =
+            new BcelClassTransformerClassLoader(test.getPackage().getName());
+        final Class clazz = classloader.loadClass(test.getName());
+        return new TestSuite(clazz);
+    }
+   
+}
+

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/NoReferenceTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/NoReferenceTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/ResumeTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/ResumeTestCase.java?rev=367531&view=auto
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/ResumeTestCase.java (added)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/ResumeTestCase.java Tue Jan 10 01:15:39 2006
@@ -0,0 +1,18 @@
+package org.apache.commons.javaflow.bytecode.transformation.bcel;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.apache.commons.javaflow.bytecode.transformation.tests.AbstractResumeTestCase;
+
+
+public final class ResumeTestCase extends AbstractResumeTestCase {
+
+    public static Test suite() throws Exception {
+        final Class test = ResumeTestCase.class;
+        final BcelClassTransformerClassLoader classloader =
+            new BcelClassTransformerClassLoader(test.getPackage().getName());
+        final Class clazz = classloader.loadClass(test.getName());
+        return new TestSuite(clazz);
+    }
+ 
+}

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/ResumeTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/ResumeTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/SerializationTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/SerializationTestCase.java?rev=367531&view=auto
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/SerializationTestCase.java (added)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/SerializationTestCase.java Tue Jan 10 01:15:39 2006
@@ -0,0 +1,18 @@
+package org.apache.commons.javaflow.bytecode.transformation.bcel;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.apache.commons.javaflow.bytecode.transformation.tests.AbstractSerializationTestCase;
+
+
+public final class SerializationTestCase extends AbstractSerializationTestCase {
+
+    public static Test suite() throws Exception {
+        final Class test = SerializationTestCase.class;
+        final BcelClassTransformerClassLoader classloader =
+            new BcelClassTransformerClassLoader(test.getPackage().getName());
+        final Class clazz = classloader.loadClass(test.getName());
+        return new TestSuite(clazz);
+    }
+ 
+}

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/SerializationTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/SerializationTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/SimpleTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/SimpleTestCase.java?rev=367531&view=auto
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/SimpleTestCase.java (added)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/SimpleTestCase.java Tue Jan 10 01:15:39 2006
@@ -0,0 +1,19 @@
+package org.apache.commons.javaflow.bytecode.transformation.bcel;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.apache.commons.javaflow.bytecode.transformation.tests.AbstractSimpleTestCase;
+
+
+public final class SimpleTestCase extends AbstractSimpleTestCase {
+
+    public static Test suite() throws Exception {
+        final Class test = SimpleTestCase.class;
+        final BcelClassTransformerClassLoader classloader =
+            new BcelClassTransformerClassLoader(test.getPackage().getName());
+        final Class clazz = classloader.loadClass(test.getName());
+        return new TestSuite(clazz);
+    }
+ 
+}
+

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/SimpleTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/SimpleTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/StackTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/StackTestCase.java?rev=367531&view=auto
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/StackTestCase.java (added)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/StackTestCase.java Tue Jan 10 01:15:39 2006
@@ -0,0 +1,18 @@
+package org.apache.commons.javaflow.bytecode.transformation.bcel;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.apache.commons.javaflow.bytecode.transformation.tests.AbstractStackTestCase;
+
+
+public final class StackTestCase extends AbstractStackTestCase {
+ 
+    public static Test suite() throws Exception {
+        final Class test = StackTestCase.class;
+        final BcelClassTransformerClassLoader classloader =
+            new BcelClassTransformerClassLoader(test.getPackage().getName());
+        final Class clazz = classloader.loadClass(test.getName());
+        return new TestSuite(clazz);
+    }
+ 
+}

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/StackTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/bcel/StackTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/BlackRed.java (from r367530, jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/BlackRed.java)
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/BlackRed.java?p2=jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/BlackRed.java&p1=jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/BlackRed.java&r1=367530&r2=367531&rev=367531&view=diff
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/BlackRed.java (original)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/BlackRed.java Tue Jan 10 01:15:39 2006
@@ -1,4 +1,4 @@
-package org.apache.commons.javaflow.bytecode.transformation.asm.data;
+package org.apache.commons.javaflow.bytecode.transformation.data;
 
 import org.apache.commons.javaflow.Continuation;
 

Copied: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/ClassAccess1.java (from r367530, jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/ClassAccess1.java)
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/ClassAccess1.java?p2=jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/ClassAccess1.java&p1=jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/ClassAccess1.java&r1=367530&r2=367531&rev=367531&view=diff
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/ClassAccess1.java (original)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/ClassAccess1.java Tue Jan 10 01:15:39 2006
@@ -1,4 +1,4 @@
-package org.apache.commons.javaflow.bytecode.transformation.asm.data;
+package org.apache.commons.javaflow.bytecode.transformation.data;
 
 import org.apache.commons.javaflow.Continuation;
 

Copied: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/ClassAccess2.java (from r367530, jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/ClassAccess2.java)
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/ClassAccess2.java?p2=jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/ClassAccess2.java&p1=jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/ClassAccess2.java&r1=367530&r2=367531&rev=367531&view=diff
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/ClassAccess2.java (original)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/ClassAccess2.java Tue Jan 10 01:15:39 2006
@@ -1,9 +1,9 @@
-package org.apache.commons.javaflow.bytecode.transformation.asm.data;
+package org.apache.commons.javaflow.bytecode.transformation.data;
 
 
-public final class ClassAccess2 {
+public final class ClassAccess2 implements Runnable {
 
-    public void run() throws Throwable {
+    public void run() {
         Object o = ClassAccess2.class;
     }
     

Copied: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/ClassAccess3.java (from r367530, jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/ClassAccess3.java)
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/ClassAccess3.java?p2=jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/ClassAccess3.java&p1=jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/ClassAccess3.java&r1=367530&r2=367531&rev=367531&view=diff
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/ClassAccess3.java (original)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/ClassAccess3.java Tue Jan 10 01:15:39 2006
@@ -1,4 +1,4 @@
-package org.apache.commons.javaflow.bytecode.transformation.asm.data;
+package org.apache.commons.javaflow.bytecode.transformation.data;
 
 import org.apache.commons.javaflow.Continuation;
 

Copied: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/CounterFlow.java (from r367530, jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/CounterFlow.java)
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/CounterFlow.java?p2=jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/CounterFlow.java&p1=jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/CounterFlow.java&r1=367530&r2=367531&rev=367531&view=diff
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/CounterFlow.java (original)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/CounterFlow.java Tue Jan 10 01:15:39 2006
@@ -1,4 +1,4 @@
-package org.apache.commons.javaflow.bytecode.transformation.asm.data;
+package org.apache.commons.javaflow.bytecode.transformation.data;
 
 import org.apache.commons.javaflow.Continuation;
 

Copied: jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/DefaultConstructor.java (from r367530, jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/DefaultConstructor.java)
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/DefaultConstructor.java?p2=jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/DefaultConstructor.java&p1=jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/DefaultConstructor.java&r1=367530&r2=367531&rev=367531&view=diff
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/asm/data/DefaultConstructor.java (original)
+++ jakarta/commons/sandbox/javaflow/trunk/src/test/org/apache/commons/javaflow/bytecode/transformation/data/DefaultConstructor.java Tue Jan 10 01:15:39 2006
@@ -1,4 +1,4 @@
-package org.apache.commons.javaflow.bytecode.transformation.asm.data;
+package org.apache.commons.javaflow.bytecode.transformation.data;
 
 
 public final class DefaultConstructor implements Runnable {
@@ -7,7 +7,6 @@
     }
     
     public void run() {
-      System.err.println("aaa");
     }
     
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message