assertEquals("1", get(sliceExpression.getFirstIndex()).getText());
assertEquals("2", get(sliceExpression.getSecondIndex()).getText());
}
public void testNewSliceWithCommentsAndWhitespaces() throws Exception {
GoFile file = get(parse("" +
"package main; func a() { " +
" ad[\n" +
"/**/ 1/**/:/**/2/**/:/**/3/**/] }\n" +
""));
GoSliceExpression sliceExpression =
getAs(GoSliceExpression.class,
castAs(GoExpressionStatement.class, 0,
get(
childAt(0,
file.getFunctions()
).getBlock()
).getStatements()
).getExpression()
);