Search in sources :

Example 21 with org.hl7.fhir.dstu3.model

use of org.hl7.fhir.dstu3.model 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);
}
Also used : Model(org.eclipse.xtext.valueconverter.bug250313.Model) ICompositeNode(org.eclipse.xtext.nodemodel.ICompositeNode) Test(org.junit.Test)

Example 22 with org.hl7.fhir.dstu3.model

use of org.hl7.fhir.dstu3.model in project xtext-core by eclipse.

the class Bug250313Test method testSTRINGConversion_03.

@Test
public void testSTRINGConversion_03() throws Exception {
    Model model = (Model) getModel("2 'str'");
    assertEquals("str", model.getValue());
    assertEquals("org.eclipse.xtext.common.Terminals.STRING", lexerRule);
    assertTrue(node instanceof ILeafNode);
    assertEquals("'str'", string);
    assertEquals(1, convertCallCount);
}
Also used : ILeafNode(org.eclipse.xtext.nodemodel.ILeafNode) Model(org.eclipse.xtext.valueconverter.bug250313.Model) Test(org.junit.Test)

Example 23 with org.hl7.fhir.dstu3.model

use of org.hl7.fhir.dstu3.model 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);
}
Also used : Model(org.eclipse.xtext.valueconverter.bug250313.Model) ICompositeNode(org.eclipse.xtext.nodemodel.ICompositeNode) Test(org.junit.Test)

Example 24 with org.hl7.fhir.dstu3.model

use of org.hl7.fhir.dstu3.model in project xtext-core by eclipse.

the class Bug250313Test method testKeywordConversion_02.

@Test
public void testKeywordConversion_02() throws Exception {
    Model model = (Model) getModel("mykeyword1");
    assertEquals("mykeyword1", model.getValue());
    assertEquals(lexerRule, 0, convertCallCount);
}
Also used : Model(org.eclipse.xtext.valueconverter.bug250313.Model) Test(org.junit.Test)

Example 25 with org.hl7.fhir.dstu3.model

use of org.hl7.fhir.dstu3.model 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);
}
Also used : Model(org.eclipse.xtext.valueconverter.bug250313.Model) ICompositeNode(org.eclipse.xtext.nodemodel.ICompositeNode) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)47 Model (org.eclipse.xtext.valueconverter.bug250313.Model)30 ICompositeNode (org.eclipse.xtext.nodemodel.ICompositeNode)16 ILeafNode (org.eclipse.xtext.nodemodel.ILeafNode)11 Model (org.eclipse.xtext.parsetree.reconstr.bug299395.Model)9 SubModel (org.eclipse.xtext.parsetree.reconstr.bug299395.SubModel)9 BoolExpr (com.microsoft.z3.BoolExpr)7 Model (com.microsoft.z3.Model)7 EPackage (org.eclipse.emf.ecore.EPackage)6 Action (org.eclipse.xtext.Action)6 Parameter (org.eclipse.xtext.Parameter)6 ParserRule (org.eclipse.xtext.ParserRule)6 Status (com.microsoft.z3.Status)3 Model (de.micromata.opengis.kml.v_2_2_0.Model)3 Model (org.sbolstandard.core2.Model)3 Context (com.microsoft.z3.Context)2 Solver (com.microsoft.z3.Solver)2 Kml (de.micromata.opengis.kml.v_2_2_0.Kml)2 HashSet (java.util.HashSet)2 Set (java.util.Set)2