Examples of UnionCase


Examples of org.apache.harmony.pack200.NewAttributeBands.UnionCase

        Union element = (Union) layoutElements.get(0);
        Integral tag = element.getUnionTag();
        assertEquals("B", tag.getTag());
        List unionCases = element.getUnionCases();
        assertEquals(2, unionCases.size());
        UnionCase firstCase = (UnionCase) unionCases.get(0);
        assertTrue(firstCase.hasTag(55));
        assertFalse(firstCase.hasTag(23));
        List body = firstCase.getBody();
        assertEquals(1, body.size());
        Integral bodyElement = (Integral) body.get(0);
        assertEquals("FH", bodyElement.getTag());
        UnionCase secondCase = (UnionCase) unionCases.get(1);
        assertTrue(secondCase.hasTag(23));
        assertFalse(secondCase.hasTag(55));
        body = secondCase.getBody();
        assertEquals(0, body.size());
        List defaultBody = element.getDefaultCaseBody();
        assertEquals(1, defaultBody.size());
        Reference ref = (Reference) defaultBody.get(0);
        assertEquals("RSH", ref.getTag());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.