704705706707708709710711712713714
{ line = line.trim(); line = line.replace(S_ENTITY_LT, S_OPEN_ANGLE); line = line.replace(S_ENTITY_GT, S_CLOSE_ANGLE); tag = tp.processLine(line); if (count++ < lines.length - 1) { assertNull(tag); }
5758596061626364656667
Tag tag = null; for (String line : lines) { tag = tp.processLine(line); if (count++ < lines.length - 1) { assertNull(tag); } }
353354355356357358359360361362363
16511652165316541655165616571658165916601661
for (String line : logLines) { line = line.replace("<", S_OPEN_ANGLE); line = line.replace(">", S_CLOSE_ANGLE); tag = tp.processLine(line); if (count++ < logLines.length - 1) { assertNull(tag); }
2223242526272829303132
public void testSingleLine() { TagProcessor tp = new TagProcessor(); String line = "<klass id='632' name='java/lang/String' flags='17'/>"; Tag tag = tp.processLine(line); assertEquals("klass", tag.getName()); assertEquals(3, tag.getAttrs().size());
4344454647484950515253
String line1 = "<loop idx='1012' inner_loop='1' >"; String line2 = "</loop>"; TagProcessor tp = new TagProcessor(); Tag tag = tp.processLine(line1); assertNull(tag); tag = tp.processLine(line2);
4748495051525354555657
Tag tag = tp.processLine(line1); assertNull(tag); tag = tp.processLine(line2); assertEquals("loop", tag.getName()); assertEquals(2, tag.getAttrs().size());
8182838485868788899091
131132133134135136137138139140141
163164165166167168169170171172173