Search in sources :

Example 91 with com.amazonaws.services.s3.model

use of com.amazonaws.services.s3.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);
}
Also used : ILeafNode(org.eclipse.xtext.nodemodel.ILeafNode) Model(org.eclipse.xtext.valueconverter.bug250313.Model) Test(org.junit.Test)

Example 92 with com.amazonaws.services.s3.model

use of com.amazonaws.services.s3.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);
}
Also used : ILeafNode(org.eclipse.xtext.nodemodel.ILeafNode) Model(org.eclipse.xtext.valueconverter.bug250313.Model) Test(org.junit.Test)

Example 93 with com.amazonaws.services.s3.model

use of com.amazonaws.services.s3.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);
}
Also used : Model(org.eclipse.xtext.valueconverter.bug250313.Model) ICompositeNode(org.eclipse.xtext.nodemodel.ICompositeNode) Test(org.junit.Test)

Example 94 with com.amazonaws.services.s3.model

use of com.amazonaws.services.s3.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);
}
Also used : Model(org.eclipse.xtext.valueconverter.bug250313.Model) Test(org.junit.Test)

Example 95 with com.amazonaws.services.s3.model

use of com.amazonaws.services.s3.model in project xtext-core by eclipse.

the class Bug299395Test method testSerialization_08.

@Test
public void testSerialization_08() {
    Model model = Bug299395Factory.eINSTANCE.createModel();
    SubModel subModel = Bug299395Factory.eINSTANCE.createSubModel();
    model.setSubModel(subModel);
    subModel.getStrings().add("s1");
    subModel.getStrings().add("s2");
    String serialized = getSerializer().serialize(model);
    assertEquals("subModel 1 2 \"s1\" 1 2 \"s2\"", serialized);
}
Also used : Model(org.eclipse.xtext.parsetree.reconstr.bug299395.Model) SubModel(org.eclipse.xtext.parsetree.reconstr.bug299395.SubModel) SubModel(org.eclipse.xtext.parsetree.reconstr.bug299395.SubModel) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)49 Model (org.eclipse.xtext.valueconverter.bug250313.Model)30 Model (com.google.cloud.aiplatform.v1.Model)16 AutoMlClient (com.google.cloud.automl.v1.AutoMlClient)16 Model (com.google.cloud.automl.v1.Model)16 ICompositeNode (org.eclipse.xtext.nodemodel.ICompositeNode)16 LocationName (com.google.cloud.aiplatform.v1.LocationName)14 PipelineServiceClient (com.google.cloud.aiplatform.v1.PipelineServiceClient)14 PipelineServiceSettings (com.google.cloud.aiplatform.v1.PipelineServiceSettings)14 TrainingPipeline (com.google.cloud.aiplatform.v1.TrainingPipeline)14 InputDataConfig (com.google.cloud.aiplatform.v1.InputDataConfig)13 ModelContainerSpec (com.google.cloud.aiplatform.v1.ModelContainerSpec)13 ByteArrayInputStream (java.io.ByteArrayInputStream)13 FilterSplit (com.google.cloud.aiplatform.v1.FilterSplit)11 FractionSplit (com.google.cloud.aiplatform.v1.FractionSplit)11 PredefinedSplit (com.google.cloud.aiplatform.v1.PredefinedSplit)11 TimestampSplit (com.google.cloud.aiplatform.v1.TimestampSplit)11 Status (com.google.rpc.Status)11 Model (com.microsoft.z3.Model)11 IOException (java.io.IOException)11