assertEquals(GoLiteral.Type.Char, aChar.getType());
assertEquals('ሴ', (char)aChar.getValue());
}
public void testRune() throws Exception {
GoFile file = get(
parse("" +
"package main\n" +
"var (\n" +
" x0 = '1'\n" +
" x1 = 'a'\n" +
" x2 = 'ä'\n" +
" x3 = '本'\n" +
" x4 = '\\t'\n" +
" x5 = '\\000'\n" +
" x6 = '\\007'\n" +
" x7 = '\\377'\n" +
" x8 = '\\x07'\n" +
" x9 = '\\xff'\n" +
" x10 = '\\u12e4'\n" +
" x11 = '\\U00101234'\n" +
" x12 = '\\\\'\n" +
" x13 = '\\\''\n" +
"}"));
HashMap<Integer,Integer> testRuneValues = new HashMap<Integer, Integer>();
testRuneValues.put(0, 49);
testRuneValues.put(1, 97);
testRuneValues.put(2, 228);
testRuneValues.put(3, 26412);
testRuneValues.put(4, 9);
testRuneValues.put(5, 0);
testRuneValues.put(6, 7);
testRuneValues.put(7, 255);
testRuneValues.put(8, 7);
testRuneValues.put(9, 255);
testRuneValues.put(10, 4836);
testRuneValues.put(11, 1053236);
testRuneValues.put(12, 92);
testRuneValues.put(13, 39);
GoVarDeclaration[] declarations =
childAt(0,
file.getGlobalVariables()
).getDeclarations();
GoLiteralChar aChar;
for (Map.Entry<Integer, Integer> entry : testRuneValues.entrySet()) {