assertEquals("Eins", ((CPUTF8)layout.getValue(1, segment.getConstantPool())).underlyingString());
assertEquals("Zwei", ((CPUTF8)layout.getValue(2, segment.getConstantPool())).underlyingString());
}
public void testGetCodec() throws Pack200Exception {
AttributeLayout layout = new AttributeLayout("O",
AttributeLayout.CONTEXT_CLASS, "HOBS", 1);
assertEquals(Codec.BRANCH5, layout.getCodec());
layout = new AttributeLayout("P", AttributeLayout.CONTEXT_METHOD,
"PIN", 1);
assertEquals(Codec.BCI5, layout.getCodec());
layout = new AttributeLayout("S", AttributeLayout.CONTEXT_FIELD, "HS",
1);
assertEquals(Codec.SIGNED5, layout.getCodec());
layout = new AttributeLayout("RS", AttributeLayout.CONTEXT_CODE,
"RRRS", 1);
assertEquals(Codec.UNSIGNED5, layout.getCodec());
layout = new AttributeLayout("KS", AttributeLayout.CONTEXT_CLASS,
"RKS", 1);
assertEquals(Codec.UNSIGNED5, layout.getCodec());
layout = new AttributeLayout("B", AttributeLayout.CONTEXT_CLASS,
"TRKSB", 1);
assertEquals(Codec.BYTE1, layout.getCodec());
}