CallGraph callgraph = compileAndRunForward(source);
Function mainFunction = callgraph.getMainFunction();
Function functionB = callgraph.getUniqueFunctionWithName("B");
Callsite callInMain =
mainFunction.getCallsitesInFunction().iterator().next();
// A()'s target function is not an extern
assertFalse(callInMain.hasExternTarget());
Callsite callInB = functionB.getCallsitesInFunction().iterator().next();
assertEquals("ExternalFunction",
callInB.getAstNode().getFirstChild().getString());
// ExternalFunction(6) is a call to an extern function
assertTrue(callInB.hasExternTarget());
assertEquals(0, callInB.getPossibleTargets().size());
}