use of com.intellij.formatting.engine.TestData in project intellij-community by JetBrains.
the class NewLineBlocksIteratorTest method testFirstBlockOnNewLineNotStartsIt.
public void testFirstBlockOnNewLineNotStartsIt() throws IOException, JDOMException {
String text = "[]varx []=r'''\n" + "'''";
TestData data = FormatterEngineTestsKt.extractFormattingTestData(text);
Document document = EditorFactory.getInstance().createDocument(data.getTextToFormat());
NewLineBlocksIterator iterator = new NewLineBlocksIterator(data.getRootBlock(), document);
checkStartOffsets(new int[] { 0 }, iterator);
}
use of com.intellij.formatting.engine.TestData in project intellij-community by JetBrains.
the class FormatterBasedLineInfoBuilderTest method getLineInfos.
private static List<LineIndentInfo> getLineInfos(String text) throws IOException, JDOMException {
TestData data = FormatterEngineTestsKt.extractFormattingTestData(text);
Document document = EditorFactory.getInstance().createDocument(data.getTextToFormat());
FormatterBasedLineIndentInfoBuilder builder = new FormatterBasedLineIndentInfoBuilder(document, data.getRootBlock(), null);
return builder.build();
}
Aggregations