use of com.ibm.j9ddr.CTypeParser in project openj9 by eclipse.
the class CTypeParserTest method testUserTypeContainingConst.
@Test
public void testUserTypeContainingConst() {
CTypeParser sut = new CTypeParser("struct myconst");
assertEquals("", sut.getPrefix());
assertEquals("struct myconst", sut.getCoreType());
assertEquals("", sut.getSuffix());
}
use of com.ibm.j9ddr.CTypeParser in project openj9 by eclipse.
the class CTypeParserTest method testFunnySpaces.
@Test
public void testFunnySpaces() {
CTypeParser sut = new CTypeParser(" const int [ ] [] [ ]");
assertEquals("const ", sut.getPrefix());
assertEquals("int", sut.getCoreType());
assertEquals("[][][]", sut.getSuffix());
}
use of com.ibm.j9ddr.CTypeParser in project openj9 by eclipse.
the class CTypeParserTest method testSimpleArray2.
@Test
public void testSimpleArray2() {
CTypeParser sut = new CTypeParser("int []");
assertEquals("", sut.getPrefix());
assertEquals("int", sut.getCoreType());
assertEquals("[]", sut.getSuffix());
}
use of com.ibm.j9ddr.CTypeParser in project openj9 by eclipse.
the class CTypeParserTest method testUserTypeContainingVolatile.
@Test
public void testUserTypeContainingVolatile() {
CTypeParser sut = new CTypeParser("struct myvolatile");
assertEquals("", sut.getPrefix());
assertEquals("struct myvolatile", sut.getCoreType());
assertEquals("", sut.getSuffix());
}
use of com.ibm.j9ddr.CTypeParser in project openj9 by eclipse.
the class CTypeParserTest method testFunnySpaces2.
@Test
public void testFunnySpaces2() {
CTypeParser sut = new CTypeParser(" const int * const * volatile * *");
assertEquals("const ", sut.getPrefix());
assertEquals("int", sut.getCoreType());
assertEquals("* const * volatile **", sut.getSuffix());
}
Aggregations