FunctionDeclaration functionFoo = unit.getChild(0);
assertEquals("foo", functionFoo.getName());
}
public void testGlobalVarableDeclaration() throws Exception {
TranslationUnit unit = parse("int a = 0, b = 1, c;");
VariableDeclaration variableA = unit.getChild(0);
assertEquals("a", variableA.getName());
VariableDeclaration variableB = unit.getChild(1);
assertEquals("b", variableB.getName());
VariableDeclaration variableC = unit.getChild(2);
assertEquals("c", variableC.getName());
}