use of org.eclipse.xtext.formatting2.regionaccess.internal.regionaccesstestlanguage.Mixed in project xtext-core by eclipse.
the class RegionAccessBuilderTest method testActionDelegate.
@Test
public void testActionDelegate() {
StringConcatenation _builder = new StringConcatenation();
_builder.append("6 (())");
_builder.newLine();
String _trim = _builder.toString().trim();
StringConcatenation _builder_1 = new StringConcatenation();
_builder_1.append("0 0 H");
_builder_1.newLine();
_builder_1.append(" ");
_builder_1.append("B Action Root");
_builder_1.newLine();
_builder_1.append("0 1 S \"6\" Root:\'6\'");
_builder_1.newLine();
_builder_1.append("1 1 H \" \" Whitespace:TerminalRule\'WS\'");
_builder_1.newLine();
_builder_1.append("2 1 S \"(\" Mixed:\'(\'");
_builder_1.newLine();
_builder_1.append("3 0 H");
_builder_1.newLine();
_builder_1.append("3 1 S \"(\" Mixed:\'(\'");
_builder_1.newLine();
_builder_1.append("4 0 H");
_builder_1.newLine();
_builder_1.append("4 1 S \")\" Mixed:\')\'");
_builder_1.newLine();
_builder_1.append("5 0 H");
_builder_1.newLine();
_builder_1.append("5 1 S \")\" Mixed:\')\'");
_builder_1.newLine();
_builder_1.append(" ");
_builder_1.append("E Action Root");
_builder_1.newLine();
_builder_1.append("6 0 H");
_builder_1.newLine();
this.operator_tripleEquals(_trim, _builder_1);
}
use of org.eclipse.xtext.formatting2.regionaccess.internal.regionaccesstestlanguage.Mixed in project xtext-core by eclipse.
the class RegionAccessBuilderTest method testFragmentChildID.
@Test
public void testFragmentChildID() {
StringConcatenation _builder = new StringConcatenation();
_builder.append("6 (fragment child (foo))");
_builder.newLine();
String _trim = _builder.toString().trim();
StringConcatenation _builder_1 = new StringConcatenation();
_builder_1.append(" ");
_builder_1.append("0 0 H");
_builder_1.newLine();
_builder_1.append(" ");
_builder_1.append("B Action Root");
_builder_1.newLine();
_builder_1.append(" ");
_builder_1.append("0 1 S \"6\" Root:\'6\'");
_builder_1.newLine();
_builder_1.append(" ");
_builder_1.append("1 1 H \" \" Whitespace:TerminalRule\'WS\'");
_builder_1.newLine();
_builder_1.append(" ");
_builder_1.append("2 1 S \"(\" Mixed:\'(\'");
_builder_1.newLine();
_builder_1.append(" ");
_builder_1.append("3 0 H");
_builder_1.newLine();
_builder_1.append(" ");
_builder_1.append("3 8 S \"fragment\" Mixed:\'fragment\'");
_builder_1.newLine();
_builder_1.append("11 1 H \" \" Whitespace:TerminalRule\'WS\'");
_builder_1.newLine();
_builder_1.append("12 5 S \"child\" Fragment:\'child\'");
_builder_1.newLine();
_builder_1.append("17 1 H \" \" Whitespace:TerminalRule\'WS\'");
_builder_1.newLine();
_builder_1.append(" ");
_builder_1.append("B Mixed\'foo\' Fragment:mixed=Mixed path:Action/mixed");
_builder_1.newLine();
_builder_1.append("18 1 S \"(\" Mixed:\'(\'");
_builder_1.newLine();
_builder_1.append("19 0 H");
_builder_1.newLine();
_builder_1.append("19 3 S \"foo\" Mixed:name=ID");
_builder_1.newLine();
_builder_1.append("22 0 H");
_builder_1.newLine();
_builder_1.append("22 1 S \")\" Mixed:\')\'");
_builder_1.newLine();
_builder_1.append(" ");
_builder_1.append("E Mixed\'foo\' Fragment:mixed=Mixed path:Action/mixed");
_builder_1.newLine();
_builder_1.append("23 0 H");
_builder_1.newLine();
_builder_1.append("23 1 S \")\" Mixed:\')\'");
_builder_1.newLine();
_builder_1.append(" ");
_builder_1.append("E Action Root");
_builder_1.newLine();
_builder_1.append("24 0 H");
_builder_1.newLine();
this.operator_tripleEquals(_trim, _builder_1);
}
use of org.eclipse.xtext.formatting2.regionaccess.internal.regionaccesstestlanguage.Mixed in project xtext-core by eclipse.
the class RegionAccessBuilderTest method testActionDelegate2.
@Test
public void testActionDelegate2() {
StringConcatenation _builder = new StringConcatenation();
_builder.append("6 ((()))");
_builder.newLine();
String _trim = _builder.toString().trim();
StringConcatenation _builder_1 = new StringConcatenation();
_builder_1.append("0 0 H");
_builder_1.newLine();
_builder_1.append(" ");
_builder_1.append("B Action Root");
_builder_1.newLine();
_builder_1.append("0 1 S \"6\" Root:\'6\'");
_builder_1.newLine();
_builder_1.append("1 1 H \" \" Whitespace:TerminalRule\'WS\'");
_builder_1.newLine();
_builder_1.append("2 1 S \"(\" Mixed:\'(\'");
_builder_1.newLine();
_builder_1.append("3 0 H");
_builder_1.newLine();
_builder_1.append("3 1 S \"(\" Mixed:\'(\'");
_builder_1.newLine();
_builder_1.append("4 0 H");
_builder_1.newLine();
_builder_1.append("4 1 S \"(\" Mixed:\'(\'");
_builder_1.newLine();
_builder_1.append("5 0 H");
_builder_1.newLine();
_builder_1.append("5 1 S \")\" Mixed:\')\'");
_builder_1.newLine();
_builder_1.append("6 0 H");
_builder_1.newLine();
_builder_1.append("6 1 S \")\" Mixed:\')\'");
_builder_1.newLine();
_builder_1.append("7 0 H");
_builder_1.newLine();
_builder_1.append("7 1 S \")\" Mixed:\')\'");
_builder_1.newLine();
_builder_1.append(" ");
_builder_1.append("E Action Root");
_builder_1.newLine();
_builder_1.append("8 0 H");
_builder_1.newLine();
this.operator_tripleEquals(_trim, _builder_1);
}
use of org.eclipse.xtext.formatting2.regionaccess.internal.regionaccesstestlanguage.Mixed in project xtext-core by eclipse.
the class SemanticRegionFinderTest method regionForRuleCallToAssignedTerminal.
@Test
public void regionForRuleCallToAssignedTerminal() {
StringConcatenation _builder = new StringConcatenation();
_builder.append("6 (foo)");
final Mixed mixed = this.<Mixed>parseAs(_builder, Mixed.class);
final ISemanticRegionsFinder finder = this.toAccess(mixed).regionForEObject(mixed).getRegionFor();
final ISemanticRegion actual = finder.ruleCallTo(this._regionAccessTestLanguageGrammarAccess.getIDRule());
final ISemanticRegion actuals = finder.ruleCallTo(this._regionAccessTestLanguageGrammarAccess.getIDRule());
Assert.assertEquals("foo", actual, actuals);
}
use of org.eclipse.xtext.formatting2.regionaccess.internal.regionaccesstestlanguage.Mixed in project xtext-core by eclipse.
the class SemanticRegionFinderTest method regionForFeatureAttribute.
@Test
public void regionForFeatureAttribute() {
StringConcatenation _builder = new StringConcatenation();
_builder.append("6 (foo)");
final Mixed mixed = this.<Mixed>parseAs(_builder, Mixed.class);
final ISemanticRegionsFinder finder = this.toAccess(mixed).regionForEObject(mixed).getRegionFor();
final ISemanticRegion actual = finder.feature(RegionaccesstestlanguagePackage.Literals.MIXED__NAME);
final List<ISemanticRegion> actuals = finder.features(RegionaccesstestlanguagePackage.Literals.MIXED__NAME);
this.assertEquals("foo", actual, actuals);
}
Aggregations