use of org.eclipse.xtext.valueconverter.bug250313.Model in project xtext-core by eclipse.
the class Bug250313Test method testNestedDatatypeConversion_04.
@Test
public void testNestedDatatypeConversion_04() throws Exception {
Model model = (Model) getModel("zonk +");
assertEquals("str", model.getValue());
assertEquals("org.eclipse.xtext.valueconverter.Bug250313.NestedDatatype", lexerRule);
assertTrue(node instanceof ICompositeNode);
assertEquals(3, Iterables.size(((ICompositeNode) node).getChildren()));
assertEquals("zonk +", string);
assertEquals(1, convertCallCount);
}
use of org.eclipse.xtext.valueconverter.bug250313.Model in project xtext-core by eclipse.
the class Bug250313Test method testNestedDatatypeConversion_09.
@Test
public void testNestedDatatypeConversion_09() throws Exception {
Model model = (Model) getModel("4+ 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);
}
use of org.eclipse.xtext.valueconverter.bug250313.Model in project xtext-core by eclipse.
the class Bug250313Test method testSTRINGConversion_04.
@Test
public void testSTRINGConversion_04() throws Exception {
Model model = (Model) getModel("1+ 'str'");
assertEquals("[str]", model.getMultiValue().toString());
assertNotNull(lexerRule);
assertEquals("org.eclipse.xtext.common.Terminals.STRING", lexerRule);
assertTrue(node instanceof ILeafNode);
assertEquals("'str'", string);
assertEquals(1, convertCallCount);
}
use of org.eclipse.xtext.valueconverter.bug250313.Model in project xtext-core by eclipse.
the class Bug250313Test method testIDConversion_02.
@Test
public void testIDConversion_02() throws Exception {
Model model = (Model) getModel("1 ^str");
assertEquals("str", model.getValue());
assertEquals("org.eclipse.xtext.common.Terminals.ID", lexerRule);
assertTrue(node instanceof ILeafNode);
assertEquals("^str", string);
assertEquals(1, convertCallCount);
}
use of org.eclipse.xtext.valueconverter.bug250313.Model in project xtext-core by eclipse.
the class Bug250313Test method testSTRINGConversion_05.
@Test
public void testSTRINGConversion_05() throws Exception {
Model model = (Model) getModel("2+ 'str'");
assertEquals("[str]", model.getMultiValue().toString());
assertEquals("org.eclipse.xtext.common.Terminals.STRING", lexerRule);
assertTrue(node instanceof ILeafNode);
assertEquals("'str'", string);
assertEquals(1, convertCallCount);
}
Aggregations