use of org.eclipse.xtext.parsetree.reconstr.bug299395.Model in project xtext-core by eclipse.
the class Bug250313Test method testSTRINGConversion_02.
@Test
public void testSTRINGConversion_02() throws Exception {
Model model = (Model) getModel("'str'");
assertEquals("str", model.getValue());
assertEquals("org.eclipse.xtext.common.Terminals.STRING", lexerRule);
assertTrue(node instanceof ILeafNode);
assertEquals("'str'", string);
assertEquals(1, convertCallCount);
}
use of org.eclipse.xtext.parsetree.reconstr.bug299395.Model in project xtext-core by eclipse.
the class Bug250313Test method testDatatypeConversion_05.
@Test
public void testDatatypeConversion_05() throws Exception {
Model model = (Model) getModel("3+ foo - bar");
assertEquals("[str]", model.getMultiValue().toString());
assertEquals("org.eclipse.xtext.valueconverter.Bug250313.Datatype", lexerRule);
assertTrue(node instanceof ICompositeNode);
assertEquals(6, Iterables.size(((ICompositeNode) node).getChildren()));
assertEquals("foo - bar", string);
assertEquals(1, convertCallCount);
}
use of org.eclipse.xtext.parsetree.reconstr.bug299395.Model in project xtext-core by eclipse.
the class Bug362902Test method testNoExceptionUncaught.
@Test
public void testNoExceptionUncaught() throws Exception {
String modelAsString = "Hello max ! Hello peter! favourite peter";
Model model = (Model) getModelAndExpect(modelAsString, 2);
EList<Diagnostic> errors = model.eResource().getErrors();
Diagnostic diagnosticSyntax = errors.get(0);
Diagnostic diagnosticLinking = errors.get(1);
assertTrue(diagnosticSyntax instanceof XtextSyntaxDiagnostic);
assertTrue(diagnosticLinking instanceof XtextLinkingDiagnostic);
}
use of org.eclipse.xtext.parsetree.reconstr.bug299395.Model in project xtext-core by eclipse.
the class Bug311337Test method testNoCyclicLinkingException.
@Test
public void testNoCyclicLinkingException() throws Exception {
Model model = (Model) getModel("/************************************/\n" + "(def) local :\n" + " (child) local_Child : def_depth1\n" + " (ref) local_Child:depth1_Child\n" + "\n" + "/************************************/\n" + "\n" + "(def) def_depth1 :\n" + " (child) depth1_Child : def_depth2\n" + "\n" + "/************************************/\n" + "\n" + "(def) def_depth2 :\n" + " (child) depth2_Child :\n");
assertTrue(model.eResource().getErrors().isEmpty());
}
use of org.eclipse.xtext.parsetree.reconstr.bug299395.Model in project xtext-core by eclipse.
the class Bug299395Test method testSerialization.
@Test
public void testSerialization() {
Model model = Bug299395Factory.eINSTANCE.createModel();
String serialized = getSerializer().serialize(model);
assertEquals("", serialized);
}
Aggregations