Package org.encog.script

Examples of org.encog.script.EncogScript


  public void testHelloWorld()
  {
    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");   
  }
View Full Code Here


 
  public void testLoop()
  {
    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

Related Classes of org.encog.script.EncogScript

Copyright © 2018 www.massapicom. 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.