GoFile file = get(
parse("" +
"package main\n" +
"var e = Line{key:1, 2:1)"));
GoLiteralCompositeValue value =
get(
getAs(GoLiteralComposite.class,
castAs(GoLiteralExpression.class, 0,
childAt(0,
childAt(0,
file.getGlobalVariables()
).getDeclarations()
).getExpressions()
).getLiteral()
).getValue());
GoLiteralCompositeElement element;
element = childAt(0, value.getElements());
assertEquals("key", get(element.getKey()).getName());
get(element.getIndex());
assertNull(element.getLiteralValue());
assertEquals("1",
getAs(GoLiteralInteger.class,
getAs(GoLiteralExpression.class,
element.getExpressionValue()
).getLiteral()
).getText());
element = childAt(1, value.getElements());
assertNull(element.getKey());
assertEquals("2",
getAs(GoLiteralInteger.class,
getAs(GoLiteralExpression.class,