Package org.uscxml.tests.datamodel

Source Code of org.uscxml.tests.datamodel.TestW3CECMA

package org.uscxml.tests.datamodel;

import java.io.File;

import org.uscxml.Capabilities;
import org.uscxml.Factory;
import org.uscxml.Interpreter;
import org.uscxml.InterpreterException;
import org.uscxml.InterpreterOptions;
import org.uscxml.datamodel.ecmascript.ECMAScriptDataModel;

public class TestW3CECMA {

  public static String testDir = "/Users/sradomski/Documents/TK/Code/uscxml/test/w3c/ecma";
 
  public static void main(String[] args) throws InterpreterException {
    System.load("/Users/sradomski/Documents/TK/Code/uscxml/build/cli/lib/libuscxmlNativeJava64.jnilib");

    ECMAScriptDataModel datamodel = new ECMAScriptDataModel();
    Factory.getInstance().registerDataModel(datamodel);

//    while(true) {
//        System.out.println("### test235 #####");
//      Interpreter interpreter = Interpreter.fromURI("/Users/sradomski/Documents/TK/Code/uscxml/test/w3c/ecma/test144.scxml");
//      interpreter.interpret();
//    }
   
    File dir = new File(testDir);
    File[] filesList = dir.listFiles();
    for (File file : filesList) {
        if (file.isFile() && file.getName().endsWith(".scxml")) {
          System.out.println("### " + file.getName() + " #####");
          Interpreter interpreter = Interpreter.fromURI(file.getAbsolutePath());
          interpreter.setCapabilities(1);
          interpreter.interpret();
        }
    }

  }

}
TOP

Related Classes of org.uscxml.tests.datamodel.TestW3CECMA

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.