use of org.eclipse.xtext.parser.parameters.parametersTestLanguage.ParserRuleParameters in project xtext-core by eclipse.
the class AbstractParametersParsingTest method testScenario5_id.
@Test
public void testScenario5_id() {
try {
final ParserRuleParameters instance = this.getModel("#5 id");
Assert.assertEquals("id", instance.getScenario().getFirst());
} catch (Throwable _e) {
throw Exceptions.sneakyThrow(_e);
}
}
use of org.eclipse.xtext.parser.parameters.parametersTestLanguage.ParserRuleParameters in project xtext-core by eclipse.
the class AbstractParametersParsingTest method testScenario5_keyword.
@Test
public void testScenario5_keyword() {
try {
final ParserRuleParameters instance = this.getModel("#5 keyword");
Assert.assertEquals("keyword", instance.getScenario().getFirst());
} catch (Throwable _e) {
throw Exceptions.sneakyThrow(_e);
}
}
use of org.eclipse.xtext.parser.parameters.parametersTestLanguage.ParserRuleParameters in project xtext-core by eclipse.
the class AbstractParametersParsingTest method testScenario4_keyword.
@Test
public void testScenario4_keyword() {
try {
final ParserRuleParameters instance = this.getModelWithErrors("#4 keyword");
Assert.assertEquals(null, instance.getScenario().getFirst());
Assert.assertEquals(1, instance.eResource().getErrors().size());
Assert.assertEquals("mismatched input \'keyword\' expecting RULE_ID", IterableExtensions.<Resource.Diagnostic>head(instance.eResource().getErrors()).getMessage());
} catch (Throwable _e) {
throw Exceptions.sneakyThrow(_e);
}
}
Aggregations