Examples of ErlangModule


Examples of statechum.analysis.Erlang.ErlangModule

  {
    Writer wr = new FileWriter(erlangFile);wr.write("-module(testFile).\n-behaviour(gen_server).\n");

    wr.write("handle_call([false,true],_,_) -> {reply,1,5}.\n");
    wr.write(otherMethods);wr.close();
    ErlangModule mod = ErlangModule.loadModule(ErlangModule.setupErlangConfiguration(new File(erlangFile)));
    final Configuration config = Configuration.getDefaultConfiguration().copy();config.setErlangModuleName(mod.getName());config.setLabelKind(LABELKIND.LABEL_ERLANG);
    mod.sigs.put("bool", new FuncSignature(defaultConfig, ErlangLabel.parseText(
      "{\"testFile.erl\",3,handle_call,1,{'Func',[],[{'Boolean',[]}],{'Int',[values],[1]}}}"),
      null));
   
    createLabel("bool, true,1",config);
View Full Code Here

Examples of statechum.analysis.Erlang.ErlangModule

    wr.write("handle_call(#st{processNum=33}=Arg,_,_) -> {reply,11,5};\n");
    wr.write("handle_call(#st{smth=\"whatever\"}=Arg,_,_) -> {reply,12,5}.\n");
    wr.write(otherMethods);wr.close();
    Configuration config = ErlangModule.setupErlangConfiguration(new File(erlangFile));
    config.setErlangAlphabetAnyElements(EXPANSIONOFANY.ANY_WIBBLE);
    ErlangModule mod = ErlangModule.loadModule(config);

    checkFailureFor("call, afalse,11",config);
    Assert.assertEquals("["+
        "{"+ErlangLabel.missingFunction+",'call',{'st'},11},"+
        "{"+ErlangLabel.missingFunction+",'cast','AnyWibble',5},"+
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.