1 30 package org.objectweb.asm.util; 31 32 import java.io.CharArrayWriter ; 33 import java.io.PrintWriter ; 34 35 import junit.framework.TestSuite; 36 37 import org.objectweb.asm.AbstractTest; 38 import org.objectweb.asm.ClassReader; 39 import org.objectweb.asm.ClassVisitor; 40 import org.objectweb.asm.ClassWriter; 41 42 47 public class TraceClassAdapterTest extends AbstractTest { 48 49 public static TestSuite suite() throws Exception { 50 return new TraceClassAdapterTest().getSuite(); 51 } 52 53 public void test() throws Exception { 54 ClassReader cr = new ClassReader(is); 55 ClassWriter cw = new ClassWriter(false, true); 56 ClassVisitor cv = new TraceClassVisitor(cw, 57 new PrintWriter (new CharArrayWriter ())); 58 cr.accept(cv, false); 59 assertEquals(cr, new ClassReader(cw.toByteArray())); 60 } 61 } 62 | Popular Tags |