Package io.netty.util.internal.chmv8

Examples of io.netty.util.internal.chmv8.ConcurrentHashMapV8$Segment


    }

    public void testJustResources() throws Exception {
        in = Segment.class
                .getResourceAsStream("/org/apache/harmony/pack200/tests/JustResources.pack");
        Segment segment = Segment.parse(in);
        assertNotNull(segment);
        out = new JarOutputStream(new FileOutputStream(File.createTempFile("just", "resources.jar")));
        segment.writeJar(out);
    }
View Full Code Here


    }

     public void testInterfaceOnly() throws Exception {
        in = Segment.class
                .getResourceAsStream("/org/apache/harmony/pack200/tests/InterfaceOnly.pack");
        Segment segment = Segment.parse(in);
        assertNotNull(segment);
        out = new JarOutputStream(new FileOutputStream(File.createTempFile("Interface", "Only.jar")));
        segment.writeJar(out);
    }
View Full Code Here

    assertEquals("Zwei",layout.getValue(1, segment.getConstantPool()));
  }

    public void testLayoutRSN() throws Pack200Exception {
    AttributeLayout layout = new AttributeLayout("RSN",AttributeLayout.CONTEXT_CLASS,"RSN", 1);
    Segment segment = new TestSegment();
    assertNull(layout.getValue(0, segment.getConstantPool()));
    assertEquals("Eins",layout.getValue(1, segment.getConstantPool()));
    assertEquals("Zwei",layout.getValue(2, segment.getConstantPool()));
  }
View Full Code Here

*/
public class SegmentConstantPoolTest extends TestCase {

    public class MockSegmentConstantPool extends SegmentConstantPool {
        public MockSegmentConstantPool() {
          super(new CpBands(new Segment()));
        };
View Full Code Here

    assertTrue(throwsException("name",1234,""));
  }

  public void testLayoutRU() throws Pack200Exception {
    AttributeLayout layout = new AttributeLayout("RU",AttributeLayout.CONTEXT_CLASS,"RU", 1);
    Segment segment = new TestSegment();
    assertNull(layout.getValue(-1, segment.getConstantPool()));
    assertEquals("Zero",layout.getValue(0, segment.getConstantPool()));
    assertEquals("One",layout.getValue(1, segment.getConstantPool()));
  }
View Full Code Here

    assertEquals("One",layout.getValue(1, segment.getConstantPool()));
  }

  public void testLayoutRUN() throws Pack200Exception {
    AttributeLayout layout = new AttributeLayout("RUN",AttributeLayout.CONTEXT_CLASS,"RUN", 1);
    Segment segment = new TestSegment();
    assertNull(layout.getValue(0, segment.getConstantPool()));
    assertEquals("Zero",layout.getValue(1, segment.getConstantPool()));
    assertEquals("One",layout.getValue(2, segment.getConstantPool()));
  }
View Full Code Here

    assertEquals("One",layout.getValue(2, segment.getConstantPool()));
  }

  public void testLayoutRS() throws Pack200Exception {
    AttributeLayout layout = new AttributeLayout("RS",AttributeLayout.CONTEXT_CLASS,"RS", 1);
    Segment segment = new TestSegment();
    assertNull(layout.getValue(-1, segment.getConstantPool()));
    assertEquals("Eins",layout.getValue(0, segment.getConstantPool()));
    assertEquals("Zwei",layout.getValue(1, segment.getConstantPool()));
  }
View Full Code Here

      throw new IllegalArgumentException(
          "Must specify both input and output streams");
    completed(0);
    try {
      while (in.available() > 0) {
        Segment s = Segment.parse(in);
        s.writeJar(out);
        out.flush();
      }
    } catch (Pack200Exception e) {
      throw new IOException("Failed to unpack Jar:" + String.valueOf(e));
    }
View Full Code Here

    assertTrue(throwsException("name",1234,""));
  }

  public void testLayoutRU() throws Pack200Exception {
    AttributeLayout layout = new AttributeLayout("RU",AttributeLayout.CONTEXT_CLASS,"RU", 1);
    Segment segment = new TestSegment();
    assertNull(layout.getValue(-1, segment.getConstantPool()));
    assertEquals("Zero",layout.getValue(0, segment.getConstantPool()));
    assertEquals("One",layout.getValue(1, segment.getConstantPool()));
  }
View Full Code Here

    assertEquals("One",layout.getValue(1, segment.getConstantPool()));
  }

  public void testLayoutRUN() throws Pack200Exception {
    AttributeLayout layout = new AttributeLayout("RUN",AttributeLayout.CONTEXT_CLASS,"RUN", 1);
    Segment segment = new TestSegment();
    assertNull(layout.getValue(0, segment.getConstantPool()));
    assertEquals("Zero",layout.getValue(1, segment.getConstantPool()));
    assertEquals("One",layout.getValue(2, segment.getConstantPool()));
  }
View Full Code Here

TOP

Related Classes of io.netty.util.internal.chmv8.ConcurrentHashMapV8$Segment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.