1 30 package org.objectweb.asm.tree; 31 32 import org.objectweb.asm.AbstractTest; 33 import org.objectweb.asm.ClassReader; 34 import org.objectweb.asm.ClassWriter; 35 36 import junit.framework.TestSuite; 37 38 43 public class ClassNodeTest extends AbstractTest { 44 45 public static TestSuite suite() throws Exception { 46 return new ClassNodeTest().getSuite(); 47 } 48 49 public void test() throws Exception { 50 ClassReader cr = new ClassReader(is); 51 ClassNode cn = new ClassNode(); 52 cr.accept(cn, false); 53 ClassWriter cw = new ClassWriter(false, true); 54 cn.accept(cw); 55 assertEquals(cr, new ClassReader(cw.toByteArray())); 56 } 57 } 58 | Popular Tags |