use of org.eclipse.xtext.parsetree.reconstr.bug302128.Model in project xtext-core by eclipse.
the class Bug250313Test method testKeywordConversion_03.
@Test
public void testKeywordConversion_03() throws Exception {
Model model = (Model) getModel("1+ mykeyword1");
assertEquals("[mykeyword1]", model.getMultiValue().toString());
// XXX value converter is not called for keywords?
// if this is a bug, all assertions 'assertEquals(1, convertCallCount)' have to be increased
assertEquals(lexerRule, 0, convertCallCount);
}
use of org.eclipse.xtext.parsetree.reconstr.bug302128.Model in project xtext-core by eclipse.
the class Bug250313Test method testIDConversion_05.
@Test
public void testIDConversion_05() throws Exception {
Model model = (Model) getModel("1+ str");
assertEquals("[str]", model.getMultiValue().toString());
assertEquals("org.eclipse.xtext.common.Terminals.ID", lexerRule);
assertTrue(node instanceof ILeafNode);
assertEquals("str", string);
assertEquals(1, convertCallCount);
}
use of org.eclipse.xtext.parsetree.reconstr.bug302128.Model in project xtext-core by eclipse.
the class Bug250313Test method testNestedDatatypeConversion_01.
@Test
public void testNestedDatatypeConversion_01() throws Exception {
Model model = (Model) getModel("1 zonk + foo - bar");
assertEquals("str", model.getValue());
assertEquals("org.eclipse.xtext.valueconverter.Bug250313.NestedDatatype", lexerRule);
assertTrue(node instanceof ICompositeNode);
assertEquals(5, Iterables.size(((ICompositeNode) node).getChildren()));
assertEquals("zonk + foo - bar", string);
assertEquals(1, convertCallCount);
}
use of org.eclipse.xtext.parsetree.reconstr.bug302128.Model in project xtext-core by eclipse.
the class Bug250313Test method testNestedDatatypeConversion_02.
@Test
public void testNestedDatatypeConversion_02() throws Exception {
Model model = (Model) getModel("1 zonk +");
assertEquals("str", model.getValue());
assertEquals("org.eclipse.xtext.valueconverter.Bug250313.NestedDatatype", lexerRule);
assertTrue(node instanceof ICompositeNode);
assertEquals(4, Iterables.size(((ICompositeNode) node).getChildren()));
assertEquals("zonk +", string);
assertEquals(1, convertCallCount);
}
use of org.eclipse.xtext.parsetree.reconstr.bug302128.Model in project xtext-core by eclipse.
the class Bug250313Test method testNestedDatatypeConversion_07.
@Test
public void testNestedDatatypeConversion_07() throws Exception {
Model model = (Model) getModel("1+ zonk + foo - bar");
assertEquals("[str]", model.getMultiValue().toString());
assertEquals("org.eclipse.xtext.valueconverter.Bug250313.NestedDatatype", lexerRule);
assertTrue(node instanceof ICompositeNode);
assertEquals(5, Iterables.size(((ICompositeNode) node).getChildren()));
assertEquals("zonk + foo - bar", string);
assertEquals(1, convertCallCount);
}
Aggregations