use of org.eclipse.xtext.nodemodel.ICompositeNode in project xtext-core by eclipse.
the class Bug250313Test method testNestedDatatypeConversion_03.
@Test
public void testNestedDatatypeConversion_03() throws Exception {
Model model = (Model) getModel("zonk + foo - bar");
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 + foo - bar", string);
assertEquals(1, convertCallCount);
}
use of org.eclipse.xtext.nodemodel.ICompositeNode in project xtext-core by eclipse.
the class Bug250313Test method testDatatypeConversion_04.
@Test
public void testDatatypeConversion_04() throws Exception {
Model model = (Model) getModel("1+ 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.nodemodel.ICompositeNode in project xtext-core by eclipse.
the class Bug250313Test method testNestedDatatypeConversion_05.
@Test
public void testNestedDatatypeConversion_05() throws Exception {
Model model = (Model) getModel("4 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.nodemodel.ICompositeNode in project xtext-core by eclipse.
the class Bug250313Test method testDatatypeConversion_03.
@Test
public void testDatatypeConversion_03() throws Exception {
Model model = (Model) getModel("3 foo - bar");
assertEquals("str", model.getValue());
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.nodemodel.ICompositeNode in project xtext-core by eclipse.
the class Bug250313Test method testNestedDatatypeConversion_10.
@Test
public void testNestedDatatypeConversion_10() throws Exception {
Model model = (Model) getModel("4+ zonk +");
assertEquals("[str]", model.getMultiValue().toString());
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);
}
Aggregations