/** * Handle attribute without value. The default method uses * the only allowed attribute value from DTD. * If the attribute is unknown or allows several values, * the HTML.NULL_ATTRIBUTE_VALUE is used. The attribute with * this value is added to the attribute set. * @param element The name of element. * @param attribute The name of attribute without value. */ protected void noValueAttribute(String element, String attribute) { Object value = HTML.NULL_ATTRIBUTE_VALUE; Element e = dtd.elementHash.get(element.toLowerCase()); if (e != null) { AttributeList attr = e.getAttribute(attribute); if (attr != null) { Vector values = attr.values; if (values != null && values.size() == 1) value = values.get(0); } } attributes.addAttribute(attribute, value); }
/** * Test method for * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(Element)'* * ContentModel(Element( "elemento",',',false,false,('*',new * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1") . * It checks if an instance is created, content is equal to el ,type is 0 * and next is null. */ public void testContentModelElement003() { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(0); bs1.set(1); BitSet bs2 = new BitSet(168); bs2.set(45); AttributeList al = new AttributeList("1"); Element el = dtd.defineElement("elemento", ',', false, false, cm2, bs1, bs2, al); cm = new ContentModel(el); assertNotNull(cm); assertEquals(el, cm.content); assertEquals(cm2, el.content); assertEquals(el, cm.content); assertEquals(0, cm.type); assertNull(cm.next); }
/** * Test method for * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(Element)'* * ContentModel(Element( "",',',false,false,('*',new * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new * Vector(),new AttributeList(null)) . It checks if an instance is created, * content is equal to el ,type is 0 and next is null. */ public void testContentModelElement004() { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(128); bs1.set(1); BitSet bs2 = new BitSet(7); AttributeList al = new AttributeList("bigC", -2147483648, -1, "value", new Vector(), new AttributeList(null)); Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2, al); cm = new ContentModel(el); assertNotNull(cm); assertEquals(el, cm.content); assertEquals(cm2, el.content); assertEquals(el, cm.content); assertEquals(0, cm.type); assertNull(cm.next); }
/** * Test method for * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(int, Object, * ContentModel)' Parameters type=-38, (element is defined in a dtd as el= * "elemento",',',false,false,('*',new * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1")), * null Verifies that an instance is created. content is equal to element, * type is -38 and next is null */ public void testContentModelIntObjectContentModel045() { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(0); bs1.set(1); BitSet bs2 = new BitSet(168); bs2.set(45); AttributeList al = new AttributeList("1"); Element el = dtd.defineElement("elemento", ',', false, false, cm2, bs1, bs2, al); cm = new ContentModel(-38, el, null); assertNotNull(cm); assertEquals(el, cm.content); assertEquals(-38, cm.type); assertNull(cm.next); }
/** * Test method for * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(int, Object, * ContentModel)' Parameters type=Integer.MIN_VALUE, el= * "",',',false,false,('*',new * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new * Vector(),new AttributeList(null)), null Verifies that an instance is * created. content is equal to el= "",',',false,false,('*',new * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new * Vector(),new AttributeList(null)), type is Integer.MIN_VALUE and next is * null */ public void testContentModelIntObjectContentModel047() { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(128); bs1.set(1); BitSet bs2 = new BitSet(7); AttributeList al = new AttributeList("bigC", -2147483648, -1, "value", new Vector(), new AttributeList(null)); Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2, al); cm = new ContentModel(Integer.MIN_VALUE, el, null); assertNotNull(cm); assertEquals(el, cm.content); assertEquals(Integer.MIN_VALUE, cm.type); assertNull(cm.next); }
/** * Test method for * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(int, Object, * ContentModel)' Parameters type=Integer.MIN_VALUE, el= * "",',',false,false,('*',new * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new * Vector(),new AttributeList(null)), new ContentModel() Verifies that an * instance is created. content is equal to el= "",',',false,false,('*',new * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new * Vector(),new AttributeList(null)), type is Integer.MIN_VALUE and next is * new ContentModel() */ public void testContentModelIntObjectContentModel080() { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cmnext = new ContentModel(); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(128); bs1.set(1); BitSet bs2 = new BitSet(7); AttributeList al = new AttributeList("bigC", -2147483648, -1, "value", new Vector(), new AttributeList(null)); Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2, al); cm = new ContentModel(Integer.MIN_VALUE, el, cmnext); assertNotNull(cm); assertEquals(el, cm.content); assertEquals(Integer.MIN_VALUE, cm.type); assertEquals(cmnext, cm.next); }
/** * Test method for 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.toString()' * ContentModel(Element("",'*',true,false,cm2,bs1,bs2,al)) "" */ public void testToString005() { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(128); bs1.set(1); BitSet bs2 = new BitSet(7); AttributeList al = new AttributeList("bigC", -2147483648, -1, "value", new Vector(), new AttributeList(null)); Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2, al); cm = new ContentModel(el); assertEquals("", cm.toString()); }
/** * Test method for 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.first(Object)' * ContentModel("elemento",',',false,false,('*',new * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1")) * "elemento",',',false,false,('*',new * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1") * Expected: true */ public void testFirstObject005() { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(0); bs1.set(1); BitSet bs2 = new BitSet(168); bs2.set(45); AttributeList al = new AttributeList("1"); Element el = dtd.defineElement("elemento", ',', false, false, cm2, bs1, bs2, al); cm = new ContentModel(el); assertTrue(cm.first(el)); assertFalse(cm.first(cm)); assertFalse(cm.first(cm2)); assertFalse(cm.first(dtd)); assertFalse(cm.first(bs1)); assertFalse(cm.first(bs2)); assertFalse(cm.first(al)); assertFalse(cm.first("")); assertFalse(cm.first("elemento")); assertFalse(cm.first(null)); }
/** * Test method for 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.first(Object)' * ContentModel("",',',false,false,('*',new * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new * Vector(),new AttributeList(null))) "",',',false,false,('*',new * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new * Vector(),new AttributeList(null)) Expected: true */ public void testFirstObject006() { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(128); bs1.set(1); BitSet bs2 = new BitSet(7); AttributeList al = new AttributeList("bigC", -2147483648, -1, "value", new Vector(), new AttributeList(null)); Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2, al); cm = new ContentModel(el); assertTrue(cm.first(el)); assertFalse(cm.first(cm)); assertFalse(cm.first(cm2)); assertFalse(cm.first(dtd)); assertFalse(cm.first(bs1)); assertFalse(cm.first(bs2)); assertFalse(cm.first(al)); assertFalse(cm.first("")); assertFalse(cm.first(null)); }
/** * Test method for * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)' * ContentModel("elemento",',',false,false,('*',new * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1")).getElements(null) * Expected: NullPointerException */ public void testGetElements004() { try { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(0); bs1.set(1); BitSet bs2 = new BitSet(168); bs2.set(45); AttributeList al = new AttributeList("1"); Element el = dtd.defineElement("elemento", ',', false, false, cm2, bs1, bs2, al); cm = new ContentModel(el); cm.getElements(null); fail("Should raise NullPointerException"); } catch (NullPointerException e) { // Expected } }
/** * Test method for * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)' * ContentModel("",',',false,false,('*',new * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new * Vector(),new AttributeList(null)).getElements(null) Expected: * NullPointerException */ public void testGetElements005() { try { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(128); bs1.set(1); BitSet bs2 = new BitSet(7); AttributeList al = new AttributeList("bigC", -2147483648, -1, "value", new Vector(), new AttributeList(null)); Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2, al); cm = new ContentModel(el); cm.getElements(null); fail("Should raise NullPointerException"); } catch (NullPointerException e) { // Expected } }
/** * Test method for * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)' * ContentModel("elemento",',',false,false,('*',new * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1")).getElements(new * Vector()) Expected: "elemento" */ public void testGetElements010() { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(0); bs1.set(1); BitSet bs2 = new BitSet(168); bs2.set(45); AttributeList al = new AttributeList("1"); Element el = dtd.defineElement("elemento", ',', false, false, cm2, bs1, bs2, al); cm = new ContentModel(el); Vector v = new Vector(); cm.getElements(v); assertEquals("[elemento]", v.toString()); }
/** * Test method for * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)' * ContentModel("",',',false,false,('*',new * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new * Vector(),new AttributeList(null)).getElements(new Vector()) Expected: "" */ public void testGetElements011() { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(128); bs1.set(1); BitSet bs2 = new BitSet(7); AttributeList al = new AttributeList("bigC", -2147483648, -1, "value", new Vector(), new AttributeList(null)); Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2, al); cm = new ContentModel(el); Vector v = new Vector(); cm.getElements(v); assertEquals("[]", v.toString()); }
/** * Test method for * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)' * ContentModel("elemento",',',false,false,('*',new * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1")).getElements(new * Vector()) method is called 4 times Expected: "[elemento, elemento, * elemento, elemento]" */ public void testGetElements014() { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(0); bs1.set(1); BitSet bs2 = new BitSet(168); bs2.set(45); AttributeList al = new AttributeList("1"); Element el = dtd.defineElement("elemento", ',', false, false, cm2, bs1, bs2, al); cm = new ContentModel(el); Vector v = new Vector(); cm.getElements(v); cm.getElements(v); cm.getElements(v); cm.getElements(v); assertEquals("[elemento, elemento, elemento, elemento]", v .toString()); }
/** * Test method for * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(Element)'* * ContentModel(Element( "elemento",',',false,false,('*',new * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1") . * It checks if an instance is created, content is equal to el ,type is 0 * and next is null. */ public void testContentModelElement003() { try { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(0); bs1.set(1); BitSet bs2 = new BitSet(168); bs2.set(45); AttributeList al = new AttributeList("1"); Element el = dtd.defineElement("elemento", ',', false, false, cm2, bs1, bs2, al); cm = new ContentModel(el); assertNotNull(cm); assertEquals(el, cm.content); assertEquals(cm2, el.content); assertEquals(el, cm.content); assertEquals(0, cm.type); assertNull(cm.next); } catch (Exception e) { fail("Should not throw any exception but was: " + e); } }
/** * Test method for * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(Element)'* * ContentModel(Element( "",',',false,false,('*',new * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new * Vector(),new AttributeList(null)) . It checks if an instance is created, * content is equal to el ,type is 0 and next is null. */ public void testContentModelElement004() { try { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(128); bs1.set(1); BitSet bs2 = new BitSet(7); AttributeList al = new AttributeList("bigC", -2147483648, -1, "value", new Vector(), new AttributeList(null)); Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2, al); cm = new ContentModel(el); assertNotNull(cm); assertEquals(el, cm.content); assertEquals(cm2, el.content); assertEquals(el, cm.content); assertEquals(0, cm.type); assertNull(cm.next); } catch (Exception e) { fail("Should not throw any exception but was: " + e); } }
/** * Test method for * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(int, * ContentModel)' ContentModel(Element( "elemento",',',false,false,('*',new * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1") . * It checks if an instance is created, content is equal to el ,type is 0 * and next is null. */ public void testContentModelIntContentModel034() { try { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(0); bs1.set(1); BitSet bs2 = new BitSet(168); bs2.set(45); AttributeList al = new AttributeList("1"); Element el = dtd.defineElement("elemento", ',', false, false, cm2, bs1, bs2, al); cm2 = new ContentModel(el); ContentModel cm = new ContentModel(0, cm2); assertNotNull(cm); assertEquals(cm2, cm.content); assertEquals(0, cm.type); assertNull(cm.next); } catch (Exception e) { fail("Should not throw any exception but was: " + e); } }
/** * Test method for * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(int, * ContentModel)' ContentModel(Element( "",',',false,false,('*',new * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new * Vector(),new AttributeList(null)) . It checks if an instance is created, * content is equal to el ,type is 0 and next is null. */ public void testContentModelIntContentModel035() { try { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(128); bs1.set(1); BitSet bs2 = new BitSet(7); AttributeList al = new AttributeList("bigC", -2147483648, -1, "value", new Vector(), new AttributeList(null)); Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2, al); cm2 = new ContentModel(el); ContentModel cm = new ContentModel(43, cm2); assertNotNull(cm); assertEquals(cm2, cm.content); assertEquals(43, cm.type); assertNull(cm.next); } catch (Exception e) { fail("Should not throw any exception but was: " + e); } }
/** * Test method for * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(int, Object, * ContentModel)' Parameters type=-38, (element is defined in a dtd as el= * "elemento",',',false,false,('*',new * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1")), * null Verifies that an instance is created. content is equal to element, * type is -38 and next is null */ public void testContentModelIntObjectContentModel045() { try { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(0); bs1.set(1); BitSet bs2 = new BitSet(168); bs2.set(45); AttributeList al = new AttributeList("1"); Element el = dtd.defineElement("elemento", ',', false, false, cm2, bs1, bs2, al); cm = new ContentModel(-38, el, null); assertNotNull(cm); assertEquals(el, cm.content); assertEquals(-38, cm.type); assertNull(cm.next); } catch (Exception e) { fail("Should not throw any exception but was: " + e); } }
/** * Test method for * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(int, Object, * ContentModel)' Parameters type=0, * ContentModel(Element:"elemento",',',false,false,('*',new * ContentModel('*',new * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1")), * null Verifies that an instance is created. content is equal to null, type * is 0 and next is null */ public void testContentModelIntObjectContentModel046() { try { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(3); bs1.set(1); BitSet bs2 = new BitSet(168); bs2.set(45); AttributeList al = new AttributeList("1"); Element el = dtd.defineElement("elemento", '.', false, false, cm2, bs1, bs2, al); cm2 = new ContentModel(el); cm = new ContentModel(0, cm2, null); assertNotNull(cm); assertEquals(cm2, cm.content); assertEquals(0, cm.type); assertNull(cm.next); } catch (Exception e) { fail("Should not throw any exception but was: " + e); } }
/** * Test method for * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(int, Object, * ContentModel)' Parameters type=Integer.MIN_VALUE, el= * "",',',false,false,('*',new * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new * Vector(),new AttributeList(null)), null Verifies that an instance is * created. content is equal to el= "",',',false,false,('*',new * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new * Vector(),new AttributeList(null)), type is Integer.MIN_VALUE and next is * null */ public void testContentModelIntObjectContentModel047() { try { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(128); bs1.set(1); BitSet bs2 = new BitSet(7); AttributeList al = new AttributeList("bigC", -2147483648, -1, "value", new Vector(), new AttributeList(null)); Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2, al); cm = new ContentModel(Integer.MIN_VALUE, el, null); assertNotNull(cm); assertEquals(el, cm.content); assertEquals(Integer.MIN_VALUE, cm.type); assertNull(cm.next); } catch (Exception e) { fail("Should not throw any exception but was: " + e); } }
/** * Test method for * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(int, Object, * ContentModel)' Parameters type=42, ContentModel( * "elemento",',',false,false,('*',new * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1")), * null Verifies that an instance is created. content is equal to * ContentModel(("elemento",',',false,false,cm2,bs1,bs2,al)), type is 42 and * next is null */ public void testContentModelIntObjectContentModel049() { try { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(0); bs1.set(1); BitSet bs2 = new BitSet(168); bs2.set(45); AttributeList al = new AttributeList("1"); Element el = dtd.defineElement("elemento", ',', false, false, cm2, bs1, bs2, al); cm2 = new ContentModel(el); cm = new ContentModel(42, cm2, null); assertNotNull(cm); assertEquals(cm2, cm.content); assertEquals(42, cm.type); assertNull(cm.next); } catch (Exception e) { fail("Should not throw any exception but was: " + e); } }
/** * Test method for * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(int, Object, * ContentModel)' Parameters type=0, * ContentModel("",',',false,false,('*',new * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new * Vector(),new * AttributeList(null))),ContentModel("",',',false,false,('*',new * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new * Vector(),new AttributeList(null))) Verifies that an instance is created. * content is equal to ContentModel(("",',',false,false,('*',new * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new * Vector(),new AttributeList(null)))), type is 0 and next is * ("",',',false,false,('*',new * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new * Vector(),new AttributeList(null))) */ public void testContentModelIntObjectContentModel050() { try { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(128); bs1.set(1); BitSet bs2 = new BitSet(7); AttributeList al = new AttributeList("bigC", -2147483648, -1, "value", new Vector(), new AttributeList(null)); Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2, al); cm2 = new ContentModel(el); cm = new ContentModel(0, cm2, null); assertNotNull(cm); assertEquals(cm2, cm.content); assertEquals(0, cm.type); assertNull(cm.next); } catch (Exception e) { fail("Should not throw any exception but was: " + e); } }
/** * Test method for * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(int, Object, * ContentModel)' Parameters type=0, * ContentModel(Element:"elemento",',',false,false,('*',new * ContentModel('*',new * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1")), * new ContentModel() Verifies that an instance is created. content is equal * to null, type is 0 and next is new ContentModel() */ public void testContentModelIntObjectContentModel079() { try { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cmnext = new ContentModel(); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(0); bs1.set(1); BitSet bs2 = new BitSet(168); bs2.set(45); AttributeList al = new AttributeList("1"); Element el = dtd.defineElement("elemento", ',', false, false, cm2, bs1, bs2, al); cm2 = new ContentModel(el); cm = new ContentModel(0, cm2, cmnext); assertNotNull(cm); assertEquals(cm2, cm.content); assertEquals(0, cm.type); assertEquals(cmnext, cm.next); } catch (Exception e) { fail("Should not throw any exception but was: " + e); } }
/** * Test method for * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(int, Object, * ContentModel)' Parameters type=Integer.MIN_VALUE, el= * "",',',false,false,('*',new * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new * Vector(),new AttributeList(null)), new ContentModel() Verifies that an * instance is created. content is equal to el= "",',',false,false,('*',new * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new * Vector(),new AttributeList(null)), type is Integer.MIN_VALUE and next is * new ContentModel() */ public void testContentModelIntObjectContentModel080() { try { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cmnext = new ContentModel(); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(128); bs1.set(1); BitSet bs2 = new BitSet(7); AttributeList al = new AttributeList("bigC", -2147483648, -1, "value", new Vector(), new AttributeList(null)); Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2, al); cm = new ContentModel(Integer.MIN_VALUE, el, cmnext); assertNotNull(cm); assertEquals(el, cm.content); assertEquals(Integer.MIN_VALUE, cm.type); assertEquals(cmnext, cm.next); } catch (Exception e) { fail("Should not throw any exception but was: " + e); } }
/** * Test method for * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(int, Object, * ContentModel)' Parameters type=42, ContentModel( * "elemento",',',false,false,('*',new * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1")), * new ContentModel() Verifies that an instance is created. content is equal * to ContentModel(("elemento",',',false,false,cm2,bs1,bs2,al)), type is 42 * and next is new ContentModel() */ public void testContentModelIntObjectContentModel082() { try { ContentModel cmnext = new ContentModel(); dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(0); bs1.set(1); BitSet bs2 = new BitSet(168); bs2.set(45); AttributeList al = new AttributeList("1"); Element el = dtd.defineElement("elemento", ',', false, false, cm2, bs1, bs2, al); cm2 = new ContentModel(el); cm = new ContentModel(42, cm2, cmnext); assertNotNull(cm); assertEquals(cm2, cm.content); assertEquals(42, cm.type); assertEquals(cmnext, cm.next); } catch (Exception e) { fail("Should not throw any exception but was: " + e); } }
/** * Test method for * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(int, Object, * ContentModel)' Parameters type=0, * ContentModel("",',',false,false,('*',new * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new * Vector(),new * AttributeList(null))),ContentModel("",',',false,false,('*',new * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new * Vector(),new AttributeList(null))),new ContentModel() Verifies that an * instance is created. content is equal to * ContentModel(("",',',false,false,('*',new * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new * Vector(),new AttributeList(null)))), type is 0 and next is * ("",',',false,false,('*',new * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new * Vector(),new AttributeList(null))) */ public void testContentModelIntObjectContentModel083() { try { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cmnext = new ContentModel(); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(128); bs1.set(1); BitSet bs2 = new BitSet(7); AttributeList al = new AttributeList("bigC", -2147483648, -1, "value", new Vector(), new AttributeList(null)); Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2, al); cm2 = new ContentModel(el); cm = new ContentModel(0, cm2, cmnext); assertNotNull(cm); assertEquals(cm2, cm.content); assertEquals(0, cm.type); assertEquals(cmnext, cm.next); } catch (Exception e) { fail("Should not throw any exception but was: " + e); } }
/** * Test method for 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.toString()' * ContentModel(Element("elemento",',',false,false,('*',new * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1") * Expected: "elemento" */ public void testToString004() { try { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(0); bs1.set(1); BitSet bs2 = new BitSet(168); bs2.set(45); AttributeList al = new AttributeList("1"); Element el = dtd.defineElement("elemento", ',', false, false, cm2, bs1, bs2, al); cm = new ContentModel(el); assertEquals("elemento", cm.toString()); } catch (Exception e) { fail("Should not throw any exception but was: " + e); } }
/** * Test method for 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.toString()' * ContentModel(Element("",'*',true,false,cm2,bs1,bs2,al)) "" */ public void testToString005() { try { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(128); bs1.set(1); BitSet bs2 = new BitSet(7); AttributeList al = new AttributeList("bigC", -2147483648, -1, "value", new Vector(), new AttributeList(null)); Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2, al); cm = new ContentModel(el); assertEquals("", cm.toString()); } catch (Exception e) { fail("Should not throw any exception but was: " + e); } }
/** * Test method for 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.toString()' * ContentModel(Element( "elemento",',',false,false,('*',new * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1") . * Expected result is "elemento" */ public void testToString022() { try { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(0); bs1.set(1); BitSet bs2 = new BitSet(168); bs2.set(45); AttributeList al = new AttributeList("1"); Element el = dtd.defineElement("elemento", ',', false, false, cm2, bs1, bs2, al); cm2 = new ContentModel(el); ContentModel cm = new ContentModel(0, cm2); assertEquals("elemento", cm.toString()); } catch (Exception e) { fail("Should not throw any exception but was: " + e); } }
/** * Test method for 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.toString()' * ContentModel(Element( "",',',false,false,('*',new * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new * Vector(),new AttributeList(null)) . Expected result is "+" */ public void testToString023() { try { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(128); bs1.set(1); BitSet bs2 = new BitSet(7); AttributeList al = new AttributeList("bigC", -2147483648, -1, "value", new Vector(), new AttributeList(null)); Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2, al); cm2 = new ContentModel(el); ContentModel cm = new ContentModel(43, cm2); assertEquals("+", cm.toString()); } catch (Exception e) { fail("Should not throw any exception but was: " + e); } }
/** * Test method for 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.empty()' * ContentModel(Element("elemento",',',false,false,('*',new * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1")) * Expected result is false */ public void testEmpty004() { try { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(0); bs1.set(1); BitSet bs2 = new BitSet(168); bs2.set(45); AttributeList al = new AttributeList("1"); Element el = dtd.defineElement("elemento", ',', false, false, cm2, bs1, bs2, al); cm = new ContentModel(el); assertFalse(cm.empty()); } catch (Exception e) { fail("Should not throw any exception but was: " + e); } }
/** * Test method for 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.empty()' * ContentModel(Element("elemento",',',false,false,('*',new * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1") * Expected result is false */ public void testEmpty005() { try { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(128); bs1.set(1); BitSet bs2 = new BitSet(7); AttributeList al = new AttributeList("bigC", -2147483648, -1, "value", new Vector(), new AttributeList(null)); Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2, al); cm = new ContentModel(el); assertFalse(cm.empty()); } catch (Exception e) { fail("Should not throw any exception but was: " + e); } }
/** * Test method for 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.empty()' * ContentModel(Element( "elemento",',',false,false,('*',new * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1") * Expected result is false */ public void testEmpty022() { try { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(0); bs1.set(1); BitSet bs2 = new BitSet(168); bs2.set(45); AttributeList al = new AttributeList("1"); Element el = dtd.defineElement("elemento", ',', false, false, cm2, bs1, bs2, al); cm2 = new ContentModel(el); ContentModel cm = new ContentModel(0, cm2); assertFalse(cm.empty()); } catch (Exception e) { fail("Should not throw any exception but was: " + e); } }
/** * Test method for 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.empty()' * ContentModelel= "",',',false,false,('*',new * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new * Vector(),new AttributeList(null)) Expected result is false */ public void testEmpty023() { try { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(128); bs1.set(1); BitSet bs2 = new BitSet(7); AttributeList al = new AttributeList("bigC", -2147483648, -1, "value", new Vector(), new AttributeList(null)); Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2, al); cm2 = new ContentModel(el); ContentModel cm = new ContentModel(43, cm2); assertFalse(cm.empty()); } catch (Exception e) { fail("Should not throw any exception but was: " + e); } }
/** * Test method for 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.first()' * ContentModel("elemento",',',false,false,('*',new * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1")) * Expected: "elemento",',',false,false,('*',new * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1") */ public void testFirst004() { try { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(0); bs1.set(1); BitSet bs2 = new BitSet(168); bs2.set(45); AttributeList al = new AttributeList("1"); Element el = dtd.defineElement("elemento", ',', false, false, cm2, bs1, bs2, al); cm = new ContentModel(el); assertEquals(el, cm.first()); } catch (Exception e) { fail("Should not throw any exception but was: " + e); } }
/** * Test method for 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.first()' * ContentModel(Element("",',',false,false,('*',new * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new * Vector(),new AttributeList(null)) expected: * Element("",',',false,false,('*',new * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new * Vector(),new AttributeList(null)) */ public void testFirst005() { try { dtd = new DTDGetter("TestContentModelSemantic"); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(128); bs1.set(1); BitSet bs2 = new BitSet(7); AttributeList al = new AttributeList("bigC", -2147483648, -1, "value", new Vector(), new AttributeList(null)); Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2, al); cm = new ContentModel(el); assertEquals(el, cm.first()); } catch (Exception e) { fail("Should not throw any exception but was: " + e); } }