use of com.google.cloud.aiplatform.v1.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 com.google.cloud.aiplatform.v1.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 com.google.cloud.aiplatform.v1.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);
}
use of com.google.cloud.aiplatform.v1.Model in project xtext-core by eclipse.
the class Bug299395Test method testSerialization.
@Test
public void testSerialization() {
Model model = Bug299395Factory.eINSTANCE.createModel();
String serialized = getSerializer().serialize(model);
assertEquals("", serialized);
}
use of com.google.cloud.aiplatform.v1.Model in project xtext-core by eclipse.
the class Bug299395Test method testSerialization_04.
@Test
public void testSerialization_04() {
Model model = Bug299395Factory.eINSTANCE.createModel();
model.getKeys().add("Key1");
model.getValues().add("Value1");
model.getKeys().add("Key2");
model.getValues().add("Value2");
String serialized = getSerializer().serialize(model);
assertEquals("[ \"Key1\" \"Value1\" \"Key2\" \"Value2\" ]", serialized);
}
Aggregations