Package org.encog.script

Examples of org.encog.script.EncogScript.run()


  {
    StringConsole console = new StringConsole();
    EncogJavascriptEngine.init();
    EncogScript script = new EncogScript();
    script.setSource("console.print(\'Hello World\')\n");
    script.run(console);
    Assert.assertEquals(console.toString(),"Hello World");   
  }
 
  public void testLoop()
  {
View Full Code Here


  {
    StringConsole console = new StringConsole();
    EncogJavascriptEngine.init();
    EncogScript script = new EncogScript();
    script.setSource("for(i=0;i<10;i++){console.print(i);}\n");
    script.run(console);
    Assert.assertEquals(console.toString(),"0.01.02.03.04.05.06.07.08.09.0");   
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.