5960616263646566
pool .add(new CPUTF8("OtherThing", ClassConstantPool.DOMAIN_NORMALASCIIZ, 1)); CPUTF8 u1 = new CPUTF8("thing", ClassConstantPool.DOMAIN_NORMALASCIIZ, 2); pool.add(u1); pool.resolve(new Segment()); assertTrue(pool.indexOf(u1) > 0); }
5556575859606162
public void testIndex() { pool.add(new CPUTF8("OtherThing", 1)); CPUTF8 u1 = new CPUTF8("thing", 2); pool.add(u1); pool.resolve(new Segment()); assertTrue(pool.indexOf(u1) > 0); }
6162636465666768
public void testJustResources() throws Exception { in = Segment.class .getResourceAsStream("/org/apache/harmony/pack200/tests/JustResources.pack"); file = File.createTempFile("just", "resources.jar"); out = new JarOutputStream(new FileOutputStream(file)); Segment segment = new Segment(); segment.unpack(in, out); }
7071727374757677
public void testInterfaceOnly() throws Exception { in = Segment.class .getResourceAsStream("/org/apache/harmony/pack200/tests/InterfaceOnly.pack"); file = File.createTempFile("Interface", "Only.jar"); out = new JarOutputStream(new FileOutputStream(file)); Segment segment = new Segment(); segment.unpack(in, out); }
798081828384858687888990
public void testHelloWorld() throws Exception { in = Segment.class .getResourceAsStream("/org/apache/harmony/pack200/tests/HelloWorld.pack"); file = File.createTempFile("hello", "world.jar"); out = new JarOutputStream(new FileOutputStream(file)); Segment segment = new Segment(); segment.unpack(in, out); out.close(); out = null; JarFile jarFile = new JarFile(file); file.deleteOnExit();