Package com.ericsson.otp.erlang

Examples of com.ericsson.otp.erlang.OtpErlangString


              "'P1000',"+
              "[d,b,c,a]}");
    Synapse.StatechumProcess.parseStatemachine(grAerlang,grA,null,true);
    Assert.assertEquals(0, grA.getRedStateNumber());
    checkForCorrectException(new whatToRun() { public @Override void run() {
      Synapse.StatechumProcess.setReds(new OtpErlangList(new OtpErlangObject[]{new OtpErlangString("P1002")}), grA);
    }},ClassCastException.class,"OtpErlangString");
  }
View Full Code Here


  public void testLayoutOptions2()
  {
    final LayoutOptions options = new LayoutOptions();
   
    checkForCorrectException(new whatToRun() { public @Override void run() {
      Synapse.StatechumProcess.setStateNamesToBeIgnored(options, new OtpErlangList(new OtpErlangObject[]{new OtpErlangString("a")}));
    }},ClassCastException.class,"OtpErlangString");// when we do not collect output, no response is sent.
   
  }
View Full Code Here

    protected String runDialyzerAndTyperAsAProcessInsideErlang(File f) throws IOException
    {
      ErlangRunner.compileErl(f, runner, true);
      OtpErlangObject otpArgs[] = new OtpErlangObject[]{
            null,
        new OtpErlangList(new OtpErlangObject[]{new OtpErlangString(ErlangRunner.getName(f, ERL.BEAM, true))}),
        new OtpErlangString(ErlangRunner.getName(f, ERL.PLT, true)),
        new OtpErlangList(new OtpErlangObject[]{new OtpErlangString(ErlangRunner.getName(f, ERL.ERL, false))}),
        new OtpErlangAtom("text")
      };
      otpArgs[0]=new OtpErlangAtom("dialyzer");
      runner.call(otpArgs,"Could not run dialyzer");
      otpArgs[0]=new OtpErlangAtom("typer");
View Full Code Here

    protected String runOnlyTyperAsAProcessInsideErlang(File f) throws IOException
    {
      ErlangRunner.compileErl(f, runner, true);
      OtpErlangObject otpArgs[] = new OtpErlangObject[]{
            null,
        new OtpErlangList(new OtpErlangObject[]{new OtpErlangString(ErlangRunner.getName(f, ERL.BEAM, true))}),
        new OtpErlangString(ErlangRunner.getName(f, ERL.PLT, true)),
        new OtpErlangList(new OtpErlangObject[]{new OtpErlangString(ErlangRunner.getName(f, ERL.ERL, false))}),
        new OtpErlangAtom("text")
      };
      otpArgs[0]=new OtpErlangAtom("typer");
      OtpErlangTuple response = runner.call(otpArgs,"Could not run typer");
      return ((OtpErlangString)response.elementAt(1)).stringValue();
View Full Code Here

    {
      final File f = new File(ErlangExamples,"locker/locker.erl");
      new File(ErlangRunner.getName(f, ERL.PLT,true)).delete();new File(ErlangRunner.getName(f, ERL.BEAM,true)).delete();
         final OtpErlangObject otpArgs[] = new OtpErlangObject[]{
            null,
        new OtpErlangList(new OtpErlangObject[]{new OtpErlangString(ErlangRunner.getName(f, ERL.BEAM, true))}),
        new OtpErlangString(ErlangRunner.getName(f, ERL.PLT, true)),
        new OtpErlangList(new OtpErlangObject[]{new OtpErlangString(ErlangRunner.getName(f, ERL.ERL, false))}),
        new OtpErlangAtom("text")
      };
      otpArgs[0]=new OtpErlangAtom("dialyzer");
    Helper.checkForCorrectException(new statechum.Helper.whatToRun() {
      public @Override void run() throws IOException {
View Full Code Here

    // Almost the same arguments for dialyzer and typer, the first argument
    // determines which of the two to run.
    OtpErlangObject otpArgs[] = new OtpErlangObject[] {
        null, // either Dialyzer or typer

        new OtpErlangList(new OtpErlangObject[] { new OtpErlangString(
            ErlangRunner.getName(f, ERL.BEAM,config.getErlangCompileIntoBeamDirectory())) }),
        new OtpErlangString(ErlangRunner.getName(f, ERL.PLT,config.getErlangCompileIntoBeamDirectory())),
        new OtpErlangList(new OtpErlangObject[] { new OtpErlangString(
            ErlangRunner.getName(f, ERL.ERL,false))}),
        new OtpErlangAtom("types") };

    if (!pltFile.canRead() || f.lastModified() > pltFile.lastModified()) {// rebuild the PLT file since the source was modified or the plt file does not exist
      pltFile.delete();
View Full Code Here

  @Test
  public void testCheckEmptyString1()
  {
    Assert.assertFalse(ListSignature.checkEmptyList(new OtpErlangAtom("")));
    Assert.assertTrue(ListSignature.checkEmptyList(new OtpErlangList()));
    Assert.assertTrue(ListSignature.checkEmptyList(new OtpErlangString("")));
  }
View Full Code Here

 
  @Test
  public void testCheckEmptyStringFail1()
  {
    checkForCorrectException(new whatToRun() { public @Override void run() {
      ListSignature.checkEmptyList(new OtpErlangString("a"));
    }},IllegalArgumentException.class,"the tail of an improper list");
  }
View Full Code Here

                    mbox.send(erlangPartner,outcome);
                  }
                  else
                  if (command.equals(msgGetTraces) && message.arity() == 2)
                  {
                    mbox.send(erlangPartner,new OtpErlangTuple(new OtpErlangObject[]{ref,msgOk,new OtpErlangString(sPlus.toString()),new OtpErlangString(sMinus.toString())}));
                  }
                  else
                    if (command.equals(msgLoadFSM) && message.arity() == 3)
                    {
                      OtpErlangObject outcome = new OtpErlangTuple(new OtpErlangObject[]{ref,msgOk});
View Full Code Here

    // this one configures the runner.
    ErlangRunner.getRunner().configurationToErlang(myEvalCnf.config);
    ErlangRunner.getRunner().call(
        new OtpErlangObject[] {
            new OtpErlangAtom("addPath"),
            new OtpErlangString(
                module.sourceFolder.getAbsolutePath()) },
        "addPath");

  }
View Full Code Here

TOP

Related Classes of com.ericsson.otp.erlang.OtpErlangString

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.