Search in sources :

Example 6 with C_Type

use of com.spectralogic.ds3autogen.c.models.C_Type in project ds3_autogen by SpectraLogic.

the class C_Type_Test method testStructMemberTypeLongToString1.

@Test
public void testStructMemberTypeLongToString1() throws java.text.ParseException {
    final Ds3Element testElement = new Ds3Element("longElement1", "java.lang.Long", null, true);
    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 7 with C_Type

use of com.spectralogic.ds3autogen.c.models.C_Type 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 8 with C_Type

use of com.spectralogic.ds3autogen.c.models.C_Type 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 9 with C_Type

use of com.spectralogic.ds3autogen.c.models.C_Type 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 10 with C_Type

use of com.spectralogic.ds3autogen.c.models.C_Type 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)10 C_Type (com.spectralogic.ds3autogen.c.models.C_Type)10 Test (org.junit.Test)10