//the result of getNthPrime 5002 is 48647
//the result of getNthPrime 5003 is 48649
//the result of getNthPrime 5004 is 48661
CompilerMessageLogger messageLogger = new MessageLogger();
WorkspaceManager workspaceManager = calServices.getWorkspaceManager();
Compiler compiler = calServices.getCompiler();
EntryPoint entryPoint = compiler.getEntryPoint(
EntryPointSpec.make(QualifiedName.make(CALPlatformTestModuleNames.M2, "getNthPrime")),
CALPlatformTestModuleNames.M2, messageLogger);
if (messageLogger.getNMessages() > 0) {
System.err.println(messageLogger.toString());
}
CALExecutor executor = workspaceManager.makeExecutor(executionContext);
try {
for (int i = 0; i < nTimes; ++i) {
Object result = executor.exec(entryPoint, new Object[] {new Integer(5000 + i)});
System.out.println("the result of getNthPrime " + (5000 + i) + " is " + result);