public void visit(StringRedBlackTree.VisitorContext context) { context.writeBytes(writer.stringOutput); writer.lengthOutput.write(context.getLength()); dumpOrder[context.getOriginalPosition()] = currentId++; }
public void visit(StringRedBlackTree.VisitorContext context) { string word = context.getText().ToString(); Assert.Equal(words[current], word); Assert.Equal(order[current], context.getOriginalPosition()); buffer.Position = 0; buffer.SetLength(0); context.writeBytes(buffer); Assert.Equal(word, Encoding.UTF8.GetString(buffer.ToArray())); current += 1; }