Search in sources :

Example 1 with FormattertestlanguageFactory

use of org.eclipse.xtext.parsetree.formatter.formattertestlanguage.FormattertestlanguageFactory in project xtext-core by eclipse.

the class FormatterTest method testLinewrapDefault.

@Test
public void testLinewrapDefault() throws Exception {
    FormattertestlanguageFactory f = FormattertestlanguageFactory.eINSTANCE;
    TestLinewrapMinMax m = f.createTestLinewrapMinMax();
    Decl d = f.createDecl();
    d.getType().add("xxx");
    d.getName().add("yyy");
    m.getItems().add(d);
    String actual = getSerializer().serialize(m, SaveOptions.newBuilder().format().getOptions());
    final String expected = convertLineBreaks("test wrapminmax\n\n\nxxx yyy;");
    assertEquals(expected, actual);
}
Also used : TestLinewrapMinMax(org.eclipse.xtext.parsetree.formatter.formattertestlanguage.TestLinewrapMinMax) FormattertestlanguageFactory(org.eclipse.xtext.parsetree.formatter.formattertestlanguage.FormattertestlanguageFactory) Decl(org.eclipse.xtext.parsetree.formatter.formattertestlanguage.Decl) Test(org.junit.Test)

Aggregations

Decl (org.eclipse.xtext.parsetree.formatter.formattertestlanguage.Decl)1 FormattertestlanguageFactory (org.eclipse.xtext.parsetree.formatter.formattertestlanguage.FormattertestlanguageFactory)1 TestLinewrapMinMax (org.eclipse.xtext.parsetree.formatter.formattertestlanguage.TestLinewrapMinMax)1 Test (org.junit.Test)1