Search in sources :

Example 51 with Model

use of org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.Model in project xtext-core by eclipse.

the class AbstractParserTest method testParse_10_A_B.

@Test
public void testParse_10_A_B() throws Exception {
    Model model = (Model) getModel("10 a b");
    assertEquals(1, model.getFirstAsList().size());
    assertEquals(1, model.getSecondAsList().size());
}
Also used : Model(org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.Model) NestedModel(org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.NestedModel) Test(org.junit.Test)

Example 52 with Model

use of org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.Model in project xtext-core by eclipse.

the class AbstractParserTest method internalTestNested.

public void internalTestNested(String input, int expected) throws Exception {
    Model model = (Model) getModel("bug302585 " + input);
    assertNotNull(model);
    List<NestedModel> nestedModels = model.getNestedModel();
    assertEquals(expected, nestedModels.size());
    for (NestedModel nested : nestedModels) {
        assertTrue(nested.isFirst());
        assertTrue(nested.isSecond());
    }
}
Also used : Model(org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.Model) NestedModel(org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.NestedModel) NestedModel(org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.NestedModel)

Example 53 with Model

use of org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.Model in project xtext-core by eclipse.

the class AbstractParserTest method testParse_7_A_B.

@Test
public void testParse_7_A_B() throws Exception {
    Model model = (Model) getModel("7 a b");
    assertEquals(1, model.getFirstAsList().size());
    assertEquals(1, model.getSecondAsList().size());
}
Also used : Model(org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.Model) NestedModel(org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.NestedModel) Test(org.junit.Test)

Example 54 with Model

use of org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.Model in project xtext-core by eclipse.

the class AbstractParserTest method testParse_6_A_B.

@Test
public void testParse_6_A_B() throws Exception {
    Model model = (Model) getModel("6 a b");
    assertEquals(1, model.getFirstAsList().size());
    assertEquals(1, model.getSecondAsList().size());
}
Also used : Model(org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.Model) NestedModel(org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.NestedModel) Test(org.junit.Test)

Example 55 with Model

use of org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.Model in project xtext-core by eclipse.

the class AbstractParserTest method testParse_10_A_B_A_B.

@Test
public void testParse_10_A_B_A_B() throws Exception {
    Model model = (Model) getModel("10 a b a b");
    assertEquals(2, model.getFirstAsList().size());
    assertEquals(2, model.getSecondAsList().size());
}
Also used : Model(org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.Model) NestedModel(org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.NestedModel) Test(org.junit.Test)

Aggregations

Model (org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.Model)67 NestedModel (org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.NestedModel)67 Test (org.junit.Test)60 EPackage (org.eclipse.emf.ecore.EPackage)3 Action (org.eclipse.xtext.Action)3 Parameter (org.eclipse.xtext.Parameter)3 ParserRule (org.eclipse.xtext.ParserRule)3 UnorderedSerialization (org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.UnorderedSerialization)3