Search in sources :

Example 51 with Ds3Element

use of com.spectralogic.ds3autogen.api.models.apispec.Ds3Element in project ds3_autogen by SpectraLogic.

the class C_Type_Test method testStructMemberTypeDateToString.

@Test
public void testStructMemberTypeDateToString() throws java.text.ParseException {
    final Ds3Element testElement = new Ds3Element("dateElement", "java.util.Date", null, false);
    final C_Type c_type = C_TypeHelper.convertDs3ElementType(testElement, ImmutableSet.of());
    assertThat(c_type.getTypeName(), is("ds3_str"));
    assertThat(c_type.toString(), is("ds3_str*"));
}
Also used : C_Type(com.spectralogic.ds3autogen.c.models.C_Type) Ds3Element(com.spectralogic.ds3autogen.api.models.apispec.Ds3Element) Test(org.junit.Test)

Example 52 with Ds3Element

use of com.spectralogic.ds3autogen.api.models.apispec.Ds3Element in project ds3_autogen by SpectraLogic.

the class C_Type_Test method testStructTypeLongToString2.

@Test
public void testStructTypeLongToString2() throws java.text.ParseException {
    final Ds3Element testElement = new Ds3Element("longElement2", "long", null, false);
    final C_Type c_type = C_TypeHelper.convertDs3ElementType(testElement, ImmutableSet.of());
    assertThat(c_type.getTypeName(), is("uint64_t"));
    assertThat(c_type.toString(), is("uint64_t"));
}
Also used : C_Type(com.spectralogic.ds3autogen.c.models.C_Type) Ds3Element(com.spectralogic.ds3autogen.api.models.apispec.Ds3Element) Test(org.junit.Test)

Example 53 with Ds3Element

use of com.spectralogic.ds3autogen.api.models.apispec.Ds3Element in project ds3_autogen by SpectraLogic.

the class C_Type_Test method testStructTypeIntToString1.

@Test
public void testStructTypeIntToString1() throws java.text.ParseException {
    final Ds3Element testElement = new Ds3Element("intStruct1", "int", null, false);
    final C_Type c_type = C_TypeHelper.convertDs3ElementType(testElement, ImmutableSet.of());
    assertThat(c_type.getTypeName(), is("int"));
    assertThat(c_type.toString(), is("int"));
}
Also used : C_Type(com.spectralogic.ds3autogen.c.models.C_Type) Ds3Element(com.spectralogic.ds3autogen.api.models.apispec.Ds3Element) Test(org.junit.Test)

Example 54 with Ds3Element

use of com.spectralogic.ds3autogen.api.models.apispec.Ds3Element in project ds3_autogen by SpectraLogic.

the class C_Type_Test method testStructTypeBooleanToString2.

@Test
public void testStructTypeBooleanToString2() throws java.text.ParseException {
    final Ds3Element testElement = new Ds3Element("booleanStruct", "boolean", null, false);
    final C_Type c_type = C_TypeHelper.convertDs3ElementType(testElement, ImmutableSet.of());
    assertThat(c_type.getTypeName(), is("ds3_bool"));
    assertThat(c_type.toString(), is("ds3_bool"));
}
Also used : C_Type(com.spectralogic.ds3autogen.c.models.C_Type) Ds3Element(com.spectralogic.ds3autogen.api.models.apispec.Ds3Element) Test(org.junit.Test)

Aggregations

Ds3Element (com.spectralogic.ds3autogen.api.models.apispec.Ds3Element)54 Test (org.junit.Test)48 Ds3Type (com.spectralogic.ds3autogen.api.models.apispec.Ds3Type)22 C_Type (com.spectralogic.ds3autogen.c.models.C_Type)10 Ds3Annotation (com.spectralogic.ds3autogen.api.models.apispec.Ds3Annotation)9 Element (com.spectralogic.ds3autogen.java.models.Element)6 ImmutableSet (com.google.common.collect.ImmutableSet)5 Ds3AnnotationElement (com.spectralogic.ds3autogen.api.models.apispec.Ds3AnnotationElement)5 ImmutableList (com.google.common.collect.ImmutableList)4 Ds3ApiSpec (com.spectralogic.ds3autogen.api.models.apispec.Ds3ApiSpec)4 Struct (com.spectralogic.ds3autogen.c.models.Struct)4 NetNullableVariable (com.spectralogic.ds3autogen.net.model.common.NetNullableVariable)4 Ds3ModelPartialDataFixture.createEmptyDs3Type (com.spectralogic.ds3autogen.testutil.Ds3ModelPartialDataFixture.createEmptyDs3Type)4 Ds3SpecParser (com.spectralogic.ds3autogen.api.Ds3SpecParser)3 Ds3EnumConstant (com.spectralogic.ds3autogen.api.models.apispec.Ds3EnumConstant)3 TestFileUtilsImpl (com.spectralogic.ds3autogen.utils.TestFileUtilsImpl)3 ByteArrayOutputStream (java.io.ByteArrayOutputStream)3 Ds3SpecParserImpl (com.spectralogic.ds3autogen.Ds3SpecParserImpl)2 NameMapper (com.spectralogic.ds3autogen.NameMapper)2 Ds3DocSpecParser (com.spectralogic.ds3autogen.api.Ds3DocSpecParser)2