use of com.ibm.j9ddr.CTypeParser in project openj9 by eclipse.
the class CTypeParserTest method testSimpleArray.
@Test
public void testSimpleArray() {
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 testSizedArray.
@Test
public void testSizedArray() {
CTypeParser sut = new CTypeParser("int[4][6][8]");
assertEquals("", sut.getPrefix());
assertEquals("int", sut.getCoreType());
assertEquals("[4][6][8]", sut.getSuffix());
}
use of com.ibm.j9ddr.CTypeParser in project openj9 by eclipse.
the class CTypeParserTest method testVariableSizedArray.
@Test
public void testVariableSizedArray() {
CTypeParser sut = new CTypeParser("int*[banana]");
assertEquals("", sut.getPrefix());
assertEquals("int", sut.getCoreType());
assertEquals("*[banana]", sut.getSuffix());
}
use of com.ibm.j9ddr.CTypeParser in project openj9 by eclipse.
the class CTypeParserTest method testTraceExample.
@Test
public void testTraceExample() {
CTypeParser sut = new CTypeParser("struct message *volatile");
assertEquals("", sut.getPrefix());
assertEquals("struct message", sut.getCoreType());
assertEquals("* volatile", sut.getSuffix());
}
use of com.ibm.j9ddr.CTypeParser in project openj9 by eclipse.
the class CTypeParserTest method testConst.
@Test
public void testConst() {
CTypeParser sut = new CTypeParser("const int");
assertEquals("const ", sut.getPrefix());
assertEquals("int", sut.getCoreType());
assertEquals("", sut.getSuffix());
}
Aggregations